Closed sozkan closed 5 years ago
@selfissued, this pull request is related to https://github.com/openid-certification/oidctest/issues/142 and your inputs would be appreciated :
Before this code change, when OP configuration contained only private_key_jwt under token_endpoint_auth_methods_supported, many tests would fail because oidctest would default to client_secret_basic in many cases, without taking token_endpoint_auth_methods_supported into account. This pull request will change this behavior.
In my opinion, if you only support private_key_jwt then you should not be required to support client_secret_basic because the spec (section 2.3.1 of RFC 6749) reads :
The authorization server MUST support the HTTP Basic authentication scheme for authenticating clients that were issued a client password.
So if you are not issuing any secrets then you should not need to support client secret basic to be compliant. Is my understanding correct? After this code change an OP that only supports private_key_jwt token endpoint auth method will be able to pass certification tests.
@rohe let's wait for @selfissued 's feedback before merging code changes.
If the OP supports private_key_jwt, it had to have given the client a secret:
client_secret_jwtClients that have received a client_secretvalue from the Authorization Server create a JWT using an HMAC SHA algorithm, such as HMAC SHA-256.
Therefore, the OP must also support HTTP basic auth and form post with that secret, not just as a signed JWT.
@travisspencer why does the OP have to give a secret to a client that is going to use private_key_jwt?
If the OP supported client_secret_jwt then you would be right, but my question is about an OP that only supports private_key_jwt which does not require client secrets.
Ah, no. You're right, Özkan. I conflated client_secret_jwt and private_key_jwt in mind even as I read one and typed the other. If the OP only supports private_key_jwt, then I agree that no secrets are given to a client and the OP shouldn't have to support basic auth or form post auth. If your PR makes that use case possible to certify, it seems like a good one IMO.
What's proposed for oidctest/op/oper.py around line 146 is I think already done in pyoidc. So, I don't think it has to be redone here. Similar argumentation for the proposal around line 219. pyoidc should do this for you !
It doesn't work without these changes so I don't think pyoidc is doing it for us.
If this isn't the case then pyoidc should probably be fixed.
So how do you want to do this? Do you want to cancel this pull request and fix it in pyoidc?
On 13 Jan 2019, at 11:06, Serkan Özkan notifications@github.com wrote:
What's proposed for oidctest/op/oper.py around line 146 is I think already done in pyoidc. So, I don't think it has to be redone here. Similar argumentation for the proposal around line 219. pyoidc should do this for you !
It doesn't work without these changes so I don't think pyoidc is doing it for us.
OK If this isn't the case then pyoidc should probably be fixed.
So how do you want to do this? Do you want to cancel this pull request and fix it in pyoidc?
The quick fix I guess is to go with the PR and then look at why pyOIDC doesn’t do it. So I’ll accept the PR.
— Roland
It is curious that physical courage should be so common in the world, and moral courage so rare. -Mark Twain, author and humorist (30 Nov 1835-1910)
I added checks to make sure that a mutually supported token endpoint authn method is used. Also updated some test flows and added checks to make sure that the required client authentication method is supported.
OP-ClientAuth-Basic-Static and OP-ClientAuth-Basic-Dynamic now return PARTIAL_RESULT with "No support for: token_endpoint_auth_methods_supported=client_secret_basic" error when client_secret_basic method is not supported. We should clarify if they should return a failure or not.
How I tested it :
Before this change when the OP does not support client_secret_basic, many tests, for example OP-ClientAuth-Any-Dynamic fail with an error similar to the following :
Before this change, an OP which only supports private_key_jwt method would not be able to pass conformance tests.