hydra icon indicating copy to clipboard operation
hydra copied to clipboard

Bundle request parameters into access token in "client_credentials" flow

Open alikic opened this issue 2 years ago • 0 comments

Preflight checklist

Describe your problem

I am looking into "client_credentials" flow and ways to limit the validity of access token to only certain contexts. The context cannot be sufficiently described by scopes, audiences, etc. It seems to me that the only solution is to let client dynamically add claims (which describe the context) to access token. From the protocol prospective, looking at https://datatracker.ietf.org/doc/html/rfc6749#section-8.2, it seems to be permissible - client could add extra parameters to request, and the server would add them to access token. Server configuration would need to have a list of valid request parameters that can go into access token, for sanitizing requests. Does this make sense to you?

Describe your ideal solution

Let hydra take agreed upon request parameters, per https://datatracker.ietf.org/doc/html/rfc6749#section-8.2, and add them to access token. Server configuration would have a list of allowed request parameters that can go into access token, for sanitizing requests.

Workarounds or alternatives

I cannot think of any.

Version

master

Additional Context

This seems to be closely related to https://github.com/ory/hydra/issues/1748.

alikic avatar Jul 20 '22 12:07 alikic