feat(auth): map federated roles to tenant permissions - #365
Draft
seonghobae wants to merge 2 commits into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 11, 2026
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.
Objective
Advance issue #314 with a server-owned tenant/role authorization mapping stacked on #364. External role claims must not become arbitrary Clearfolio permissions: a deployment-controlled mapping fixes the tenant authority and translates only explicitly configured roles into internal permissions.
Test-first state
This Draft starts intentionally RED at test-only head
929f5b06e8dee2a1c1b966c86e22b6ceb91493c7.TenantRoleMappingPolicyTestrequires a defensive immutable role-to-permission policy, fixed tenant authority, union of only configured role permissions, and fail-closed handling of absent/malformed subjects, unmapped roles, or ambiguous server configuration. The productionTenantRoleMappingPolicytype does not exist at this head, so test compilation is expected to fail at that exact boundary.Stack and scope
Base is #364 (
feat/issuer-trust-policy-after-343-20260811) exact head06dcc78c747db02136adbec3b286de73badf829a, itself stacked on #343. This child adds only server-owned tenant/role authorization mapping and focused tests. It does not parse or verify JWTs, perform OIDC discovery/JWK retrieval, introspect opaque tokens, modifyTenantContext, change controllers, or migrate the current signed-HMAC adapter.Acceptance
Observe exact-head RED -> add the smallest mapping implementation -> exact-head Maven/coverage/Javadoc acceptance and directly emitted CI evidence. Keep Draft while #364/#343 are open. After ancestors integrate, reconcile this unique delta onto the new exact protected base and regenerate base-sensitive checks/reviews. Independent write-authorized approval remains a separate protected-merge gate.