Files
computer-playbook/tests/integration/iam
kevinveenbirkenbachandClaude Opus 5 72a7f39505 fix(sso-proxy): restart the swarm sidecar when its rendered config changes
Snipe-IT#1 (run 34615516009, job 103327034508) failed every login in the
async pass with an oauth2-proxy 500. The sidecar log shows 24x "error
saving redis session: WRONGPASS invalid username-password pair". The swarm
matrix rotated 54 credentials before that pass, svc-db-redis re-rendered
its requirepass and redis_redis was recreated ("about an hour ago"), while
snipe-it_sso-proxy kept running from the first pass ("3 hours ago").

oauth2-proxy reads its config, redis password included, from a bind mount
at start. Its render task notifies compose-up, which in compose is
"compose up -d --force-recreate" and so recreates the sidecar, but in swarm
is "docker stack deploy", which only restarts a service whose spec changed.
A new file behind an unchanged bind mount is no spec change, so the sidecar
never read the rotated password. pihole#1 in the same run shows the compose
side: shared redis, 47 rotated values, the config re-rendered, compose up
recreated the sidecar, and the job passed.

The sidecar now carries a container label with the sha256 of its config,
rendered from the same template sso_proxy.yml writes, with
sso_proxy_application_id supplied through template_vars. A changed config
changes the label and with it the service spec, so stack deploy restarts
only the sidecar; an unchanged config keeps the hash and restarts nothing.
Compose behaviour is unchanged.

A guard test pins the label and requires it to hash the template
sso_proxy.yml renders; it fails against the previous template. The hash is
stable for equal input and changes with a rotated secret, checked with the
template lookup on ansible-core.

Not covered: other bind-mounted configs that embed rotated secrets have the
same swarm exposure.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 23:00:36 +02:00
..
…

Identity & Access Integration Tests 🔐

Integration tests for identity and access surfaces: OAuth2 / OIDC configuration invariants (mutual exclusion, ACL shape, proxy port allocation, RBAC group-path declarations) and password / secret quoting rules.

Each child directory pins one IAM surface; see the per-directory README for scope. Generic OIDC-redirect URI checks and domain rules live under meta/domains/; port allocations live under tests/integration/ports/ once introduced.

For framework and make test-integration usage see integration.md.