Skip to content

Add a documentation describing the minimal required permissions needed to run Diki on any environment#677

Open
georgibaltiev wants to merge 3 commits intogardener:mainfrom
georgibaltiev:add/minimal-required-permissions-docu
Open

Add a documentation describing the minimal required permissions needed to run Diki on any environment#677
georgibaltiev wants to merge 3 commits intogardener:mainfrom
georgibaltiev:add/minimal-required-permissions-docu

Conversation

@georgibaltiev
Copy link
Contributor

How to categorize this PR?

/kind enhancement

What this PR does / why we need it:

This PR updates Diki's documentation by adding a section describing the minimal required permissions for the tool. It also adds two grammar nits on the README page.

Which issue(s) this PR fixes:
Fixes #652

Special notes for your reviewer:

Release note:

A document, describing Diki's minimal required permissions has been added for the end users.

@georgibaltiev georgibaltiev requested a review from a team as a code owner January 28, 2026 15:12
@gardener-prow gardener-prow bot added the kind/enhancement Enhancement, improvement, extension label Jan 28, 2026
@gardener-prow
Copy link

gardener-prow bot commented Jan 28, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign aleksandarsavchev for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Jan 28, 2026
Copy link
Member

@AleksandarSavchev AleksandarSavchev left a comment

Choose a reason for hiding this comment

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

Thanks! I also think we should reference the RBAC files in our usage docs ./docs/usage for DISA STIG and Hardened k8s guide

Comment on lines +15 to +17
- delete
- get
- watch
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- delete
- get
- watch
- delete
- watch

We should be able to drop get here, since there is another rule that includes pods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed.

Comment on lines +18 to +25
- apiGroups:
- core.gardener.cloud
resources:
- cloudprofiles
- namespacedcloudprofiles
- shoots
verbs:
- get
Copy link
Member

Choose a reason for hiding this comment

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

This specific part is for the garden provider. We should have separate RBAC ClusterRole/Role files for the different providers. Maybe we can place these files in ./example/rbac and reference those files in the doc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. A possible variant to restructure the documentation is proposed here.



Diki a "compliance checker" of sorts, a detective control framework with pluggable rule sets.
Diki is a "compliance checker" of sorts, or a detective control framework with pluggable rule sets.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Diki is a "compliance checker" of sorts, or a detective control framework with pluggable rule sets.
Diki is a "compliance checker" of sorts, a detective control framework with pluggable rule sets.

@@ -0,0 +1,86 @@
## Minimal Required Permissions to Run Diki on your environment

In order to complete it's compliance checking, Diki will require permissions to read certain Kubernetes and Gardener resources, as well as to create and deploy `Pods` on the examined `Nodes`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
In order to complete it's compliance checking, Diki will require permissions to read certain Kubernetes and Gardener resources, as well as to create and deploy `Pods` on the examined `Nodes`.
In order to complete it's compliance checking, Diki will require permissions to read certain Kubernetes and Gardener resources, as well as to create and deploy `Pods` on the examined cluster.


Diki is the Greek word for "trial".
You can also memorise it as "Detective Investigation of Key Imperatives" or as GNU-style recursive acronym "Diki Investigates Key Imperatives".
You can also memorise it as "Detective Investigation of Key Imperatives" or with the GNU-style recursive acronym "Diki Investigates Key Imperatives".
Copy link
Member

Choose a reason for hiding this comment

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

Why is this change better?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It made more grammatical sense to me personally. I am ok with both variants, so I can revert the suggestion if requested.

@@ -0,0 +1,86 @@
## Minimal Required Permissions to Run Diki on your environment
Copy link
Member

Choose a reason for hiding this comment

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

In general this should be somehow coupled with the ruleset or at least the provider, no? The way it is written in combines multiple providers and permissions from different environments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. The different ruleset permissions could be moved to the other ./docs/usage documents.

Copy link
Member

@AleksandarSavchev AleksandarSavchev Feb 10, 2026

Choose a reason for hiding this comment

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

It would be hard to make them ruleset specific, since we have rulesets implemented for different providers (e.g. DISA is implemented for the gardener, virtualgarden and managedk8s providers).

I would suggest we make at least 2 provider specific (for managedk8s and garden providers) rbac files and place them in ./example/rbac. Then we can reference these files in the ./docs/usage documents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add docu about minimal required permissions to run diki in kubernetes.

3 participants