How to use EKS with AWS SSO

0

Hi,

We would like to give users permissions to use EKS using their AWS SSO usernames. I'm aware of the aws-iam-authenticator and eksctl, but not quite sure how to make them all work together with SSO rather than an IAM username.

Thanks

질문됨 3년 전3290회 조회
3개 답변
0

Hi,

Amazon EKS uses IAM to provide authentication to your Kubernetes cluster (through the aws eks get-token command, available in version 1.16.156 or later of the AWS CLI, or the AWS IAM Authenticator for Kubernetes), but it still relies on native Kubernetes Role Based Access Control (RBAC) for authorization. This means that IAM is only used for authentication of valid IAM entities. All permissions for interacting with your Amazon EKS cluster’s Kubernetes API is managed through the native Kubernetes RBAC system.

https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html

Refer integration guide- https://aws.amazon.com/blogs/opensource/integrating-ldap-ad-users-kubernetes-rbac-aws-iam-authenticator-project/

Please mark Helpful or Correct Answer next to each message. Appreciate it.

profile picture
답변함 3년 전
0

IMHO this topic deserves a specific documentation page. AWS SSO uses some weirdly formatted role arns, and I've never been able to set this stuff up so that SSO users can access EKS using kubectl.

Pretty crazy that such an essential thing as kubectl access using SSO roles isn't properly documented

Edited by: trondhindenes-nomono-e2 on Sep 2, 2021 7:45 AM

답변함 3년 전
0

It looks like they documented it in a blog post: A quick path to Amazon EKS single sign-on using AWS SSO

The magical part is the rolearn specification in this fragment of the aws-auth ConfigMap:

    - groups:
      - system:masters
      rolearn: arn:aws:iam::111222333444:role/AWSReservedSSO_EKSClusterAdminAccess_6a316cc66d154241
      username: cluster-admin

The role specified is the assumed role (derived from the EKSClusterAdminAccess PermissionSet on the SSO account), without any suffixed username!

(NB I haven't actually finished this yet, but the above article is the only one I found that pointed out this detail.)

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠