Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support access: security policies on Explore and Canvas resources #5728

Merged

Conversation

begelundmuller
Copy link
Contributor

@begelundmuller begelundmuller commented Sep 18, 2024

This PR adds support for access: security policies on canvas and explore resources. Among other use cases, this enables hiding dashboards that will anyway fail to render for people who don't have access to the underlying metrics views.

A policy on an explore/canvas resource does not prevent direct queries to the underlying metrics views, so it is still recommended to define security policies directly on metrics views.

Changes:

  • Adds support for access: security rules on resources of type: explore and type: canvas.
  • Retains the current behavior of additionally inheriting the parent metrics view's security rules for explore resources.

Examples:

# explores/my_explore.yaml
type: explore
title: My Explore
metrics_view: my_metrics
security:
  access: "{{ .user.admin }}"

# canvases/my_explore.yaml
type: canvas
title: My canvas
security:
  access: "{{ .user.admin }}"

Closes #5500.

@begelundmuller begelundmuller self-assigned this Sep 18, 2024
Base automatically changed from begelundmuller/refactor-dashboard-to-canvas to main September 20, 2024 08:44
@begelundmuller begelundmuller force-pushed the begelundmuller/security-policies-canvas-explore branch from 299eae4 to 47051a0 Compare September 20, 2024 08:49
@begelundmuller begelundmuller merged commit 10c6897 into main Sep 20, 2024
10 checks passed
@begelundmuller begelundmuller deleted the begelundmuller/security-policies-canvas-explore branch September 20, 2024 11:03
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.

Support access policies on explore and canvas dashboards
2 participants