Don't send the same parameters in query string and JWT for PAR request #360
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I tried using version 3.2.0 of this library along with oidcc_plug to authenticate my users via Okta and got the following error when the library would send the PAR to Okta:
At first I was confused because I didn't see any duplicate parameters. In the query string I had:
client_id
,client_secret
,redirect_uri
,request
,response_type
,scope
.And the JWT there was:
aud
,client_id
,code_challenge
,code_challenge_method
,exp
,iat
,iss
,jti
,nbf
,nonce
,redirect_uri
,response_type
,scope
.No duplicates in either list.
Then I read OAuth 2.0 Pushed Authorization Requests - RFC-9126 section 3:
So at the very least the query string parameters must be a subset of the fields in the JWT.
Then I looked at the OpenID Connect spec:
I'm not familiar with the "OAuth 2.0 request syntax", but this leads me to believe that if a field is present in both the request JWT and the query string the query string parameter is ignored. If that is the case it can be omitted from the query string. However, it appears the
scope
parameter may always be required:The changes in this PR allow me to send requests to Okta that it accepts as valid. I'm new to the the OIDC spec so I can't say if this is a bug with Okta or this library.