-
Bug
-
Resolution: Done
-
Undefined
-
None
-
False
-
-
False
-
-
Before reporting an issue
[X] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
oidc
Describe the bug
Endpoint POST http://keycloak.local/realms/myrealm/protocol/openid-connect/ext/par/request does not authenticate (returns 401) with client_secret_jwt when client_assertion and request keys are provided.
I.e. not compliant with OpenID Connect PAR specs and PAR's RFC-9126
Version
26.0.2
Regression
[ ] The issue is a regression
Expected behavior
A POST to http://keycloak.local/realms/myrealm/protocol/openid-connect/ext/par/request should return 201 with similar (values may vary) body response
```
{
"request_uri": "urn:ietf:params:oauth:request_uri:2277ae07-1bd1-4d43-84dc-2adb1680a016",
"expires_in": 60
}
```
when valid request, client_assertion, client_assertion_type, scope, response_type and client_id are provided.
Actual behavior
Keycloak does not authenticate ANY request to http://keycloak.local/realms/myrealm/protocol/openid-connect/ext/par/request when valid request, client_assertion, client_assertion_type, scope, response_type and client_id are provided. Instead it returns:
```
status: 401
resp body:
{
"error": "invalid_request",
"error_description": "Authentication failed."
}
```
How to Reproduce?
With any realm and client:
Perform a POST to endpoint /realms/myrealm/protocol/openid-connect/ext/par/request with content type as x-www-form-urlencoded and form with the following keys (defined in the Pushed Authorization Requests RFC) with valid values:
request, client_assertion, client_assertion_type, scope, response_type and client_id
Anything else?
All the calls were done based on RFC 9126 which refers to the Pushed Authorization Requests and OpenID Client Authentication specification.
- links to