spiffe/spire

SPIRE Server should enforce agent IDs reside in the agent namespace

Aperta

#2712 aperta il 31 gen 2022

 (11 commenti) (1 reazione) (0 assegnatari)Go (631 fork)auto 404
help wantedpriority/backlog

Metriche repository

Star
 (2443 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor