Repository navigation
Clarify that propagate_claims sends missing claims as empty headers - #323
Merged
Merged
Conversation
NarcisDavins
approved these changes
Nov 26, 2026
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.
The JWT validation page said that when a claim listed in
propagate_claimsis missing from the token "the mapping is just skipped", which reads as if a header sent by the client would reach the backend untouched. KrakenD does the opposite: it always sets the propagated header, with the claim value when it exists and empty when it doesn't, so a client-supplied value for that header never gets through. This rewrites the paragraph after the example to say so, adds a CEL check (has(JWT.sub)) for rejecting tokens that lack the claim, and documents how array claims are propagated (comma-separated, or one value each withpropagate_claims_preserve_array). Nothing changes in the product; it's a docs fix.The behaviour is the same in every version:
HeadersToPropagatein krakend-jose writes""for a missing claim and the router applies it withHeader.Set, in v2.12.5, v3.0.3 and master. It was also reproduced black-box withkrakend e2eon EE 2.10.4, 2.13.1 and 3.0.5: a token withsubbut noroles, plusX-User-Roles: adminfrom the client, reaches the backend asX-User-Roles: "".Also: the header names in that paragraph are now written as
X-UserandX-Roleto match the example.