Skip to content

[Backport release-1.6] fix(dashboard): let dashboard users read backup CRD schemas - #4307

Merged
myasnikovdaniil merged 1 commit into
release-1.6from
backport-4236-to-release-1.6
Sep 23, 2026
Merged

myasnikovdaniil merged 1 commit into
release-1.6from
backport-4236-to-release-1.6

Conversation

@github-actions

Copy link
Copy Markdown

Description

Backport of #4236 to release-1.6.

The dashboard backup build/edit forms build each form from the CRD's
OpenAPI schema, which useCRDSchema fetches directly from
apiextensions.k8s.io with the logged-in user's token — a cluster-scoped
get on the CRD by name. No role a tenant user carries granted
customresourcedefinitions, so every tenant user hit a 403 on the schema
lookup and the form never rendered, while kubectl kept working through
the existing backup CR grants.

The tenant personas are bound only by RoleBindings, which cannot
authorize a cluster-scoped request, so the grant belongs on
cozystack-dashboard-readonly: it is bound to system:authenticated by a
ClusterRoleBinding and already carries the dashboard's other
cluster-scoped reads. Add a get on the five backups.cozystack.io CRDs,
scoped by resourceNames to those schemas only.

Fixes: #4053

Assisted-By: LLM
Signed-off-by: Andrey Kolkov <[email protected]>
(cherry picked from commit 3a8a06b)
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: aa6ead7f-f3fb-4af8-8d03-5fb6a711028c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@myasnikovdaniil
myasnikovdaniil merged commit 89c44b4 into release-1.6 Sep 23, 2026
2 checks passed
@myasnikovdaniil
myasnikovdaniil deleted the backport-4236-to-release-1.6 branch September 23, 2026 12:58
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