Commit graph

843 commits

Author SHA1 Message Date
Michael Mandrus
45fa66aee5
Chore: Flatten API surface of public dashboards (#124088)
* refactor

* fix wire gen

* CLI fixes

* clean up alias.go

* cleanup http_server file

* get rid of dot imports

* fix wire issues

* fix aliases

* update workspace
2026-05-06 15:03:42 -04:00
Ryan McKinley
e2bbde932e
Preferences: Remove unused/undocumented preferences api (#123784) 2026-04-29 09:43:08 +01:00
Ryan McKinley
b28e0e4992
Storage: Remove storage http bindings and feature toggle (#123484) 2026-04-25 00:56:27 +03:00
María Alonso
8e080e2e15
Nav: Add access to Connections section for plugin routes (#121002)
* Nav: Add access to Connections section for plugin routes

* Nav: Fix whitespace lint in hasConnectionsPluginItems

* refactor(navtree): extract hasAccessibleInclude method

* Nav: create Connections section before addAppLinks

* fix(connections): show section to users with plugin children, not only datasource admins

Previously the Connections section was only added to the nav tree when
the user had ConfigurationPageAccess (datasources:create or read+write).
This meant plugin pages registered under the "connections" section ID
(e.g. grafana-collector-app, grafana-pdc-app) were invisible to viewers
who lacked datasource write permissions, even when they had access to
those plugins.

Changes:
- buildDataConnectionsNavLink now always returns the Connections section
  so that addAppLinks can attach plugin children regardless of the
  caller's datasource permissions. Core items (add-new-connection,
  datasources) remain gated by ConfigurationPageAccess.
- NavTreeRoot.RemoveEmptyConnectionsSection prunes the section after all
  app links and enterprise hooks have run if no children were registered.
  Called from setIndexViewData alongside RemoveEmptyAdminSections.
- /connections landing page route relaxed to reqSignedIn. The page
  derives its cards from the nav tree (grafana/grafana#122017), so any
  signed-in user who has nav children can view it; sub-pages retain their
  own per-route authorization.
- Tests added covering: admin sees core items, viewer gets empty section,
  viewer with plugin attachment sees the section, and empty pruning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: resolve cherry-pick conflicts remove duplicated test

---------

Co-authored-by: Jára Benc <jaroslav.benc@grafana.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 13:18:24 +02:00
Gareth
8d5ef5a345
Redirect legacy /api/health to /apis/health (#121230)
* Redirect legacy /api/health to /apis/health

* remove duplicated pluginTypeFromConnection

* updates

* fmt

* fix build
2026-04-09 14:41:22 +01:00
Stephanie Hingtgen
b1f6a897d6
Dashboards: Refactor to keep perms separated (#122041) 2026-04-07 13:00:45 -05:00
colin-stuart
fa90e56303
Auth: Remove passwordless (magic link) authentication backend implementation (#118881)
* Auth: Remove passwordless (magic link) authentication backend implementation

* remove passwordless feature toggle from gen file

* make update-workspace
2026-03-27 09:19:58 -05:00
Tim Mulqueen
e9a3b93b0a
add redirect for resource endpoints (#120269)
* add redirect for resource endpoints

* update to use new goff ff system

* fix tests

* fix mispelling

* add explicit check in test

* Add more tests to verify

* add header forwarding tests

* fmt + lint
2026-03-25 10:36:31 +01:00
Stephanie Hingtgen
1c12cf1984
Live: Add RBAC for pushing to live (#120547)
Some checks are pending
Integration Tests / All backend integration tests complete (push) Blocked by required conditions
Reject GitHub secrets / reject-gh-secrets (push) Waiting to run
Build Release Packages / setup (push) Waiting to run
Build Release Packages / Dispatch grafana-enterprise build (push) Blocked by required conditions
Build Release Packages / / darwin-amd64 (push) Blocked by required conditions
Build Release Packages / / darwin-arm64 (push) Blocked by required conditions
Build Release Packages / / linux-amd64 (push) Blocked by required conditions
Build Release Packages / / linux-armv6 (push) Blocked by required conditions
Build Release Packages / / linux-armv7 (push) Blocked by required conditions
Build Release Packages / / linux-arm64 (push) Blocked by required conditions
Build Release Packages / / linux-s390x (push) Blocked by required conditions
Build Release Packages / / windows-amd64 (push) Blocked by required conditions
Build Release Packages / / windows-arm64 (push) Blocked by required conditions
Build Release Packages / Upload artifacts (push) Blocked by required conditions
Build Release Packages / publish-dockerhub (push) Blocked by required conditions
Build Release Packages / Dispatch publish NPM canaries (push) Blocked by required conditions
Build Release Packages / notify-pr (push) Blocked by required conditions
Run dashboard schema v2 e2e / dashboard-schema-v2-e2e (push) Waiting to run
Shellcheck / Shellcheck scripts (push) Waiting to run
Run Storybook a11y tests / Detect whether code changed (push) Waiting to run
Run Storybook a11y tests / Run Storybook a11y tests (dark theme) (push) Blocked by required conditions
Run Storybook a11y tests / Run Storybook a11y tests (deuteranopia_protanopia_dark theme) (push) Blocked by required conditions
Run Storybook a11y tests / Run Storybook a11y tests (deuteranopia_protanopia_light theme) (push) Blocked by required conditions
Run Storybook a11y tests / Run Storybook a11y tests (light theme) (push) Blocked by required conditions
Run Storybook a11y tests / Run Storybook a11y tests (tritanopia_dark theme) (push) Blocked by required conditions
Run Storybook a11y tests / Run Storybook a11y tests (tritanopia_light theme) (push) Blocked by required conditions
Run Storybook a11y tests / Storybook a11y tests (push) Blocked by required conditions
Swagger generated code / Detect whether code changed (push) Waiting to run
Swagger generated code / Verify committed API specs match (push) Blocked by required conditions
Dispatch sync to mirror / dispatch-job (push) Waiting to run
2026-03-17 17:28:41 -06:00
Roberto Jiménez Sánchez
15e3a390a1
Provisioning: Fix editors not being able to open dashboard preview (#120496)
* Provisioning: relax auth for dashboard preview paths

Dashboard preview URLs under /admin/provisioning/*/dashboard/preview/*
now only require reqSignedIn instead of reqOrgAdmin. This allows
non-admin users to access preview links posted in pull-request comments
by the git-sync backend.

The rest of /admin/provisioning/* still requires OrgAdmin.

No URL changes are needed, so this fix is backward-compatible with all
frontend versions and avoids issues during the 8-week frontend rollout
window.

Fixes grafana/git-ui-sync-project#963

Made-with: Cursor

* Accept reqOrgAdmin as web.Handler parameter

ProvisioningAuth now takes a web.Handler fallback instead of
constructing the role check internally, keeping the call site
consistent with other route registrations.

Made-with: Cursor
2026-03-17 16:26:59 +01:00
Gábor Farkas
5745c0678c
Datasources: Disable deprecated numeric id using APIs by default (#119930)
datasources: disable deprecated APIs by default
2026-03-12 12:40:48 +01:00
Eric Shields
989b0b06f3
Secrets: Add /admin/secrets/secure-values backend route (#119042)
feat(secrets): add /admin/secrets/secure-values backend route

Add new /admin/secrets/secure-values route with SecureValues permissions
and update /admin/secrets to accept both SecureValues and Keepers
permissions for the redirect page.

Part of: grafana/grafana-operator-experience-squad#1737

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-26 21:59:20 -08:00
Eric Shields
b49110279b
Secrets Keeper: Add backend routes for keeper pages (#118307)
Register GET routes for /admin/secrets/keepers and /admin/secrets/keepers/*
behind the secretsManagementAppPlatformUI feature flag with keepers-specific
RBAC permissions, so direct page loads serve the SPA instead of returning 404.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:54:17 +01:00
Dafydd
d7b5508f28
Reroute GET /api/datasources/uid/:uid to the /apis handlers (#116678)
* add some integration tests for existing datasource crud endpoints

* implement GET by uid redirect handler

* fix apis authorizer

* add unit tests for connections client

* add tests for the k8s datasource handler

* use the correct group, and dont prettify group name in listConnections response
2026-02-12 12:53:04 +00:00
Matheus Macabu
0906d81bfd
Secrets: Clean up secretsManagementAppPlatform (#117873) 2026-02-11 16:01:21 +01:00
Stephanie Hingtgen
0b7275ce04
Dashboards: Remove deprecated dashboard id endpoints (#117227) 2026-02-08 13:11:34 -06:00
Gábor Farkas
8eadb48906
datasources: feature toggle to disable deprecated apis (#116691) 2026-02-05 11:05:28 +01:00
Mariell Hoversholm
5a62f35f5b
API: Add missing scope check on dashboards (#116885)
Co-authored-by: Jo Garnier <git@jguer.space>
2026-01-27 09:52:43 +01:00
Matheus Macabu
86c2e52464
Avatar: Require sign-in, remove queue, respect timeout (#116891)
Fixes CVE-2026-21720
2026-01-27 09:41:13 +01:00
Ryan McKinley
0dd1f26426
DataSources: Deprecate api routes with name and internal IDs (#116391) 2026-01-16 16:14:12 +03:00
Ryan McKinley
bfa2970ba9
Search: Move experimental panelTitleSearch from searchV2 to unified search (#116326) 2026-01-15 15:15:35 +03:00
Ashley Harrison
d83b216a32
FS: Fix rendering of public dashboards in MT frontend service (#115162)
* pass publicDashboardAccessToken to ST backend via bootdata

* slightly cleaner

* slightly tidy up go templating

* add HandleView middleware
2025-12-11 17:56:40 +00:00
Ryan McKinley
fbc0540528
Chore: Remove unused+experimental /dashboards/calculate-diff API support (#114151) 2025-11-25 12:39:29 +03:00
Matheus Macabu
0c965a9cb1
CloudMigrations: Remove feature toggle and introduce config setting to disable it (#114223) 2025-11-24 14:15:23 +01:00
Juan Cabanas
1458a28eee
DashboardLibrary: Fix 404 not found error when browsing the page (#114094)
* 404 fix

* any enabled added
2025-11-18 15:43:25 -03:00
Denis Vodopianov
81683d554d
chore : Deprecating FeatureToggles.IsEnabledGlobally (#112885)
* add deprecation on featuremgmt.IsEnabledGlobally

* add nolint reason

* add reasonable deprecation message

* remove junk edits

* add more nolints

* addressing review comments

* Update pkg/services/featuremgmt/models.go

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>

---------

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
2025-10-24 12:02:53 -04:00
Tania
c952de773d
FeatureToggles: Removed deprecated code (#111750) 2025-09-29 20:05:44 +03:00
Tobias Skarhed
bf31c67159
Secrets: Add route for secrets UI (#111161)
Add secrets route
2025-09-16 13:00:37 +02:00
Jo
edcd113054
Authz: Remove legacy API Key permissions (#110860)
* remove API key roles

* remove API key gen

* remove frontend and doc mentions

* restore legacy keygen

* restore codeowners

* prettier

* update swagger

* remove permissions including apikeys

* add migrator for removing deprecated permissions

* add tracing

* update openapi3

* simplify migrator for now

* accesscontrol/migrator: remove batching for deprecated permissions deletion
2025-09-12 13:59:37 +02:00
Josh Hunt
4e05bb36f2
FS: Remove multiTenantFrontend flag (#110776)
* FS: Move multiTenantFrontend evaluation to OpenFeature

* comment

* actually, just remove the toggle

* fix k8s prefs test using toggle

* replace frontend flag usage

* codeowners

* move isFrontendService just into core

* put back comment
2025-09-09 09:39:29 +00:00
Josh Hunt
454380431d
FS: Get CDN prefix from configuration (#110615)
* FS: Get CDN prefix from configuration

* undo logger change

* fix tests

* add unused property

* tests

* fix tests

* remove dead comment
2025-09-08 15:57:03 +00:00
Ryan McKinley
1dadf2cad9
Stars: Remove deprecated internal ID apis (#110499) 2025-09-04 14:45:01 -05:00
Ezequiel Victorero
006ea8e1b9
ShortURL: Fix tests and small refactor (#108871) 2025-07-30 10:31:11 -03:00
Misi
a7bfd8e351
Auth: Remove ssoSettingsApi feature toggle (#107528)
* Remove ssoSettingsApi feature toggle

* Clean up

* lint

* Fix tests
2025-07-03 10:53:33 +02:00
Mihai Doarna
d57d184d20
Auth: Remove api key endpoints (#106019)
* remove api key endpoints

* generate openapi specs

* remove methods from mock service

* remove ApiKeyDTO

* generate openapi specs

* remove apikey migration endpoints

* remove unused function
2025-06-04 17:03:06 +03:00
Domas
d5bb055593
NavTree: Group APM and Infra plugins under "Observability" section (#104192)
* put o11y department apps under Observability menu section

* fix tests

* change url for observability grouping

* add routing for /observability
2025-05-27 17:05:28 +03:00
Josh Hunt
91d9cac157
FEMT: Call /bootdata and render grafana (#105176)
* rename /mtfe route to /femt to match project name

* set correct navTree JSON property name

* call GetWebAssets in the request handler to prevent stale assets during development

* Call /bootdata and render grafana

* set nonce on script

* write csp header in index handler

* write report-only csp as well

* debug stuff

* more debug logging

* move importing app into a seperate, async-loaded module

* Clean up comments

* make /femt redirect to / in the frontend

* remove console.log

* remove stale commented code

* call __grafana_load_failed if bootstrap fails

* comment for __grafana_boot_data_promise

* remove console.log

* remove blank newline

* codeowners
2025-05-13 09:58:46 +01:00
Ryan McKinley
73c018b298
Bootdata: Expose grafanaBootData under /bootdata URL (#104258) 2025-04-25 10:50:03 +01:00
Ryan McKinley
7b492d7e16
FEMT: Add feature toggle and expose the service in regular grafana (#104428) 2025-04-25 12:24:25 +03:00
Stephanie Hingtgen
4918d8720c
Dashboard Restore: Remove experimental functionality under feature flag dashboardRestore for now - this will be reworked (#103204) 2025-04-03 02:52:54 -05:00
Ryan McKinley
1a00801e6a
Provisioning: Merge watch support into live (#102618) 2025-03-21 16:45:25 +02:00
Ieva
163546d40f
RBAC: Remove dashboard guardians pt 1 (#102314)
* replace the usage of dashboard guardians with calling AC evaluators or checking access in middleware

* linting fixes

* fix test

* more test fixes

* remove a todo comment
2025-03-20 17:38:09 +00:00
Will Browne
5b67ae1876
Plugins: Remove support for secrets manager plugins (#101467)
* remove secrets manager code

* remove unused struct

* add test toggles back

* rollback golden file changes

* add missing TestMain

* update betterer
2025-03-20 10:00:59 +00:00
Ryan McKinley
ff6a97f1a1
Provisioning: Update APIs in main (#102345) 2025-03-18 14:55:22 +02:00
Sven Grossmann
b5faf5d9a1
Drilldown: Require datasources:explore RBAC action (#101366)
Drilldown: Require `datasources:explore` acton
2025-02-26 17:33:05 +01:00
Gabriel MABILLE
f3433fd472
RBAC: Remove accessControlOnCall feature toggle (#101222)
* RBAC: Remove accessControlOnCall feature toggle

* Leave the other one in place

* Tests

* frontend

* Readd empty ft to frontend test

* Remove legacy RBAC check

* Fix test

* no need for context

* Remove unused variable

* Remove unecessary param

* remove unecessary param from tests

* More tests :D
2025-02-25 13:44:40 +01:00
Andre Pereira
e54149e551
Explore: Move drilldown apps from Explore to a new navbar item "Drilldown" (#100409)
* Move drilldown apps from Explore to a new navbar item "Drilldown"

* Commit make i18n-extract

* Update drilldown icon

* Added alert to explore with call out to drilldown apps

* Add isNew field for nav item which shows a "New!" badge on the navbar and expands it by default

* Fix e2e test
2025-02-20 17:56:55 +00:00
Hugo Kiyodi Oshiro
29afe7d2cc
Plugins: Remove managedPluginsInstall feature toggle (#100416)
* Plugins: Remove managedPluginsInstall feature toggle

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2025-02-17 16:07:41 +01:00
Matheus Macabu
3958fb9e0a
CloudMigrations: Introduce RBAC role for migration assistant (#98588)
* CloudMigrations: delete unused code

* CloudMigrations: add access control and protect API + navtree with action

* CloudMigrations: register access control roles

* CloudMigrations: gate frontend based with access control

* CloudMigrations: fix api tests

* CloudMigrations: add docs on new actions and roles

* CloudMigrations: dont interpolate vars to make it more greppable

* CloudMigrations: run prettier
2025-01-09 06:03:42 +02:00
Ryan McKinley
f6ccf976e5
UnifiedSearch: Use ResourceIndex from dashboards apiserver (v0alpha1 only) (#96939) 2024-11-27 07:57:53 +02:00