token
endpoint with grant_type
urn:ietf:params:oauth:grant-type:jwt-bearer
fails to work without client_id
#3903
Labels
bug
Something is not working.
Preflight checklist
Ory Network Project
No response
Describe the bug
Given an issuer trust relationship, the token endpoint seems to require
client_id
of a valid client to actually work with thejwt-bearer
grant type. This seems to go against the docs on https://www.ory.sh/docs/hydra/guides/jwt as well as RFC.Did I misunderstand how that features should be used?
From the RFC7523
2.1. Using JWTs as Authorization Grants
To use a Bearer JWT as an authorization grant, the client uses an
access token request as defined in Section 4 of the OAuth Assertion
Framework [RFC7521] with the following specific parameter values and
encodings.
The value of the "grant_type" is "urn:ietf:params:oauth:grant-
type:jwt-bearer".
The value of the "assertion" parameter MUST contain a single JWT.
The "scope" parameter may be used, as defined in the OAuth Assertion
Framework [RFC7521], to indicate the requested scope.
Authentication of the client is optional, as described in
Section 3.2.1 of OAuth 2.0 [RFC6749] and consequently, the
"client_id" is only needed when a form of client authentication that
relies on the parameter is used.
Reproducing the bug
Create issuer trust relationship
/admin/trust/grants/jwt-bearer/issuers
Exchange token
/oauth2/token
(urlencoding removed for report)It works when adding the
client_id
of a client with e.g.token_endpoint_auth_method
none
Relevant log output
No response
Relevant configuration
No response
Version
ory/hydra:v2.2.0
On which operating system are you observing this issue?
None
In which environment are you deploying?
Docker Compose
Additional Context
No response
The text was updated successfully, but these errors were encountered: