Adding static scoped tokens to file config #61266
Draft
+471
−12
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.
This PR adds the ability to define static, scoped join tokens within the file config. It works very similarly to unscoped static tokens but requires just a little more structure.
Here's an example showing unscoped and scoped tokens defined side by side:
Unscoped and scoped tokens can both be defined in the same
auth_serviceblock. Thescopeconfiguration defines which scope will be applied to resources provisioned using thebartoken. The scope of the scoped token itself is set toscopes.Root. I considered adding configurations for both scope configurations, but it seemed like a better UX not to worry about the token resource's scope andscoped.Rootseems appropriate for something defined at the file config level.Joining with a static scoped token should work exactly like an unscoped token or a regular scoped token provisioned with
tctl scoped token add. Once the node has joined, its host certs can be inspected to confirm that theAgentScopeproperty has been assigned.