Skip to content

ate-setup: let extra SPIFFE IDs hold the egress_gateway role - #3393

Closed
Max Thompson (thompsonmax) wants to merge 6 commits into
agent-substrate:mainfrom
thompsonmax:egress-gateway-extra-spiffe-ids
Closed

Max Thompson (thompsonmax) wants to merge 6 commits into
agent-substrate:mainfrom
thompsonmax:egress-gateway-extra-spiffe-ids

Conversation

@thompsonmax

Copy link
Copy Markdown
Collaborator

Depends on #3360. Review the last two commits until it merges.

Part of #1661.

Credential providers that exchange actor JWTs for cloud tokens need to call MintActorJwt under their own identity. #3360 makes ate-api-server's --egress-gateway-spiffe-id repeatable. This adds ATE_EGRESS_GATEWAY_EXTRA_SPIFFE_IDS so ate-setup can set it, since ate-setup owns ate-api-server's args. atenet-egress is always passed first. Unset leaves the flag off.

Each listed ID gets the whole egress_gateway role, including reading actors and minting actor certificates.

AI use: AI-assisted, I reviewed and tested it.

  • Tests pass (ate-setup unit tests; the manual kind deploy check wasn't run)
  • Docs updated

Add a credential_minter system role that may mint actor JWTs and nothing
else. ate-api-server grants it to --credential-minter-spiffe-id, which
defaults to the credential-minter ServiceAccount in the install's
namespace. Access policies cannot grant it, and an empty flag grants it to
no one.

A credential plugin that exchanges actor JWTs for cloud access tokens can
then run as its own Deployment instead of inside the atenet-egress pod.
Anyone who can run a pod as an arbitrary ServiceAccount in the install's
namespace can already run one as atenet-egress, so the default grants no
new authority.

Signed-off-by: Max Thompson <maxthomp@google.com>
Replace --credential-minter-spiffe-id with --credential-minter-spiffe-ids
so more than one credential plugin can hold the credential_minter role.
The default is still the credential-minter ServiceAccount in the
install's namespace, and an empty list grants the role to no one.

Signed-off-by: Max Thompson <maxthomp@google.com>
--egress-gateway-spiffe-id now takes a list, comma-separated or
repeated, and grants egress_gateway to every ID in it. A credential
plugin that exchanges actor JWTs for cloud access tokens can then run
as its own Deployment instead of inside the atenet-egress pod. The
default is still atenet-egress alone, and an empty list fails startup.

Signed-off-by: Max Thompson <maxthomp@google.com>
Make --egress-gateway-spiffe-id a StringArray so each value is one
SPIFFE ID. StringSlice also split values on commas.

Signed-off-by: Max Thompson <maxthomp@google.com>
Move the arg rewrite out of setAPIServerAuthzArgs into
setAPIServerFlag so other settings can render ate-api-server flags.

Signed-off-by: Max Thompson <maxthomp@google.com>
ATE_EGRESS_GATEWAY_EXTRA_SPIFFE_IDS lists SPIFFE IDs that hold
ate-api-server's egress_gateway role next to atenet-egress, such as
a credential provider that mints actor JWTs. ate-setup passes
atenet-egress first because --egress-gateway-spiffe-id replaces its
default when set.

Signed-off-by: Max Thompson <maxthomp@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant