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

Regex based matching in RequestMappingTokenCallback and request parameters used as variables inside claims #578

Merged

Conversation

kvokacka
Copy link
Contributor

  • RequestMapping.isMatch supports regex
  • RequestMappingTokenCallback.getClaims returns List instead of Set to preserve order from conf when looking for matching RequestMapping in RequestMappingTokenCallback.
  • request parameters can be used as variables inside claims

e.g.

"requestMappings": [
    {
        "requestParam": "audience",
        "match": "https://myapp.com/jwt/aud/.*",
        "claims": {
            "aud": "${audience}",
            "sub": "${clientId}"
        }
    },

will match request with parameter audience = https://myapp.com/jwt/aud/XXX and audience is returned as aud claim.

- RequestMapping.isMatch supports regex
- RequestMappingTokenCallback.getClaims returns List instead of Set to preserve order from conf when looking for matching RequestMapping in RequestMappingTokenCallback.
@kvokacka kvokacka requested a review from a team as a code owner October 29, 2023 13:25
@ybelMekk ybelMekk added the enhancement New feature or request label Oct 29, 2023
Copy link
Contributor

@ybelMekk ybelMekk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

@ybelMekk ybelMekk mentioned this pull request Oct 29, 2023
@ybelMekk
Copy link
Contributor

@tommytroen ? 🗡️

@ybelMekk ybelMekk linked an issue Oct 31, 2023 that may be closed by this pull request
@ybelMekk ybelMekk mentioned this pull request Nov 17, 2023
@ybelMekk
Copy link
Contributor

ybelMekk commented Nov 17, 2023

@tommytroen 😺

@ybelMekk ybelMekk linked an issue Nov 17, 2023 that may be closed by this pull request
@ybelMekk ybelMekk merged commit 4f1442d into navikt:master Nov 21, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request mapping order userinfo_endpoint
2 participants