spiffe/spire

SPIRE Server should enforce agent IDs reside in the agent namespace

开放

#2,712 创建于 2022年1月31日

 (11 条评论) (1 个反应) (0 位负责人)Go (631 个派生)auto 404
help wantedpriority/backlog

仓库指标

星标
 (2,443 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南