Skip to content
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

How to debug user's not being given permissions in Dashboard (probably due to the LDAP group not being found)? #915

Open
kastl-ars opened this issue Jul 26, 2024 · 0 comments

Comments

@kastl-ars
Copy link

Hi Marc,

TL;DR: is there a way to debug why a user has no permissions in the Kubernetes dashboard, even though there is a ClusterRoleBinding giving a LDAP group cluster-admin permissions?

I have a demo setup with a ApacheDS LDAP server and OpenUnison, both running on k3s.

I have three users in LDAP, but only one of them is a member of the k8s-cluster-admins group. I can log into OpenUnison and the Kubernetes Dashboard with all three of them, so LDAP in general seems to be working.

But for all of them I get the error notifications due to missing permissions, while one of them should have enough permissions.

I do not think that I can configure any more of the AD/LDAP-related settings than this block in the values.yaml file:

active_directory:
  base: "DC=apacheds,DC=vagrant-libvirt,DC=org"
  host: "apacheds.apacheds.svc.cluster.local"
  port: "389"
  bind_dn: "uid=admin,ou=system"
  con_type: ldap
  srv_dns: "false"

The group in question looks like this:

dn: CN=k8s-cluster-admins,OU=Groups,DC=apacheds,DC=vagrant-libvirt,DC=org
objectClass: group
cn: k8s-cluster-admins
member: CN=hpotter,OU=Users,DC=apacheds,DC=vagrant-libvirt,DC=org

The ClusterRoleBinding (adapted from the OpenUnison documentation):

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  creationTimestamp: "2024-07-26T05:04:40Z"
  name: all-ldap-users-are-cluster-admins
  resourceVersion: "847"
  uid: 3db10840-f5b6-46db-ad77-f5d796b91907
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- apiGroup: rbac.authorization.k8s.io
  kind: Group
  name: CN=k8s-cluster-admins,OU=Groups,DC=apacheds,DC=vagrant-libvirt,DC=org

Maybe you (or someone else reading this) can spot my mistake or give an idea how and where to start digging.

Thanks in advance!

Kind Regards
Johannes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant