-
Notifications
You must be signed in to change notification settings - Fork 108
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
body and footer questions #83
Comments
As documented here, the body is encrypted for Local-scoped tokens means that the issuer is also the verifier, and you're storing encrypted data. Public-scoped tokens means that the issuer is a third party, and therefore the contents are only needed to be signed.
Yes.
Yes, it is always authenticated.
From the documentation:
If you want data to be unencrypted, but signed, in a local-only environment, you can dump everything in the footer and the payload can be empty.
For local tokens, it is included in the authentication tag attached to the ciphertext. For public tokens, it's included in the signature calculation. This prevents attacks based on footer truncation or malleability. However, beyond that, you can do whatever you want with it.
This was being documented in the RFC draft. The Markdown source is available online, but at some point the compiled .txt output was erroneously removed from the Git repository. (Note to self: Re-add this.) I've copied the table below in case the RFC changes so you can have a point-in-time copy for future reference:
We prefer ISO 8601 over UNIX Timestamps because of i18n and timezone issues.
See Was "Stateless Session Tokens" one of Paseto's Design Goals? from the documentation. |
Thanks for the answers.
Question 7 above was actually about stateful session tokens.
Why are local-scoped tokens always encrypted, and public-scoped tokens unencrypted? I also feel it would make more sense to call them symmetric and asymmetric tokens (ie:
Right now the body is JSON, while the footer is just whatever. Can I also suggest that those validated registered claims be allowed to appear in the footer instead of the body? thanks! |
Neither standard was designed for this use-case, and it's dangerous to use JWT this way. At least with PASETO you can reduce your risk to protocol vulnerabilities, but the fundamental lack of revocation is still a problem.
Because for a local-scoped token (i.e. the issuer is the verifier), where the end user is basically a data mule for an opaque ciphertext blob, it makes sense to encrypt. For claims signed by a third party, adding public-key encryption adds a ton of overhead to the protocol. How do you ensure the third-party uses the correct public key? Do you sign-then-encrypt, or encrypt-then-sign? If we wanted to solve the 100% problem, sure, we could bolt public-key encryption into the protocol, but almost nobody needs it. |
Public-key encryption is solved in PASERK. |
I became interested in your paseto standard after feeling a bit uneasy about JWT's, but I have a few questions and wasn't sure how else to ask but to make a github issue (feel free to add the answers to your documentation).
Is the body and its claims always encrypted? If not, when it is it not encrypted?
Is the footer always unencrypted?
Is the footer signed?
If you want the website frontend to see certain claims or data, would you advise putting that in a json objected in the footer, instead of into the body?
Is the footer validated against anything? Or is it just a grab bag of whatever I want to put in it, including nothing?
Which claims are "built into the standard" and are expected to be validated or read by the implementing libraries?
Should Paseto be used for sending session id's and non-confidential data about the user to the website frontend, to be stored in secure cookies? (ie: what most people use JWT's for)
The text was updated successfully, but these errors were encountered: