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

V51 OAuth: Add resource server verifications (modify 51.4.1) #2045

Closed
TobiasAhnoff opened this issue Aug 31, 2024 · 7 comments
Closed

V51 OAuth: Add resource server verifications (modify 51.4.1) #2045

TobiasAhnoff opened this issue Aug 31, 2024 · 7 comments
Assignees
Labels
1) Discussion ongoing Issue is opened and assigned but no clear proposal yet 2) Awaiting response Awaiting a response from the original poster 4) proposal for review Issue contains clear proposal for add/change something V51 Group issues related to OAuth _5.0 - prep This needs to be addressed to prepare 5.0

Comments

@TobiasAhnoff
Copy link

TobiasAhnoff commented Aug 31, 2024

It is suggested to modify 51.3.1 and split in two verifications, one for all levels and one for L3 only, since sender-constrained access tokens are only a requirement in security profiles like FAPI and it is uncommon for L2 application to implement this.

V51.4 Resource Server

Verify that if that if the client sends an sender-constrained access token, using Mutual TLS for OAuth 2 or OAuth 2 DPoP, then the Resource Server must verify accordingly (proof-of-possession). (L1, L2, L3)

Verify that all Resource Servers requests requires sender-constrained access token validation using Mutual TLS for OAuth 2 or OAuth 2 DPoP. (L3)

@elarlang elarlang added the V51 Group issues related to OAuth label Aug 31, 2024
@TobiasAhnoff TobiasAhnoff changed the title V5.1 OAuth: Add resource server verifications V5.1 OAuth: Add resource server verifications (modify 51.3.1) Sep 1, 2024
@tghosth tghosth added 1) Discussion ongoing Issue is opened and assigned but no clear proposal yet _5.0 - prep This needs to be addressed to prepare 5.0 labels Sep 2, 2024
@elarlang elarlang changed the title V5.1 OAuth: Add resource server verifications (modify 51.3.1) V51 OAuth: Add resource server verifications (modify 51.3.1) Sep 10, 2024
@elarlang
Copy link
Collaborator

What is the security risk to solve or attack to take down with those requirements? By current wording, those are resource server functionality testing.

@elarlang elarlang added the 2) Awaiting response Awaiting a response from the original poster label Sep 13, 2024
@TobiasAhnoff
Copy link
Author

The sender-constrained access tokens mitigates the risk with "token theft", where an attacker is able to get a valid token, perhaps from logs or leaked in some way to other services (where the attacker have access), see e g https://www.rfc-editor.org/rfc/rfc8705.html#name-introduction

Binding an access token to the client's certificate prevents the use of stolen access tokens or replay of access tokens by unauthorized parties.

Maybe it is better to use that, something like this, perhaps a bit long?

Verify that the Resource Server prevents the use of stolen access tokens or replay of access tokens (from unauthorized parties) by requiring sender-constrained access tokens, given that client resource requests are made using either Mutual TLS for OAuth 2 or OAuth 2 DPoP. Note that for L3 sender-constrained tokens should be required, while L1 and L2 can support only Bearer tokens.

@elarlang
Copy link
Collaborator

It covers both initially proposed requirements?

I think the last "Note" part is not necessary, if the requirement is made for "Level 3", it gives that meaning anyway.

@TobiasAhnoff
Copy link
Author

Yes, this could be for L3 only, then it could be written as:

Verify that the Resource Server prevents the use of stolen access tokens or replay of access tokens (from unauthorized parties) by requiring sender-constrained access tokens, either Mutual TLS for OAuth 2 or OAuth 2 DPoP.

@elarlang elarlang changed the title V51 OAuth: Add resource server verifications (modify 51.3.1) V51 OAuth: Add resource server verifications (modify 51.4.1) Sep 20, 2024
@elarlang
Copy link
Collaborator

elarlang commented Oct 5, 2024

Currently, we have 51.4.1 as a Level 1 requirement.

V51.4.1 Verify that resource servers implement sender-constrained access token mechanisms to mitigate token replay risks. This is achieved by mandating Mutual TLS for OAuth 2.0 or OAuth Demonstration of Proof of Possession (DPoP), using the client secret provided at client registration.

The initial proposal was to split it, but the latest proposal is to replace it with one level 3 requirement:

Verify that the Resource Server prevents the use of stolen access tokens or replay of access tokens (from unauthorized parties) by requiring sender-constrained access tokens, either Mutual TLS for OAuth 2 or OAuth 2 DPoP.

@TobiasAhnoff - do I understand it correctly?

ping @randomstuff for opinions and feedback

@elarlang elarlang added the 4) proposal for review Issue contains clear proposal for add/change something label Oct 9, 2024
@TobiasAhnoff
Copy link
Author

do I understand it correctly?

Yes!

@elarlang
Copy link
Collaborator

elarlang commented Oct 10, 2024

Is is updated now via #2135

# Description L1 L2 L3
51.4.1 [ADDED] Verify that the resource server prevents the use of stolen access tokens or replay of access tokens (from unauthorized parties) by requiring sender-constrained access tokens, either Mutual TLS for OAuth 2 or OAuth 2 Demonstration of Proof of Possession (DPoP).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1) Discussion ongoing Issue is opened and assigned but no clear proposal yet 2) Awaiting response Awaiting a response from the original poster 4) proposal for review Issue contains clear proposal for add/change something V51 Group issues related to OAuth _5.0 - prep This needs to be addressed to prepare 5.0
Projects
None yet
Development

No branches or pull requests

3 participants