Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Username Remapping from idToken & Enforce Uppercase Group Names in OAuth2 Filter #409

Open
6 tasks
afabiani opened this issue Feb 12, 2025 · 0 comments
Assignees

Comments

@afabiani
Copy link
Member

We need to enhance our OAuth2 authentication filter with two new features to improve consistency and flexibility when processing identity tokens:

  1. Username Remapping:

    • When a valid idToken is provided that contains both a principal claim and a unique username claim, the filter should remap the incoming username (extracted from the principal claim) to the unique username.
    • This helps us ensure that users are created or looked up using a consistent unique identifier.
  2. Uppercase Group Names:

    • Introduce a new configuration parameter, groupNamesUppercase, which, when enabled, forces group names obtained from token claims to be stored and looked up in uppercase.
    • This avoids case sensitivity issues and duplicate groups (e.g., "admin" vs. "ADMIN").

Acceptance Criteria:

  • The OAuth2 filter must decode and validate the idToken only once and use that for remapping.
  • When groupNamesUppercase is set to true, groups from token claims should be normalized (converted to uppercase) before lookup or insertion.
  • Unit tests must cover:
    • The username remapping functionality.
    • The correct lookup, creation, and assignment of groups with uppercase names.
  • Documentation is updated with new configuration parameters and usage instructions.
@afabiani afabiani self-assigned this Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant