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

Support wildcards in additionalrolebindings section of Tenant specification #863

Open
meetdpv opened this issue Oct 25, 2023 · 3 comments
Open
Assignees
Labels
needs-discussion No outline on the feature, discussion is welcome

Comments

@meetdpv
Copy link

meetdpv commented Oct 25, 2023

Describe the feature

additionalrolebindings section of Tenant specification needs an exact user. It does not support wildcard for user.

What would the new user story look like?

Support wildcards in additionalrolebindings section of Tenant specification

How would the new interaction with Capsule look like? E.g.
We are using Capsule on EKS. While defining tenant, we would like to assign additional roles to a group of users which can be achieved by wildcard instead of listing all of them in the specification.

Existing specification
spec:
owners:

  • name: alice
    kind: User
    additionalRoleBindings:
  • clusterRoleName: EKS-Viewer-ClusterRole
    subjects:
    • apiGroup: rbac.authorization.k8s.io
      kind: User
      name: EKS-User:<<aws_account_id>>:user_1

Feel free to add a diagram if that helps explain things.

Expected behavior

Support wildcards in the users section of additionalrolebindings to support large team.
spec:
owners:

  • name: alice
    kind: User
    additionalRoleBindings:
  • clusterRoleName: EKS-Viewer-ClusterRole
    subjects:
    • apiGroup: rbac.authorization.k8s.io
      kind: User
      name: EKS-User:<<aws_account_id>>:user_* (wildcard)
@meetdpv meetdpv added the blocked-needs-validation Issue need triage and validation label Oct 25, 2023
@prometherion
Copy link
Member

Thanks for the feature proposal.

Unfortunately, this is not feasible since Kubernetes itself doesn't support RBAC. Furthermore, a wildcard introduces potential issues from a security standpoint.

If you can elaborate a bit more your use-case as well as your struggles, by adding a detailed user-story, we can definitely try to understand if it can potentially fit into the Capsule area.

@prometherion prometherion added needs-discussion No outline on the feature, discussion is welcome and removed blocked-needs-validation Issue need triage and validation labels Nov 14, 2023
@prometherion prometherion self-assigned this Nov 14, 2023
@oliverbaehler
Copy link
Collaborator

@prometherion One Use-Case which is interesting, would be allowing to have wildcards in respected userGroups in the capsuleConfiguration. system:serviceaccount:*-system:gitops where * would be the tenant name. This simplifies gitops integrations, where serviceaccounts should be able create namespaces. This is also possible with eg system:serviceaccounts:tenants, where you create a new serviceaccount per tenant in the tenants namespace. However you also have to create a manual rolebinding, so the users could see their syncs.

But we should probably stick to the native xperience.

@prometherion
Copy link
Member

But we should probably stick to the native experience

That was the Capsule aim from day one: with all due respect to the feature request, which are always welcome, it seems to me a workaround to a different problem that should be addressed in a different scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-discussion No outline on the feature, discussion is welcome
Projects
None yet
Development

No branches or pull requests

3 participants