Update Token Handling in auth-service for Organization Context #26

Open
opened 2025-06-03 22:56:19 +00:00 by abed.alrahman · 0 comments
Member

Goal: Ensure user's Keycloak Organization membership is included in tokens and propagated as custom headers by auth-service.
Brief Description:

Keycloak Configuration: Define and apply necessary mappers in Keycloak client scopes to include a user's Organization ID(s) and/or name(s) as a claim in the access token (e.g., an organization claim).
auth-service Update:
    Modify VerificationResponse DTO to include the new organization claim.
    Update the buildAuthHeaders helper method in AuthController to parse this claim and add it to a new custom header (e.g., X-User-Organization) that is forwarded to backend services.
    Ensure the X-User-Groups header continues to propagate Keycloak Group memberships (which might now represent departments/teams within an organization).
Goal: Ensure user's Keycloak Organization membership is included in tokens and propagated as custom headers by auth-service. Brief Description: Keycloak Configuration: Define and apply necessary mappers in Keycloak client scopes to include a user's Organization ID(s) and/or name(s) as a claim in the access token (e.g., an organization claim). auth-service Update: Modify VerificationResponse DTO to include the new organization claim. Update the buildAuthHeaders helper method in AuthController to parse this claim and add it to a new custom header (e.g., X-User-Organization) that is forwarded to backend services. Ensure the X-User-Groups header continues to propagate Keycloak Group memberships (which might now represent departments/teams within an organization).
abed.alrahman added this to the V.01 milestone 2025-06-04 10:22:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Depends on
#9 Design the Group/Tenant Feature
clevermicro/user-management
Reference: clevermicro/user-management#26
No description provided.