-
Notifications
You must be signed in to change notification settings - Fork 4
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
Set max_size for SignedJwt: App Store's notification token exceed 16k length #30
Comments
Thanks for the report. Indeed, token size is currently arbitrarily limited to 16kB to avoid crazily huge tokens and JSON deserialization issues. But I had in mind to allow bypassing that limit easily. A fix is on the way. |
Yeah, 16kB is fine for most of the scenarios, but Apple's JWT just huge. |
I am curious, what kind of stuff can they put in there? If you can paste such a token (with an altered signature) |
It's huge since it contains the public key in the headers, and in the payload, there is a huge data object contains two other JWTs: signedTransactionInfo and signedRenewalInfo.
PAYLOAD
|
jwskate
version:0.11.1Description
Thank you for making this awesome library. Love it so clean and pythonic. Just a question, should we have the max_size for initialize a SignedJwt object for handling some of the super big JWTs? Do we have any special concerns not to do that?
What I Did
I am dealing with App Store's notification v2, which includes a very long x509 header in the JWT. Once the JWT exceeds the length of 16k, the SignedJwt object wouldn't create and an exception was raised, suggesting "You can increase this limit by passing a different
max_size
value as parameter.". The base classes, Jwt and BaseCompactToken, have the argument to set the max_size for the init method, but SignedJwt doesn't inherit that.The text was updated successfully, but these errors were encountered: