Skip to content

Same ARN twice overwrites previous groups #271

Open
@mmack

Description

@mmack

Hey guys,

I made a rather stupid mistake, but the outcome is kinda catastrophic :)
If you use the same ARN twice, I guess the groups are not merged but the last one is used alone.

See this example:

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: aws-auth
  namespace: kube-system
data:
  mapRoles: |
    - rolearn: "arn:aws:iam::X:role/for-nodes"
      username: "system:node:{{EC2PrivateDNSName}}"
      groups:
        - system:bootstrappers
        - system:nodes
    - rolearn: "arn:aws:iam::X:role/admins"
      username: "operator"
      groups:
        - "system:masters"
    - rolearn: "arn:aws:iam::X:role/Some-user"
      groups:
        - test-max-dev-group
    - rolearn: "arn:aws:iam::X:role/admins"
      groups:
        - test-andi-dev-group

So by attaching "arn:aws:iam::X:role/admins" twice I removed access to the "system:masters" group and i'm out of business here. The group "test-andi-dev-group" has only access to it's own namespace so I'm not able to change anything in "kube-system" anymore.

Any ideas on getting back access to my cluster than using etdc directly?

Max

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions