[DX-1489] Fix embedded-token JWT requirements on the token auth page#3457
Open
umair-ably wants to merge 3 commits into
Open
[DX-1489] Fix embedded-token JWT requirements on the token auth page#3457umair-ably wants to merge 3 commits into
umair-ably wants to merge 3 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
2dc6937 to
959caec
Compare
The Requirements list for "Embedded Token JWT" stated the embedded token must be an Ably Token (not a JWT). The service also accepts an Ably JWT as the embedded token (TokenDb.get handles both, and the realtime test suite covers ably-JWT-in-JWS-header, ably-JWT-in-payload, and ably-JWT-in-JWE-header). The "(not a JWT)" exclusion was introduced in the #3085 rewrite; the pre-rewrite page made no such claim. Also rephrase the x-ably-token location bullet: the JOSE header works for both JWS and JWE outer tokens (the page's own examples embed the token in a JWS header); the payload claim is an additional option for unencrypted JWS only. The previous wording implied the header was only for the non-JWS case. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Paddy Byers <paddy.byers@gmail.com>
9704757 to
1f24c57
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two corrections to the Embedded Token JWT → Requirements list on
/docs/auth/token#embedded:"The embedded token must be an Ably Token (not a JWT)" is factually wrong. The service accepts an embedded Ably JWT as well as a native Ably Token:
TokenDb.getin the realtime service unwrapsx-ably-tokenand validates either form, and the realtime test suite covers it directly (auth_external_jwt_with_ably_jwt_embedded_in_jose_header,auth_external_jwt_with_ably_jwt_embedded_in_payload,auth_external_encrypted_jwt_with_ably_jwt_embedded_in_jose_header). The "(not a JWT)" exclusion was introduced in the [FTF-468] Several docs changes to highlight token auth over API key auth, as well as more info on using JWTs #3085 rewrite — the pre-rewrite wording ("The embedded token is an Ably Token") made no such claim.The
x-ably-tokenlocation bullet implied the JOSE header is only for the non-JWS case. The server checks the JOSE header first for both JWS and JWE outer tokens, with the payload claim as an additional option for unencrypted JWS only (a JWE payload is encrypted, so Ably cannot read it). As previously worded, the bullet contradicted the code examples further down the same page, which all embed the token in the header of an HS256 JWS.Why
Reported as inaccurate by a reader; verified against the realtime service implementation and its test suite before rewording.
🤖 Generated with Claude Code