feat(oidc): make audience claim configurable via environment variable#687
Merged
feat(oidc): make audience claim configurable via environment variable#687
Conversation
Add OIDC_EXPECTED_AUDIENCE_CLAIM environment variable to configure the expected audience claim in JWT tokens. This replaces the hardcoded 'atlas-rucio-oidc-client' value with a configurable option. Changes: - Add oidcExpectedAudience() method to EnvConfigGateway with default 'rucio' - Update OIDC provider configuration to use audience from environment - Add JWT audience validation in auth callback (non-blocking warnings) - Set default to 'rucio' in env-generator, 'atlas-rucio-oidc-client' in dev template - Update documentation in README and env-generator README The validation logs warnings for mismatched audience claims but does not block authentication, ensuring backward compatibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the hardcoded OIDC audience value with a configurable
OIDC_EXPECTED_AUDIENCE_CLAIMenvironment variable.Changes
oidcExpectedAudience()method to EnvConfigGateway (defaults torucio)atlas-rucio-oidc-clientBackward Compatibility
rucioif not configuredruciodefault via env-generatorReviewer Checklist
Reviewer Checklist (Required)
Reviewer competence: I am sufficiently familiar with this domain/system to review this PR
(If not, a subject-matter expert has been involved.)
Problem fit: I understand the issue being addressed, and this PR solves the actual root problem
Solution quality: The approach is sound, maintainable, and appropriate for this codebase
Security: No new security risks are introduced
Backward compatibility & performance: No unintended breaking changes or unacceptable regressions
Documentation: Relevant documentation or comments are updated or explicitly not required
Approval Notes
Example guidance (not to be deleted):