Skip to content

er-dev rejects the er-readonly identity with 401 — EKS access entry drift suspected #839

Closed

Description

@athvin

Symptom

Every kubectl call against er-dev (context er-dev-ro, ns ci) fails with:

error: You must be logged in to the server (the server has asked for the client to provide credentials)

while the credential chain is provably healthy:

  • aws --profile er-readonly sts get-caller-identity answers (SSO token valid): assumed-role AWSReservedSSO_PlatformReadOnly_32bd506ae970d37d/dupezone
  • aws eks get-token --cluster-name er-dev mints an ExecCredential successfully
  • the API server 401s the token anyway — i.e. the cluster does not recognise the identity, an authentication failure (a mapped-but-forbidden identity would be 403)

Suspected cause

EKS access entries authenticate on the assumed-role ARN. If the PlatformReadOnly permission set was re-provisioned (new AWSReservedSSO_… hash suffix), the cluster's access entry still points at the old role ARN and every session under the new one 401s. Recent IAM/permission-set work makes re-provisioning plausible. Check the access entry on er-dev against the current role ARN (aws iam list-roles --path-prefix /aws-reserved/sso.amazonaws.com/ vs aws eks list-access-entries --cluster-name er-dev).

Why this matters

aws-account-operations documents er-readonly → PlatformReadOnly as the general introspection identity; health-sweep and several board tickets (#649, #650, #660's live re-probe) need cluster reads. As of 2026-11-08 no agent session on this identity can read the cluster.

Found by the #655 session while trying to verify deploy convergence for #827 via pod logs (worked around via CloudWatch Logs Insights on /er/dev/containers — which is INFREQUENT_ACCESS, so only start-query works, not filter-log-events/get-log-events).

Done when

kubectl --context er-dev-ro -n ci get pods succeeds under er-readonly, or the access model is re-documented with the identity that replaces it.

Activity

  1. self-assigned this
    on Nov 8, 2026
  2. athvin commented on Nov 8, 2026

    @athvin
    OwnerAuthor

    Claimed — working in #844 (draft). Closing that PR releases the claim.

    Diagnosis is already in: aws eks list-access-entries --cluster-name er-dev (under er-readonly) shows entries for AWSReservedSSO_AdministratorAccess_… and AWSReservedSSO_PlatformAdmin_… but none for AWSReservedSSO_PlatformReadOnly_32bd506ae970d37d — the role exists in IAM, it just was never given cluster access. So the 401 is not drift but a gap: the identity the skills call the general introspection identity cannot authenticate to the cluster at all. Fix: a viewer access entry (AmazonEKSViewPolicy, cluster scope) in the eks module, wired in envs/dev only. Also promoted this card Todo → In progress deliberately — it blocks #649, #650 and #660's live re-probe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions