deckhouse / deckhouse/deckhouse

RBAC limit for istio

Open
#8,516 1 comment 0 reactions 1 assignee View on GitHub

@apolovov is already working on this.

Since Jul 24, 2024.

type/enhancement
Dominant language
Go
Stars
1.3k
Forks
162
Avg merge
1d 5h
Merged PRs (30d)
653

Description

Preflight Checklist
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
Use case. Why is this important?

During the analysis of RBAC DKP using the ExtensiveRoleCheck utility, the following was discovered:

[!][ClusterRole]→ d8:istio:kiali Has permission to use delete on any resource!

Is kiali supposed to have rights to delete [objects] (https://github.com/deckhouse/deckhouse/blob/main/modules/110-istio/templates/kiali/rbac-for-us.yaml#L101)? There are no such rights in upstream.

[!][ClusterRole]→ d8:istio:operator Has Admin-Cluster permission!
[!][ClusterRole]→ d8:istio:operator Has Admin-Cluster permission!
[!][ClusterRole]→ d8:istio:operator Has Admin-Cluster permission!
[!][ClusterRole]→ d8:istio:operator Has Admin-Cluster permission!
[!][ClusterRole]→ d8:istio:operator Has Admin-Cluster permission!
[!][ClusterRole]→ d8:istio:operator Has permission to access deployments with any verb!
[!][ClusterRole]→ d8:istio:operator Has permission to access roles with any verb!
[!][ClusterRole]→ d8:istio:operator Has permission to list secrets!
[!][ClusterRole]→ d8:istio:operator Has permission to access secrets with any verb!

Are all these rights required for istio operator? They look too wide. In original RBAC there are fewer required rights.

[!][ClusterRole]→ istio-reader-clusterrole-v1x19-d8-istio Has permission to use list on any resource!
[!][ClusterRole]→ istio-reader-clusterrole-v1x19-d8-istio Has permission to list secrets!
[!][ClusterRole]→ istio-reader-d8-istio Has permission to use list on any resource!
[!][ClusterRole]→ istio-reader-d8-istio Has permission to list secrets!
[!][ClusterRole]→ istiod-clusterrole-v1x19-d8-istio Has permission to use list on any resource!
[!][ClusterRole]→ istiod-clusterrole-v1x19-d8-istio Has permission to use list on any resource!
[!][ClusterRole]→ istiod-clusterrole-v1x19-d8-istio Has permission to list secrets!
[!][ClusterRole]→ istiod-d8-istio Has permission to use list on any resource!
[!][ClusterRole]→ istiod-d8-istio Has permission to use list on any resource!
[!][ClusterRole]→ istiod-d8-istio Has permission to list secrets!
[!][ClusterRole]→ istiod-gateway-controller-v1x19-d8-istio Has permission to create deployments!
[!][Role]→ istio:ingress-gateway-controller Has permission to list secrets!
[!][Role]→ istiod-d8-istio Has permission to list secrets!
[!][Role]→ istiod-v1x19 Has permission to list secrets!
Proposed Solution

Grant the minimum required rights to the istio module in the DKP platform.

Additional Information

You might be interested in the audit2rbac tool to minimize permissions for the istio module.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.