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

Feature request: implement kid checking to authentication request validation #23

Open
klaalo opened this issue May 31, 2019 · 2 comments

Comments

@klaalo
Copy link

klaalo commented May 31, 2019

Apparently the extension does not currently check for the kid value on request object header, but iterates all keys in the keyset. According to the core (10.1.1):

The signer publishes its keys in a JWK Set at its jwks_uri location and includes the kid of the signing key in the JOSE Header of each message to indicate to the verifier which key is to be used to validate the signature

Please, would it be possible to consider implementing the core kind of way and using the JOSE Header kid value in selecting the key to validate the signature?

@jalauros
Copy link
Contributor

jalauros commented Jun 6, 2019

That chapter describes how OP may retrieve a new keyset after noticing a new kid value (i.e. key containing the kid not found in the cached keyset) indicating that there may have been a key rollover. That chapter does not say OP should not iterate suitable keys (sig/enc) of the keyset when trying to validate the JWT.

I actually tried to locate from the specs if our approach of trying each suitable key found from RP's keyset is blatantly wrong but could not found such. All I found was

https://tools.ietf.org/html/rfc7515#section-6
https://tools.ietf.org/html/rfc7515#appendix-D

that to me suggests it is not. That said, it still makes sense to use the kid to pick the correct key based on the kid value.

@klaalo
Copy link
Author

klaalo commented Jun 6, 2019

Well, now that you mention it and to be frank, the actual requirement in this case comes from the Finnish Trust Network requirements (213/2018 S) in section 3.2.1. I will not link it here since those who are interested can find it. I even will not comment my own opinion about the specification.

I can now see that you are correct. Originally this wasn't very detailed request at all. The key exchange and key selection really does need some more thinking in the FTN and that has been communicated quite strong to respective stakeholders.

However, I wanted to relay you the worries that our partners have conveyed to us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants