JWT audience validation disabled — cross-app token reuse #57

Closed
opened 2026-03-30 13:28:52 +00:00 by sharang · 1 comment
Owner

auth_middleware.rs sets validate_aud = false. Any valid JWT from the same Keycloak realm (even for other apps) gains full API access. Fix: Enable audience validation with the expected compliance-agent client ID.

auth_middleware.rs sets validate_aud = false. Any valid JWT from the same Keycloak realm (even for other apps) gains full API access. Fix: Enable audience validation with the expected compliance-agent client ID.
sharang added the securityv0.3.0critical labels 2026-03-30 13:28:52 +00:00
Author
Owner

Fixed on main. The audience defaults to the product key (KEYCLOAK_AUDIENCE, compliance-agent/src/config.rs), and validate_aud is only off when it is explicitly set empty. With APP_ENV=production the agent refuses to start with an empty audience (compliance-core/src/config.rs, fail-closed config, #292).

Fixed on main. The audience defaults to the product key (`KEYCLOAK_AUDIENCE`, `compliance-agent/src/config.rs`), and `validate_aud` is only off when it is explicitly set empty. With `APP_ENV=production` the agent refuses to start with an empty audience (`compliance-core/src/config.rs`, fail-closed config, #292).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: platform/pruefwerk#57