Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,16 @@ The gateway emits one ECS-formatted JSON completion event per exchange. It conta

## Gateway Authorization And Environment Promotion

The gateway is an internal Kubernetes `ClusterIP` Service in SIT. When `gateway.security.enabled` is true, it validates JWTs and enforces these scopes:
The gateway is an internal Kubernetes `ClusterIP` Service in SIT. Authentication is enabled by default and validates JWTs before enforcing these scopes. A local test must explicitly set `GATEWAY_SECURITY_ENABLED=false` to use the bypass configuration; do not use that bypass in a deployed environment.

- `admin.internal` for `/admin/**` and centralized API documentation.
- `mfa.internal` for `/api/v1/mfa/**`.
- `transaction.internal` for `/internal/v1/transfer-workflows/**`.
- `transfer.internal` for `/internal/v1/transfer-workflows/**`.
- `payment.internal` for `/internal/v1/payment-instructions/**`.

Customer and account APIs require an authenticated token. Health endpoints and Auth login remain public. Requests that do not authenticate receive `401` Problem Details; authenticated requests without the required scope receive `403` Problem Details.

SIT uses a base64-encoded HMAC secret supplied through the Kubernetes `auth-service-secrets` Secret. UAT and PROD should use the same application contract with an AWS-managed secret or an OIDC/JWK issuer; no token secret belongs in Git. The chart keeps security disabled by default outside an explicitly enabled environment.
SIT uses a base64-encoded HMAC secret supplied through the Kubernetes `auth-service-secrets` Secret. UAT and PROD should use the same application contract with an AWS-managed secret or an OIDC/JWK issuer; no token secret belongs in Git. The chart fails closed by default when an environment does not provide an explicit security override.

Circuit breaking and safe-read retries are independent availability controls. They do not replace service authorization, idempotency keys, transactional guarantees, or audit controls.

Expand Down
2 changes: 1 addition & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runtime:
configServerUrl: http://config-server:8888

security:
enabled: false
enabled: true
secretName: auth-service-secrets
secretKey: jwt-secret

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.springframework.security.web.server.SecurityWebFilterChain;

@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(name = "gateway.security.enabled", havingValue = "false", matchIfMissing = true)
@ConditionalOnProperty(name = "gateway.security.enabled", havingValue = "false")
class GatewaySecurityDisabledConfiguration {

@Bean
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ spring:

gateway:
security:
enabled: ${GATEWAY_SECURITY_ENABLED:false}
# Authentication is fail-closed. Tests that need the bypass must opt in.
enabled: ${GATEWAY_SECURITY_ENABLED:true}
rate-limit:
trusted-proxies: []
resilience:
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Test contexts must opt into the unauthenticated harness explicitly.
gateway.security.enabled=false
Loading