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

Create groups rather than adding project members directly to rolebinding #96

Open
larsks opened this issue May 15, 2023 · 0 comments
Open

Comments

@larsks
Copy link
Member

larsks commented May 15, 2023

Our current account management api adds project members directly to the edit rolebinding for a project:

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: edit
  namespace: test-project-12345678
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: edit
subjects:
- apiGroup: rbac.authorization.k8s.io
  kind: User
  name: example

If a project wants to add additional RBAC for their project (see e.g. nerc-project/operations#128) this is problematic, because it means they will need to manually maintain a second list of project members. Whenever someone new joins the project, the custom RBAC will need updating to apply to the new members.

We can avoid this problem by creating a group (<project>-members), and referencing that group name in the edit rolebinding. Custom rolebindings can reference this group, which would allow them to apply automatically to new members.

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

2 participants