-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I not add an IAM group to my ConfigMap? #176
Comments
Didn't read, you can only add roles and users.
|
Can we re-open this as a feature request? Managing permissions would be significantly improved if we could add groups. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Is there any progress on this one? This is significant functionality for managing access to EKS for larger Engineering groups, right now this is requiring me to list out a bunch of users and adding to the list every time someone new needs access. |
With terraform 12 this can be easily workarounded, thanks to the for loop. A very improbable code: locals {
k8s_admins = [
for user in data.terraform_remote_state.iam.outputs.admin_members[0] :
{
user_arn = join("", ["arn:aws:iam::whatever:user/", user])
username = user
group = "system:masters"
}
]
k8s_developers = [
for user in data.terraform_remote_state.iam.outputs.developers_members[0] :
{
user_arn = join("", ["arn:aws:iam::whatever:user/", user])
username = user
group = "system:developers-write"
}
]
k8s_map_users = concat(local.k8s_admins, local.k8s_developers)
}
|
It's even more fun when you don't have IAM users and everybody accesses an assumed role session via Okta. |
I'm struggling to put the k8s_admins generated here into the configmap to apply later in automation, how did you manage to do that? |
/remove-lifecycle stale |
probably using |
I would also like to see adeakrvbd's question answered above. +1 |
Me too. It's really weird to not support IAM groups. |
Please consider adding IAM group support for EKS. |
Till we have this, I have come up with a strategy using AssumeRole which I describe in my blog post. |
@prestonvanloon I know we discussed in a different thread, but I basically do the same thing that @amitsaha describes in his blog post, although mine seems a bit simpler:
I'll obviously automate the last step so people don't have to run the commands and set the keys, but yeah, that's pretty much it. It's not pretty, but it allows me to abstract user management into a group which is really the goal here since IAM Groups are still not supported. |
@adeakrvbd @jclynny I used |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@adeakrvbd @jclynny here's a complete example how I build the userMap in terraform 0.12 based on IAM users bound to IAM groups.
The downside is that you will need to run "terraform apply" each time you add or remove users from IAM groups and that one user shouldn't be in more than one group at a time. |
I came across this: https://github.com/ygrene/iam-eks-user-mapper. Maybe this is a viable workaround for you? |
/kind feature |
/remove-lifecycle stale |
please reconsider support for IAM group! I can get it working with either IAM role or IAM user with tf. However, for our use case where we're trying to use Hashicorp Vault to grant dynamic time-bound access longer than 12hours (which is the max session duration for IAM role based approach), capability to map k8s group to IAM group is key. |
If your company is using SSO (via Okta, for example), there are no IAM users and everyone is using assumed roles with temporary credentials. This makes it impossible for our developers to use EKS in a sane way and hits enterprise customers the hardest. |
I've created a cluster using @aws-cdk/aws-eks (I believe it would be same for quickstart). It creates a cluster with a dedicated role since EKS has a weird rule:
Yesterday, new console has been deployed for EKS. It queries the cluster directly to get nodes and workloads: https://aws.amazon.com/blogs/containers/introducing-the-new-amazon-eks-console/ But I only see the following error with IAM user.
I've tried some ways, but I have some nitpicks for every one of them:
I wish some other ways:
|
+1 for this feature! |
1 similar comment
+1 for this feature! |
+1 for this feature! |
+1 |
1 similar comment
+1 |
Hey! after a long research on this topic, we've decided to write a blog post covering this issue. |
+1 |
1 similar comment
+1 |
hey hey community 5 years past and we are still asking when it's will be ready ? and when AWS will allow us to manage group as normal teams ? |
It worked! I just had to change "user_arn" to "userarn". |
props to @guygrip for the inspo
config/aws-auth
below creates:
|
There are ways to use Terraform or SSO, but providing group-level RBAC will have a huge effect in terms of EKS management. |
Hello everyone, based on previous comments , i find a way to add users to EKS API which are in eks_iam_group. putting terraform code : `locals { resource "aws_iam_group" "developers_group" { data "aws_iam_group" "developer_members" { resource "aws_eks_access_entry" "developer" { Of course you have to create policy for iam_group , wanted to show way to implement it. apply yaml manifests through terraform: data "kubectl_path_documents" "test" { resource "kubectl_manifest" "config" { Providing also clusterrole and clusterrolebinding : apiVersion: rbac.authorization.k8s.io/v1
apiVersion: rbac.authorization.k8s.io/v1
|
I have an IAM user named
Alice
, and she's a member of the IAM groupeks-admin
.The following configuration works, but when I remove Alice from
mapUsers
,kubectl
commands give me the errorerror: You must be logged in to the server (Unauthorized)
.Can't I add an IAM group to this ConfigMap, just like I can add a user or role?
The text was updated successfully, but these errors were encountered: