consul: include Nomad node ID in Consul token login metadata#28133
Open
emmayusufu wants to merge 1 commit into
Open
consul: include Nomad node ID in Consul token login metadata#28133emmayusufu wants to merge 1 commit into
emmayusufu wants to merge 1 commit into
Conversation
Tokens issued via workload identity login now include the issuing client's node ID in the login meta, so a token can be traced back to the node that created it.
4bdd5d9 to
5ac09f2
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.
Consul tokens issued by Nomad via workload identity login carry a
requested_bymeta value (for examplenomad_task_<name>), but nothing identifies which Nomad client issued the token. This adds the issuing client's node ID to the login request metadata, so a token can be traced back to the node that created it.As @jrasell noted on the issue, the
token created via loginprefix in the description is controlled by Consul, not Nomad, so the node ID goes into the meta (the part Nomad controls). The description then reads:Changes:
node_id(fromalloc.NodeID) to the Consul JWT login meta for both task and service tokens.Fixes #28048