fix(auth): login 500 — DataProtection key ring on root-owned volume (#37)
CI / backend (push) Successful in 50s
CI / frontend (push) Successful in 11s
CI / format (push) Successful in 49s
CI / db-tests (push) Successful in 52s
Deploy Staging / deploy (push) Successful in 24s
CI / backend (pull_request) Successful in 53s
CI / frontend (pull_request) Successful in 12s
CI / format (pull_request) Successful in 52s
CI / db-tests (pull_request) Successful in 53s
Security / secrets (push) Successful in 4s
Security / dependencies (push) Successful in 59s
Security / sast (push) Successful in 37s
Security / secrets (pull_request) Successful in 3s
Security / dependencies (pull_request) Successful in 53s
Security / sast (pull_request) Successful in 34s
CI / backend (push) Successful in 50s
CI / frontend (push) Successful in 11s
CI / format (push) Successful in 49s
CI / db-tests (push) Successful in 52s
Deploy Staging / deploy (push) Successful in 24s
CI / backend (pull_request) Successful in 53s
CI / frontend (pull_request) Successful in 12s
CI / format (pull_request) Successful in 52s
CI / db-tests (pull_request) Successful in 53s
Security / secrets (push) Successful in 4s
Security / dependencies (push) Successful in 59s
Security / sast (push) Successful in 37s
Security / secrets (pull_request) Successful in 3s
Security / dependencies (pull_request) Successful in 53s
Security / sast (pull_request) Successful in 34s
This commit was merged in pull request #37.
This commit is contained in:
@@ -53,6 +53,16 @@ services:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
# One-shot: ensure the DataProtection 'keys' volume is owned by the API's non-root
|
||||
# 'app' user (uid 1654). A volume created by an older root-running image is root-owned,
|
||||
# which makes the app fail to read its key ring and 500s on login. Runs as root, chowns,
|
||||
# exits; the api waits for it. Idempotent and cheap.
|
||||
init-keys:
|
||||
image: busybox
|
||||
command: ["sh", "-c", "chown -R 1654:1654 /keys"]
|
||||
volumes:
|
||||
- keys:/keys
|
||||
|
||||
api:
|
||||
build:
|
||||
context: .
|
||||
@@ -79,6 +89,8 @@ services:
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
init-keys:
|
||||
condition: service_completed_successfully
|
||||
# V-08: bind to loopback so the API is not directly reachable from the network
|
||||
# (only via the frontend/nginx proxy over the internal compose network). This
|
||||
# prevents external clients from bypassing the proxy to spoof X-Forwarded-* headers.
|
||||
|
||||
Reference in New Issue
Block a user