kubernetes-sigs / cluster-api

Home for Cluster API, a subproject of sig-cluster-lifecycle
https://cluster-api.sigs.k8s.io
Apache License 2.0
3.48k stars 1.29k forks source link

Consider limited kubeconfig for internal components and consumers #5553

Open enxebre opened 2 years ago

enxebre commented 2 years ago

User Story

As a developer/user/operator I would like to CAPI core internal components to be granted only with the perms they need.

Detailed Description

Today CAPI generates a full admin config that is then consumed by the Machine Controller and by any component claiming a cluster accessor through the remote cache tacker, i.e r.Tracker.GetClient(ctx, util.ObjectKey(cluster)).

The Machine controller shouldn't need full admin client to operate successfully. There might be other components needing narrowed set of permissions:

This is to discuss alternatives for: 1 - Create limited kubeconfigs for consumption of our internal core components. 2 - Consider providing a way to express desired for capi outputting t-shirt size / limited kubeconfigs.

Anything else you would like to add:

[Miscellaneous information that will assist in solving the issue.]

/kind feature

enxebre commented 2 years ago

cc @CecileRobertMichon @voor

fabriziopandini commented 2 years ago

Somehow related to this https://github.com/kubernetes-sigs/cluster-api/issues/3661 TBD if we can dedup/merge

vincepri commented 2 years ago

/kind proposal /milestone Next

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

fabriziopandini commented 2 years ago

/remove-lifecycle stale

vincepri commented 2 years ago

/lifecycle frozen /help

k8s-ci-robot commented 2 years ago

@vincepri: This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to [this](https://github.com/kubernetes-sigs/cluster-api/issues/5553): >/lifecycle frozen >/help Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
fabriziopandini commented 1 year ago

/triage accepted

k8s-triage-robot commented 7 months ago

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

fabriziopandini commented 4 months ago

/priority important-longterm

fabriziopandini commented 4 months ago

This is still important to improve the security posture of CAPI itself /triage accepted