diff --git a/deploy/local/docker-compose/xatu-server.yaml b/deploy/local/docker-compose/xatu-server.yaml index 331f901f..7a8d56bc 100644 --- a/deploy/local/docker-compose/xatu-server.yaml +++ b/deploy/local/docker-compose/xatu-server.yaml @@ -38,7 +38,7 @@ services: enabled: true # requires persistence to be enabled auth: enabled: false - secret: "super-secret-token" + # secret: "super-secret-token" nodeRecord: maxQueueSize: 51200 batchTimeout: 5s @@ -48,27 +48,27 @@ services: enabled: true clientNameSalt: "example_salt" authorization: - enabled: false - groups: - default: - obscureClientNames: true - users: - user_a: - password: password - shane: - password: warne - restricted: - eventFilter: - eventNames: - - BEACON_API_ETH_V2_BEACON_BLOCK_V2 - - BEACON_API_ETH_V1_EVENTS_BLOB_SIDECAR - - BEACON_API_ETH_V1_EVENTS_BLOCK_V2 - - BEACON_API_ETH_V1_EVENTS_CHAIN_REORG_V2 - - BEACON_API_ETH_V1_EVENTS_FINALIZED_CHECKPOINT_V2 - - BEACON_API_ETH_V1_EVENTS_HEAD_V2 - users: - user_b: - password: password + # enabled: false + # groups: + # default: + # obscureClientNames: true + # users: + # user_a: + # password: password + # shane: + # password: warne + # restricted: + # eventFilter: + # eventNames: + # - BEACON_API_ETH_V2_BEACON_BLOCK_V2 + # - BEACON_API_ETH_V1_EVENTS_BLOB_SIDECAR + # - BEACON_API_ETH_V1_EVENTS_BLOCK_V2 + # - BEACON_API_ETH_V1_EVENTS_CHAIN_REORG_V2 + # - BEACON_API_ETH_V1_EVENTS_FINALIZED_CHECKPOINT_V2 + # - BEACON_API_ETH_V1_EVENTS_HEAD_V2 + # users: + # user_b: + # password: password outputs: - name: general type: http diff --git a/docker-compose.yml b/docker-compose.yml index 6804546d..55ae76a1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -153,9 +153,9 @@ services: ports: - "${XATU_SERVER_ADDRESS:-0.0.0.0}:${XATU_SERVER_PORT:-8080}:8080" environment: - SERVER_EVENT_INGESTER_BASIC_AUTH_USERNAME: ${SERVER_EVENT_INGESTER_BASIC_AUTH_USERNAME:-xatu} - SERVER_EVENT_INGESTER_BASIC_AUTH_PASSWORD: ${SERVER_EVENT_INGESTER_BASIC_AUTH_PASSWORD:-example} - SERVER_COORDINATOR_AUTH_SECRET: ${SERVER_COORDINATOR_AUTH_SECRET:-super_secret} + # SERVER_EVENT_INGESTER_BASIC_AUTH_USERNAME: ${SERVER_EVENT_INGESTER_BASIC_AUTH_USERNAME:-xatu} + # SERVER_EVENT_INGESTER_BASIC_AUTH_PASSWORD: ${SERVER_EVENT_INGESTER_BASIC_AUTH_PASSWORD:-example} + # SERVER_COORDINATOR_AUTH_SECRET: ${SERVER_COORDINATOR_AUTH_SECRET:-super_secret} volumes: - ./deploy/local/docker-compose/xatu-server.yaml:/etc/xatu-server/config.yaml networks: @@ -539,10 +539,10 @@ services: context: . dockerfile: Dockerfile environment: + # Default + CANNON_XATU_COORDINATOR_AUTHORIZATION: ${CANNON_XATU_COORDINATOR_AUTHORIZATION:-Bearer super_secret} # Default of xatu:example - CANNON_XATU_COORDINATOR_AUTHORIZATION: ${CANNON_XATU_COORDINATOR_AUTHORIZATION:-"Bearer super_secret"} - # Default of xatu:example - CANNON_XATU_OUTPUT_AUTHORIZATION: ${CANNON_XATU_OUTPUT_AUTHORIZATION:-"Basic eGF0dTpleGFtcGxl"} + CANNON_XATU_OUTPUT_AUTHORIZATION: ${CANNON_XATU_OUTPUT_AUTHORIZATION:-Basic eGF0dTpleGFtcGxl} # Default of http://localhost:5052 CANNON_BEACON_NODE_URL: ${CANNON_BEACON_NODE_URL:-http://localhost:5052} volumes: diff --git a/pkg/cannon/cannon.go b/pkg/cannon/cannon.go index fe104aee..e4875fe6 100644 --- a/pkg/cannon/cannon.go +++ b/pkg/cannon/cannon.go @@ -124,6 +124,8 @@ func (c *Cannon) ApplyOverrideBeforeStartAfterCreation(ctx context.Context) erro return perrors.New("failed to assert xatu sink") } + c.log.WithField("sink_name", sink.Name()).Info("Overriding xatu output authorization") + xatuSink.SetAuthorization(c.overrides.XatuOutputAuth.Value) } }