Skip to content

Support for basic authentication as part of the URL #261

@barnabasbusa

Description

@barnabasbusa

Looks like basic authentication is not supported in dshackle.

Is there any quick way to enable this?

Example:
config:

cluster:
      upstreams:
        - id: "geth-lighthouse"
          chain: ethereum
          connection:
            ethereum:
              rpc:
                url: "https://username:[email protected]"

dshackle logs:

2023-28-09 13:58:51.821 | INFO  |  ConfiguredUpstreams | Using Ethereum upstream, at https://username:[email protected]
2023-28-09 13:58:52.120 | WARN  |  EthereumRpcUpstream | Setting up upstream geth-lighthouse with RPC-only access, less effective than WS+RPC
2023-28-09 13:58:52.131 | INFO  |  EthereumRpcUpstream | Configured for Ethereum
2023-28-09 13:58:52.727 | INFO  | entMultistreamHolder | Upstream geth-lighthouse with chain ETHEREUM has been added
2023-28-09 13:58:52.741 | WARN  |         AbstractHead | Restarting the Head...
2023-28-09 13:58:53.635 | INFO  |            StarterKt | Started StarterKt in 16.031 seconds (JVM running for 18.811)
2023-28-09 13:59:07.726 | INFO  |          Multistream | State of ETH: height=?, status=[UNAVAILABLE/1], lag=[0], weak=[geth-lighthouse]

Raw curl to the rpc endpoint

curl --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST  https://username:[email protected]

response:

{"jsonrpc":"2.0","id":1,"result":"0x207"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions