Skip to content
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

Add access token requirement for intented scope #2363

Open
TobiasAhnoff opened this issue Nov 9, 2024 · 5 comments
Open

Add access token requirement for intented scope #2363

TobiasAhnoff opened this issue Nov 9, 2024 · 5 comments
Assignees
Labels
V3 _5.0 - prep This needs to be addressed to prepare 5.0

Comments

@TobiasAhnoff
Copy link

TobiasAhnoff commented Nov 9, 2024

Add access token requirement to mitigate the risk of accepting tokens that was not intended to be valid for a particular service (API).

This is part of "cleaning up 3.5" see #1917 (comment)

Verify that the access token is intended for the service (API). For JWTs this can be achieved by validating the claims 'aud' and 'typ'. If audience is present, it must be validated to match against an allow list for the given API. If the typ claim is present, it should be equal to 'at-jwt'.

@elarlang
Copy link
Collaborator

elarlang commented Nov 9, 2024

If this requirement will be added as general requirement for tokens, we need to recheck OAuth-specific requirement:

V51.4.2 Verify that the resource server validates the access token to be made for that resource server (audience), for example by checking the 'aud' claim from the access token to be an expected value.

@elarlang
Copy link
Collaborator

elarlang commented Nov 10, 2024

To have an general requirement, we should not limit it to access tokens. It is required to check the aud for other tokens as well, at the moment the proposal seems unnecessary limitation. I think the outcome is part of spliting 3.5.6 to requirements "per task" #1967 (comment).

@elarlang elarlang added the _5.0 - prep This needs to be addressed to prepare 5.0 label Nov 10, 2024
@elarlang
Copy link
Collaborator

Are the title and proposal in conflict? scope vs audience?

@TobiasAhnoff
Copy link
Author

Yes, a better title would be "Add requirement to mitigate the risk of accepting tokens that was not intended to be valid for a particular service" and rewrite in a more general way, maybe like this

Verify that the token is intended for the service. For JWTs this can be achieved by validating the claims 'aud' and 'typ'. If audience is present, it must be validated to match against an allow list for the given API. If the typ claim is present and it is an access token, it should be equal to 'at-jwt'.

@elarlang
Copy link
Collaborator

I think the typ goes to the "intended usage" field and it is a separate topic than intended audience/service.

@elarlang elarlang removed the V51 Group issues related to OAuth label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V3 _5.0 - prep This needs to be addressed to prepare 5.0
Projects
None yet
Development

No branches or pull requests

2 participants