Files
floci/docs
Robin BaeckmanandRobin Baeckman 7822b2c396 fix(eks): resolve the token webhook's access keys from any account (#5003)
The EKS token webhook looked long-term keys up through findSecretKey,
which is account-scoped. k3s calls the webhook with no account routing,
so it saw only the default account's keys. A correctly signed
`aws eks get-token` from a user in any other account was rejected:
kubectl reported "the server has asked for the client to provide
credentials".

The webhook now uses a new IamService.findSecretKeyInAnyAccount. It
tries the request's account first and scans the other accounts only on
a miss. Inactive keys are still refused, and temporary (ASIA) keys never
reach the scan. findSecretKey itself stays account-scoped: the
ElastiCache, MemoryDB and RDS IAM-auth proxies verify through it and do
not compare the key's account with the cluster's.

Because a long-term key can now reach the webhook from any account, the
legacy identity (system:masters) is limited to long-term keys owned by the
cluster's account, or by the default account on unscoped webhook paths
that predate per-account clusters. This also tightens one existing case:
a default-account key used to get system:masters on clusters of every
account, and now gets it only on the default account's clusters.

Session credentials without an instance ID still map to the legacy
identity on any cluster; that predates this change and is left alone.

Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com>
2026-10-03 15:55:34 -05:00
..
2026-03-15 17:43:56 -05:00