Skip to content

feat(chart): IRSA web-identity for AWS creds, retire static key (#257) - #258

Merged
bpalermo merged 1 commit into
mainfrom
feat/irsa-aws-credentials
Jun 22, 2026
Merged

bpalermo merged 1 commit into
mainfrom
feat/irsa-aws-credentials

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Addresses the app/chart side of #257 — migrate aether off the static IAM access key onto IRSA web-identity. (AWS IAM steps — create the role, delete the user — are out-of-band, below.)

Key correction to the issue's premise

A code inventory showed the agent never calls AWS: it reaches the registry only via the registrar (NewRegistrarRegistry), and agent/internal/awsconfig was dead code (imported by nothing). AWS is used only by the registrar's dynamodb backend (NewDynamoDBRegistry). The agent's AWS_ACCESS_KEY_ID/SECRET mount was vestigial — present, never read. So only the registrar needs a role, and only for DynamoDB.

Changes

  • Agent: removed the AWS env block (agent-daemonset.yaml), agent-secret.yaml, agent.awsCredentials values, the awsSecretName helper, and the dead agent/internal/awsconfig package. No SA role.
  • Registrar: dropped the static envFrom secretRef; the registrar SA is annotated eks.amazonaws.com/role-arn when registrar.aws.roleArn is set (webhook injects AWS_ROLE_ARN + token). Kept AWS_REGION. Values: registrar.aws.{region, roleArn} (was credentialsSecret).
  • aether chart 0.17.0.

Validation

bazel build //... green; helm template renders the role-arn annotation only when roleArn is set and zero AWS-cred env/secret otherwise.

Remaining (AWS side, account 988966554486 — out of band)

  1. Inventory the talos-main-aether-agent inline policy (DynamoDB perms).
  2. Create talos-main-aether-registrar-irsa (trust irsa.palermo.dev, sub system:serviceaccount:aether-system:aether-registrar, aud sts.amazonaws.com; inline = the perms). No agent role.
  3. Set registrar.aws.roleArn, deploy.
  4. Validate via a python:3.12-slim+boto3 pod on the registrar SA (the amazon/aws-cli ARMv8.2 crash).
  5. Delete the IAM user + key; rm the local gitignored agent/deploy/secrets.yaml.

🤖 Generated with Claude Code

…257)

Migrate aether off the static IAM access key onto IRSA web-identity (self-hosted
pod-identity-webhook + irsa.palermo.dev). Code inventory corrected the issue's
premise: the AGENT never calls AWS — it reaches the registry only via the
registrar (NewRegistrarRegistry), and agent/internal/awsconfig was dead code
imported by nothing. AWS is used solely by the REGISTRAR's dynamodb backend
(NewDynamoDBRegistry). So:

- Agent: drop the vestigial AWS_ACCESS_KEY_ID/SECRET env (it was mounted, never
  read), agent-secret.yaml, agent.awsCredentials values, the awsSecretName
  helper, and the dead agent/internal/awsconfig package. The agent SA gets no
  role (it needs no AWS).
- Registrar: replace the static envFrom secretRef with IRSA — annotate the
  registrar SA with eks.amazonaws.com/role-arn when registrar.aws.roleArn is set
  (the webhook injects AWS_ROLE_ARN + a projected token). Keep AWS_REGION as a
  plain env. Values: registrar.aws.{region, roleArn} (was credentialsSecret).
- aether chart 0.17.0.

No static keys anywhere in the chart now. The IRSA role is dormant on the
etcd/kubernetes backends and assumed only by the dynamodb backend. AWS-side work
(create the registrar IRSA role, delete the talos-main-aether-agent IAM user) is
tracked in #257 and done out-of-band.

Build green; helm renders the SA annotation only when roleArn set, and zero AWS
creds otherwise.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S
@bpalermo
bpalermo merged commit 081c703 into main Jun 22, 2026
14 checks passed
@bpalermo
bpalermo deleted the feat/irsa-aws-credentials branch June 22, 2026 11:39
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