-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
JWT Authorized Presenter (azp) validation is too strict #231
JWT Authorized Presenter (azp) validation is too strict #231
Comments
These validations aren’t strict, thats how the spec is written, what google says in their docs is kinda irrelevant. What would you propose gets loosened? |
After reading relevant parts of the spec, it appears that the check in question is indeed mandated :
However, this raises the question : if multiple audiences can be provided, how are the others (the ones that are not The spec indeed considers cases where this is not the case, for instance:
This suggests that it should be possible to handle such tokens and consider them valid.
I was thinking of providing a way to tell |
the idea : svvac/node-openid-client@7c781d2 |
That won’t fly. That metadata object is only for registered iana parameters and i don’t intend to mix em up with proprietary configuration. I get the gist tho, when i have the time i’ll take a look at solving this. |
I'd like to help, if you have pointers for your preferred way of passing this kind of configuration. |
I’ll be happy to give you pointers for this when i’m done with my move next week. |
we're looking to add an additional parameter (an object so that we can add more of these in the future) to these methods
The following already has a last argument for these "options"
It boils down to extending the constructor and then just passing the extra from the other methods. |
Was the |
camelCase for these "extras" is better, the only snake_case present is for IANA registered parameters. |
And is the boolean value option necessary? To accept all? Why? |
It helps validating ID tokens in the case where you can't really know in advance all 3rd-party client IDs that might initiate the OIDC auth flow for logging into your service. In the case of Google's android app login flow, it can be useful if you wish to be able to roll out new apps without having to redeploy the server component. The responsibility of validating 3rd-party client IDs is thus delegated to the issuer. For instance, Google only allows this if the authorized presenter is in the same « project » as the target audience. |
I'd prefer to leave the "accept all" option out. All claims need to be validated to be expected values. "anything" isn't really validating. |
I see your point, though I'd like to point out that it forces unnecessary coupling between the client configuration and the issuer policy (i.e. is this client allowed to request login for that client) |
Currently, JWT validation throws if the authorized presenter (
azp
field) is not equal to theclient_id
(see here).However, according to Google's OIDC docs, it is specifically different from the
aud
(Audience) field if present (emphasis mine) :More specifically, it happens in Android mobile app authentication flow :
aud
set to the server's client_id andazp
to the app's client IDAFAICT, this auth flow is currently not possible with node-openid-client
The text was updated successfully, but these errors were encountered: