-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
consent: Add ability to specify Access Token Audience #883
Comments
Actually, the audience should probably be defined by the client making the request, not the consent endpoint. |
How would you suggest to do that? Maybe using claims and setting value? |
Not sure yet, needs investigation |
So the proper course of action, to the best of my knowledge, is as follows:
|
Here's what I intend to add to the docs regarding this: AudienceThere are two types of audience concept in the context of OAuth 2.0 and OpenID Connect:
While modifying the audience of an ID Token is not desirable, specifying the audience of an OAuth 2.0 Access Token is. To use the audience feature, you must specify the intended audiences in the OAuth 2.0 Client's metadata on a per-client basis:
The audience is a list of case-sensitive URLs. URLs must not contain whitespaces. OAuth 2.0 Authorization Code, Implicit, Hybrid FlowsWhen performing an OAuth 2.0 authorize code, implicit, or hybrid flow, you can request audiences at the The
The requested audience from the query parameter is then part of the login and consent request payload as field
When introspecting the OAuth 2.0 Access Token, the response payload will include the audience:
OAuth 2.0 Client Credentials GrantWhen performing the client credentials grant, the audience parameter from the POST body of the |
While I don't necessarily have the best writing skills, I think this would be slightly more clear:
|
|
Not related IMHO
Not sure what you mean by that?
Depends on your understanding of audience. It can be user granted or defined per client. The audience is not officially specified nor is how you authorize audience. |
ok, i should have order 2. before 1. to make it clear, so let me explain that... Do you think that id token could be shared between clients from aud list? Otherwise bother putting list of aud into token, ok client can check if that is intended for him, but why put there other aud values? I could imagine situation where third parties share id token, that is signed and can be verified, and pass information about user among themselves that way. The open spec of aud explains rest. Thank you. |
Personally, I think it could be shared. However, this will not be addressed as part of this PR. The access token audience is the real deal, requests/use cases for oidc audience have not come up yet. |
Thank you @Aggouri for the correction, updated in the docs! |
OK, thanks for sharing. |
This patch adds the ability to whitelist and request an audience when performing any OAuth 2.0 Flow. The audience is useful in multi- tenant environments where access tokens should be restricted to certain resources. Closes #883 Closes #1144 Signed-off-by: arekkas <aeneas@ory.am> Signed-off-by: aeneasr <aeneas@ory.sh>
This patch adds the ability to whitelist and request an audience when performing any OAuth 2.0 Flow. The audience is useful in multi- tenant environments where access tokens should be restricted to certain resources. Closes #883 Closes #1144 Signed-off-by: arekkas <aeneas@ory.am> Signed-off-by: aeneasr <aeneas@ory.sh>
Was the wildcard part also implemented? Not finding anything in the documentation about this. |
Currently, the audience of the ID Token is set explicitly in the oauth2 handler:
and the audience of the access token is set by the extra session. Instead, the audience should be a first-class citizen of the consent flow/responses for both ID and access token.
The text was updated successfully, but these errors were encountered: