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

feat: algorithm to initial keys #248

Merged
merged 5 commits into from
May 9, 2022
Merged

Conversation

ybelMekk
Copy link
Contributor

@ybelMekk ybelMekk commented May 7, 2022

No description provided.

@ybelMekk ybelMekk requested a review from a team as a code owner May 7, 2022 09:39
@ybelMekk ybelMekk added the enhancement New feature or request label May 7, 2022
@ybelMekk ybelMekk linked an issue May 7, 2022 that may be closed by this pull request
@ybelMekk ybelMekk requested a review from tommytroen May 7, 2022 11:53
@loosebazooka
Copy link

It looks like this doesn't affect the keys being pulled in via the initial keys file? Those are parsed directly in https://github.com/navikt/mock-oauth2-server/blob/master/src/main/kotlin/no/nav/security/mock/oauth2/token/KeyProvider.kt#L57

Do the init key files need to have the algorithm in them?
mock-oauth2-server-keys.json
mock-oauth2-server-keys-ec.json

@loosebazooka
Copy link

Adding those into the json files seems to work for me, but I don't fully comprehend the consequence of that or if all the RSA keys in there are actually RS256, and the EC ones are ES256?

@ybelMekk
Copy link
Contributor Author

ybelMekk commented May 7, 2022

😅 I forgot about the files.. but yes, should be ok, adding some!

@ybelMekk
Copy link
Contributor Author

ybelMekk commented May 7, 2022

Adding those into the json files seems to work for me, but I don't fully comprehend the consequence of that or if all the RSA keys in there are actually RS256, and the EC ones are ES256?

yes. simple as that.

It seems like position of "alg" in the jwk mathers for nimbus to be able parse the key properly.

Should be ok now @loosebazooka

👍🏾

@loosebazooka
Copy link

I'll try it out!

Copy link

@loosebazooka loosebazooka left a comment

Choose a reason for hiding this comment

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

lgtm, works in my tests :D

@ybelMekk
Copy link
Contributor Author

ybelMekk commented May 7, 2022

lgtm, works in my tests :D

Great!

🚢 it

@ybelMekk ybelMekk changed the title feat: algorithm in initial keys feat: algorithm to initial keys May 8, 2022
Copy link
Collaborator

@tommytroen tommytroen 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 merged commit 7b9c4de into master May 9, 2022
@ybelMekk ybelMekk deleted the add-algorithm-to-initialkeys branch May 9, 2022 13:46
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.

Add alg parameter to initial keys
3 participants