Skip to content

Commit

Permalink
refactor: Comment out unused authorization settings
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Oct 11, 2024
1 parent 36371c2 commit 9a8c076
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 28 deletions.
44 changes: 22 additions & 22 deletions deploy/local/docker-compose/xatu-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions pkg/cannon/cannon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 9a8c076

Please sign in to comment.