-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Don't send the same parameters in query string and JWT for PAR request #360
Conversation
8f33b6a
to
8800d0b
Compare
8800d0b
to
7666426
Compare
@Stratus3D Thanks for the detailed look! ❤️ I'll have to make sure that the combination in this PR is correct by re-running the conformance tests. I'm however a bit busy at the moment and didn't have the time yet to have a look. I'll try to get this done until the end of the week. |
Sorry for the long wait. It passes certification. Merging as soon as CI passes. |
Merged manually in 3b0b522 |
@maennchen any idea when a new version of oidcc will be tagged that includes these changes? |
Once I get feedback on #359 (if that happens in a reasonable timeframe) |
… and JWT for redirect URL (erlef#360)" This reverts partially commit 3b0b522. This commit started to fail the OIDC conformance suite: https://gitlab.com/paulswartz/ueberauth_oidcc_certification/-/pipelines/1391557144 In particular, the error is: Required http request parameters and request object claims must match ``` Required parameter 'response_type' was not found in http request parameters Required parameter 'client_id' was not found in http request parameters ``` `redirect_url` does not appear to be required, so we continue to leave that out.
… and JWT for redirect URL (erlef#360)" This reverts partially commit 3b0b522. This commit started to fail the OIDC conformance suite: https://gitlab.com/paulswartz/ueberauth_oidcc_certification/-/pipelines/1391557144 In particular, the error is: Required http request parameters and request object claims must match ``` Required parameter 'response_type' was not found in http request parameters Required parameter 'client_id' was not found in http request parameters ``` `redirect_url` does not appear to be required, so we continue to leave that out.
… and JWT for redirect URL (#360)" (#375) This reverts partially commit 3b0b522. This commit started to fail the OIDC conformance suite: https://gitlab.com/paulswartz/ueberauth_oidcc_certification/-/pipelines/1391557144 In particular, the error is: Required http request parameters and request object claims must match ``` Required parameter 'response_type' was not found in http request parameters Required parameter 'client_id' was not found in http request parameters ``` `redirect_url` does not appear to be required, so we continue to leave that out.
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.