-
Notifications
You must be signed in to change notification settings - Fork 4k
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: Javascript Object Signing and Encryption (JOSE) #1225
Comments
Can you please provide some example topics that you'd like to have added, that aren't already covered in the JWT cheat sheet? |
|
Cool, seems like a good idea. Any input from the other maintainers? |
I think this is a great idea!!
|
Alright then! @craigjbass do you want to take this on? |
@craigjbass do you want to work on this? |
I think I would be able to write something, but I would need some help! Some of the topics I want to cover, I'm not sure I know the answer to. |
The existing JWT Cheat Sheet primarily covers token security but does not address JWE in detail. While it discusses risks like weak secrets, revocation strategies, and hashing vulnerabilities, but it lacks: Encryption Methods: No guidance on encrypting JWTs using JWE. |
When using a JWT for session management I suggest not placing sensitive data in a JWT and therefor you do not need to encrypt it. If you want to talk about JWE, I would suggest a second concise cheatsheet. I see a lot of JWE used in the health industry. |
Yes new cheatsheet on JWE would be awesome! |
I’ve put together a detailed JWE Cheat Sheet, covering JWE structure, secure algorithm choices (AES-GCM, RSA-OAEP, ECDH-ES), key management best practices, implementation in Python & Java, hardening techniques, and common pitfalls. It also includes a JWE vs. PASETO comparison. Before raising a PR, I’d appreciate any technical feedback or improvements to ensure it aligns with OWASP standards. If everything looks good, I’m ready to submit the PR. Here’s the latest version: JWE Cheat Sheet Looking forward to your thoughts! 🚀 |
Please also take a look at https://github.com/OWASP/ASVS/blob/master/5.0/en/0x14-V6-Cryptography.md to make sure your work is in sync with ASVS |
Yes, JWE provides many very different key management methods. It is not easy to understand all the cases and know which combinations are interesting/safe to use. |
Wouldn't it be easier to use public key cryptography for internal services as well? It avoids the n×(n-1) key distribution problem if I have many services. Moreover it reduces the risk of the encryption secret (and therefore the JWT plaintext) being leaked. On the other hand, ECDH-ES might be vulnerable to quantum computers. Why would I use RSA-OAEP instead of ECDH-ES? The latter is faster at equivalent security level. If I use AES-256-GCM as a key management solution, should I use "direct" AES-256-GCM instead? If I use ECDH-ES, should I use ECDH-ES+A128KW and friends? (I think it is only useful if I want to support multi-recipient JWT). Also, why would I want to use PBES2?
This one is weird as all JWE encryption mechanisms ("enc") are actually AEADs.
The JWE is encrypted. Is it bad if I am storing it client-side? (Does this only apply to JWE which are actually JWTs?)
Why kind of nonce are we talking about? I don't think we want to do what I understand is said here.
These are more JWT concerns as well.
These ones are not complete at all :)
They should be base64urlencoded. Some missing bits:
|
What is missing is that |
I have carefully analyzed all the comments and taken them into account. Before making a draft PR, I will ensure that the sheet is refined to align with the highest standards, covering all necessary aspects comprehensively. |
I like your attitude! +100 |
What is the proposed Cheat Sheet about?
Javascript Object Signing and Encryption. In particular JWE.
What security issues are commonly encountered related to this area?
What is the objective of the Cheat Sheet?
To help people implement secure JWE implementations.
What other resources exist in this area?
Writing this because there seems to be very little guidance online, and some of it is contradictory.
The owasp cheatsheet has some guidance on best use of JWT (object signing) but no guidance on the usage of JWE.
The text was updated successfully, but these errors were encountered: