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

Fix username extraction on OIDC tokens with a group scope #951

Merged
merged 2 commits into from May 9, 2024

Conversation

yahavi
Copy link
Member

@yahavi yahavi commented May 9, 2024

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

Fix jfrog/setup-jfrog-cli#146.

Previously, we assumed all JWT tokens followed this subject structure:

jfac@<some-characters>/users/<user-name>

However, OIDC tokens with group scopes might follow this subject structure instead:

<provider-name>/<identity-mapping>

This structure can serve as a standard username.

@yahavi yahavi requested a review from eyalbe4 May 9, 2024 07:48
@yahavi yahavi self-assigned this May 9, 2024
@yahavi yahavi added bug Something isn't working safe to test Approve running integration tests on a pull request labels May 9, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label May 9, 2024
@yahavi yahavi requested a review from RobiNino May 9, 2024 07:49
auth/authutils_test.go Show resolved Hide resolved
@yahavi yahavi merged commit 62649bc into jfrog:dev May 9, 2024
3 of 4 checks passed
@yahavi yahavi deleted the token-without-prefix branch May 9, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants