diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 17:22:44 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 17:22:44 +0900 |
| commit | 4e6ae373b6abc7ef0d5fb810385d14250757f3f1 (patch) | |
| tree | a26fa4465308fe3996b4a8b91aead9132c899941 /services | |
| parent | 538749d0daa43ec94c48cdf35110d19c39e3c896 (diff) | |
feat(security): add bearer token auth for health/metrics endpoints
Diffstat (limited to 'services')
4 files changed, 4 insertions, 4 deletions
diff --git a/services/data-collector/src/data_collector/main.py b/services/data-collector/src/data_collector/main.py index 170e8b1..81e13df 100644 --- a/services/data-collector/src/data_collector/main.py +++ b/services/data-collector/src/data_collector/main.py @@ -49,7 +49,7 @@ async def run() -> None: on_candle=on_candle, ) - health = HealthCheckServer("data-collector", port=config.health_port) + health = HealthCheckServer("data-collector", port=config.health_port, auth_token=config.metrics_auth_token) health.register_check("redis", broker.ping) await health.start() metrics.service_up.labels(service="data-collector").set(1) diff --git a/services/order-executor/src/order_executor/main.py b/services/order-executor/src/order_executor/main.py index ab6ef4f..0198f65 100644 --- a/services/order-executor/src/order_executor/main.py +++ b/services/order-executor/src/order_executor/main.py @@ -57,7 +57,7 @@ async def run() -> None: last_id = "$" stream = "signals" - health = HealthCheckServer("order-executor", port=config.health_port + 2) + health = HealthCheckServer("order-executor", port=config.health_port + 2, auth_token=config.metrics_auth_token) health.register_check("redis", broker.ping) await health.start() metrics.service_up.labels(service="order-executor").set(1) diff --git a/services/portfolio-manager/src/portfolio_manager/main.py b/services/portfolio-manager/src/portfolio_manager/main.py index 02df5d2..be29a2f 100644 --- a/services/portfolio-manager/src/portfolio_manager/main.py +++ b/services/portfolio-manager/src/portfolio_manager/main.py @@ -63,7 +63,7 @@ async def run() -> None: broker = RedisBroker(config.redis_url) tracker = PortfolioTracker() - health = HealthCheckServer("portfolio-manager", port=config.health_port + 3) + health = HealthCheckServer("portfolio-manager", port=config.health_port + 3, auth_token=config.metrics_auth_token) health.register_check("redis", broker.ping) await health.start() metrics.service_up.labels(service="portfolio-manager").set(1) diff --git a/services/strategy-engine/src/strategy_engine/main.py b/services/strategy-engine/src/strategy_engine/main.py index 53681d1..fabd755 100644 --- a/services/strategy-engine/src/strategy_engine/main.py +++ b/services/strategy-engine/src/strategy_engine/main.py @@ -43,7 +43,7 @@ async def run() -> None: engine = StrategyEngine(broker=broker, strategies=strategies) - health = HealthCheckServer("strategy-engine", port=config.health_port + 1) + health = HealthCheckServer("strategy-engine", port=config.health_port + 1, auth_token=config.metrics_auth_token) health.register_check("redis", broker.ping) await health.start() metrics.service_up.labels(service="strategy-engine").set(1) |
