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

New CS proposal: OAuth 2.0 Cheatsheet #1168

Open
csfreak92 opened this issue Jul 11, 2023 · 11 comments
Open

New CS proposal: OAuth 2.0 Cheatsheet #1168

csfreak92 opened this issue Jul 11, 2023 · 11 comments
Labels
ACK_WAITING Issue waiting acknowledgement from core team before to start the work to fix it. HELP_WANTED Issue for which help is wanted to do the job. NEW_CS Issue about the creation of a new cheat sheet.

Comments

@csfreak92
Copy link
Contributor

What is the proposed Cheat Sheet about?

As suggested by my conversations with the OWASP ASVS leaders, my proposals for ASVS requirements were too detailed (as they were taken straight from the official RFC), they suggested me to trim the ASVS requirements down but since my work on the detailed OAuth 2.0 requirements would go to waste, they suggested me to open an issue about adding it to the OWASP cheatsheets, hence this issue proposal.

Reference: OWASP/ASVS#996

What security issues are commonly encountered related to this area?

Authorization and Authentication vulnerabilities in web apps, mobile apps and APIs.

What is the objective of the Cheat Sheet?

To provide a detailed information about OAuth 2.0 and its implementation.

What other resources exist in this area?

OWASP ASVS

@csfreak92 csfreak92 added ACK_WAITING Issue waiting acknowledgement from core team before to start the work to fix it. HELP_WANTED Issue for which help is wanted to do the job. NEW_CS Issue about the creation of a new cheat sheet. labels Jul 11, 2023
@szh
Copy link
Collaborator

szh commented Jul 11, 2023

This sounds like a good candidate to me. Anyone have deep knowledge on this and willing to be a reviewer?

@mademarc
Copy link

mademarc commented Aug 3, 2023

Hey @szh Can i help out in reviewing this issue? i would like to contribute :)

@szh
Copy link
Collaborator

szh commented Aug 3, 2023

I can help review but I'm by no means an expert so I shouldn't be the only one.

@jmanico
Copy link
Member

jmanico commented Aug 4, 2023

OAuth is really tough - all reviews are helpful!

@csfreak92
Copy link
Contributor Author

@szh, if this is an acceptable cheatsheet proposal, shall I start a PR for a draft I have?

@szh
Copy link
Collaborator

szh commented Aug 6, 2023

Yes please, go ahead!

@mackowski
Copy link
Collaborator

@csfreak92 any updates on that?

@mademarc
Copy link

Hey all after look at this documents for this issue i have come up with some points in order to help everyone here:

Control Proposal Consideration

I kinda carefully reviewed the reference to OWASP/ASVS#996, where the need for a control to validate incoming HTTP requests in an API endpoint, specifically within the context of refreshing access and refresh tokens, is discussed. This proposal aligns well with the overall goal of reinforcing security measures in OAuth 2.0 implementations.

Proposed Control Details
The suggested control entails validating incoming HTTP requests, specifically for the refresh token endpoint, to ensure the correct format and parameters. This validation, encompassing both the URL and request body, is crucial to prevent scenarios where malformed or missing requests may still be accepted, leading to potential security vulnerabilities.

Rationale
the rationale behind this control is compelling, especially considering scenarios where compromised accounts could potentially prolong their usage due to inadequate request validation. While this may not be a prevalent design approach, incorporating such controls in the cheatsheet could serve as a valuable reference for developers aiming to bolster the security posture of their OAuth 2.0 implementations.

### Inclusion in OAuth 2.0 Cheatsheet Proposal (#1168)

So considering the significance of the proposed control, I recommend exploring its inclusion in the OAuth 2.0 Cheatsheet (#1168) under the appropriate section, possibly v3.5 Token-based Session Management. This addition would contribute to the cheatsheet's goal of providing comprehensive information on OAuth 2.0 and its implementation, particularly in addressing authorization and authentication vulnerabilities

### Next Steps

I personally encourage further community discussion on this matter to gather diverse perspectives. If you all could initiate a conversation within the OWASP community or cheatsheet maintainers regarding the proposed control, we can collaboratively assess its risk level and its alignment with the OAuth 2.0 Cheatsheet objectives.

If this sounds like a plan of action please comment and lets get to it :)

@csfreak92
Copy link
Contributor Author

Ooops @mackowski, I just realized the first Pull Request I made is just for my own fork... how silly. I created a new PR for the master branch. This is my initial draft, maybe you could take a look?

@jmanico
Copy link
Member

jmanico commented Nov 27, 2023 via email

@csfreak92
Copy link
Contributor Author

Hey all after look at this documents for this issue i have come up with some points in order to help everyone here:

If this sounds like a plan of action please comment and lets get to it :)

@mademarc, noted and will adjust my cheatsheet proposal as I see fit. Take note that's a draft for now. I have parallel requirements for ASVS v 5.0 that is in-line with this, so I am working on both side-by-side as well to reflect the latest changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ACK_WAITING Issue waiting acknowledgement from core team before to start the work to fix it. HELP_WANTED Issue for which help is wanted to do the job. NEW_CS Issue about the creation of a new cheat sheet.
Projects
None yet
Development

No branches or pull requests

5 participants