Skip to content

Avoid MC connection in login command#3283

Open
pipo02mix wants to merge 1 commit into
mainfrom
avoid-mc-connection
Open

Avoid MC connection in login command#3283
pipo02mix wants to merge 1 commit into
mainfrom
avoid-mc-connection

Conversation

@pipo02mix

Copy link
Copy Markdown
Contributor

@pipo02mix
pipo02mix requested a review from a team as a code owner July 16, 2026 15:24
@pipo02mix pipo02mix self-assigned this Jul 16, 2026

To use option 2, users must be allowed to read the resources above on the management cluster. The built-in `read-all` role covers this, but it grants read access to essentially every resource on the management cluster — far more than logging in requires. **We recommend granting a dedicated, minimal role instead**, so that logging in to workload clusters does not imply broad read access to the management cluster. Use `read-all` only if your users already have (and you have an RBAC plan for) general management cluster access.

The following `ClusterRole` (for the cluster-scoped `Organization` lookup) plus `Role` (for the per-organization resources) grant exactly what `kubectl gs login` needs. Bind them to your users or their OIDC group, and create one `Role`/`RoleBinding` per organization namespace they should be able to reach:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When should a customer use a ClusterRole versus a Role? (Guessing: one customer might prefer users know about all Organizations, whereas another might prefer users know about the kubeadm resources only in one Organization?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I am adding some improvements in kubectl gs login to avoid org read permission at all

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

Successfully merging this pull request may close these issues.

2 participants