Beacon node authentication

Send authenticated requests to a beacon node protected by HTTP Basic, or header-based access control.

HTTP Basic Access Authentication

If you want to use Charon with a HTTP basic access authentication protected beacon node, then you can supply charon run with the --beacon-node-headers flag. The flag's value should be set like: Authorization=Basic <credentials> where Authorizationwill be the header key and Basic <credentials> will be the header value. The <credentials> are a Base64 encoding of the username and password joined by a single colon :.

Usage example

Suppose we have a HTTP Basic access protected beacon node with username john and password doe. To access it we would construct the credentials by running the following command:

echo -n "john:doe" | base64

Then you could pass the flag to your Charon instance like this:

charon run --beacon-node-headers="Authorization=Basic am9objpkb2U="

Or you could specify it as an environment variable like this:

CHARON_BEACON_NODE_HEADERS="Authorization=Basic am9objpkb2U="

Note that 'Authorization' is followed with an = rather than the usual :.

Last updated

Was this helpful?