SPIRE Server should enforce agent IDs reside in the agent namespace
#2,712 opened on Jan 31, 2022
Repository metrics
- Stars
- (2,443 stars)
- PR merge metrics
- (PR metrics pending)
Description
SPIRE has assumed that node attestors would produce agent IDs that conform to the following convention:
spiffe://<trustdomain>/spire/agent/<nodeattestor>/<unique per-agent suffix>
(e.g. spiffe://example.org/spire/agent/join_token/21B6D625-CCF3-49E1-8E7C-812B3F55B3CB)
Although this convention is not required for agent authorization to take place safely, it does aid in debuggability, auditability, and the ability to prevent misconfiguration (e.g. cannot accidentally assign a workload an agent ID since we can validate that the requested ID is not reserved). Being able to answer the question "was this ID produced by a node attestor" is also important for at-a-glance understanding of logs.
Unfortunately, SPIRE does not enforce this convention currently, and cannot due to backcompat concerns. However, a deprecation warning is introduced with #2694. This should give us the ability to enforce this beginning with SPIRE 1.4 at the earliest (since 1.3 will be the first minor to include the deprecation warning).
This issue tracks the enforcement of the agent ID convention.