Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make node alias and vanity name entries easier to reason about #2612

Closed
kfox1111 opened this issue Nov 3, 2021 · 4 comments
Closed

Make node alias and vanity name entries easier to reason about #2612

kfox1111 opened this issue Nov 3, 2021 · 4 comments
Labels
priority/backlog Issue is approved and in the backlog stale unscoped The issue needs more design or understanding in order for the work to progress

Comments

@kfox1111
Copy link
Contributor

kfox1111 commented Nov 3, 2021

I would have thought this could work:

spire-server entry create -node -spiffeID spiffe://example/nodename/foo -selector spiffe://example/spire/agent/tpm/xxxxx

But currently another spiffeID is not able to be used in this case, only labels from the agent. Might be a nice thing to be able to do. I managed to work around it by the plugin's own selector for now:

tpm:pub_hash:xxxxx
@rturner3 rturner3 added the triage/in-progress Issue triage is in progress label May 15, 2023
@evan2645
Copy link
Member

Hi @kfox1111 ... I think there is definitely room for improvement here.

Tactically, I think you should be able to get what you want by replacing the -node flag with -parentID and specifying your agent TPM ID there (in addition to your SPIFFE ID selector). Why this works is a quirky side effect of how SPIRE does entry authorization

In the long run, it would be great to make this more approachable. There are clearly use cases for mapping nodes/agents to an alias either via selector or via 1:1 alias. In fact, join token does this kind of 1:1 alias already when creating one with -spiffeID flag.

A new flag like -alias would be nice, though confusing as to when to use -node vs -alias. Perhaps something that deprecates the -node flag and allows for this kind of alias ID creation in both cases...? Just thinking out loud, maybe -nodeAlias where you always specify a SPIFFE ID, and you specify either a selector(s) or a parent ID (mutually exclusive)

# Give a specific agent alias nodename/foo
$ spire-server entry create -nodeAlias -parentID spiffe://example/spire/agent/tpm/xxxxx -spiffeID spiffe://example/nodename/foo

# Give a group of agents an alias to nodename/foo
$ spire-server entry create -nodeAlias -selector aws_iid:tag:nodename:foo -spiffeID spiffe://example/nodename/foo

@evan2645 evan2645 changed the title spiffeid selector for nodes Make node alias and vanity name entries easier to reason about May 18, 2023
@evan2645
Copy link
Member

Something like the above feels like a step in the right direction with regards to clarifying the behavior of "node entries", and also enabling straight ID aliasing (which is already supported, but not intuitive). We should also document the shapes of the entries that these produce somewhere such that API consumers can leverage them as well. Perhaps that is coupled with proto documentation, and/or new RPCs or params

@evan2645 evan2645 added priority/backlog Issue is approved and in the backlog unscoped The issue needs more design or understanding in order for the work to progress and removed triage/in-progress Issue triage is in progress labels May 18, 2023
@evan2645 evan2645 removed their assignment Jun 8, 2023
Copy link

github-actions bot commented Jun 7, 2024

This issue is stale because it has been open for 365 days with no activity.

@github-actions github-actions bot added the stale label Jun 7, 2024
Copy link

github-actions bot commented Jul 7, 2024

This issue was closed because it has been inactive for 30 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/backlog Issue is approved and in the backlog stale unscoped The issue needs more design or understanding in order for the work to progress
Projects
None yet
Development

No branches or pull requests

3 participants