Commit graph

4122 commits

Author SHA1 Message Date
Mihai Turdean
392a9a5645
IAM: Serve org users lookup using the new APIs in single-org mode (#126122)
* API: serve org users lookup from unified storage in single-org mode

The user picker for adding folder/dashboard permissions calls
/api/org/users/lookup, which joins the legacy org_user/user SQL tables. When
users are served from unified storage (kubernetesUsersApi), those tables are
empty, so the picker shows no users. In single-organization deployments, route
the lookup through the k8s-redirected userService.Search so it reads the shared
users. Falls back to the legacy org-scoped SQL search otherwise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* API: address review feedback on org users lookup

- Use the OpenFeature client to check the kubernetesUsersRedirect toggle
  instead of the deprecated IsEnabledGlobally (fixes lint-go failure)
- Fall back to a Gravatar URL when the searched user has no AvatarURL

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 11:16:37 -06:00
Laura Fernández
65f5a812dc
Chore: Remove grafanaconThemes (#126002) 2026-06-10 09:16:46 +00:00
Rafael Audibert
2ede9ce9aa
Analytics: Add PostHog echo backend (#122263)
* Analytics: Add PostHog echo backend

Add PostHog as a supported analytics backend for Grafana's echo service.
Users can configure `posthog_token` and optionally `posthog_host` in the
[analytics] section to forward all echo events to PostHog.

* add eslint ignore comments

* update sample.ini

---------

Co-authored-by: joshhunt <josh.hunt@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2026-06-09 12:30:17 +01:00
Ashley Harrison
eab5be80f1
Chore: Frontend-only changes to enable removing /helpflags route (#124984)
* frontend changes for removing /helpflags

* remove routes from the openapi spec
2026-06-09 10:13:55 +01:00
Dominik Prokop
84b1abae83
Reapply "Dashboards: Skip service for /api/dashboard/db (#122027)" (#124908) (#125950) 2026-06-08 20:23:01 +03:00
Ryan McKinley
0015a819bf
DataSource/Proxy: decouple from DataSourceService from ds_proxy (#125752) 2026-06-08 13:28:30 +03:00
Mihai Turdean
646053df9e
AccessControl: Resolve built-in grafana datasource type without a store lookup (#125780)
The built-in "-- Grafana --" datasource has no row in the datasource table,
so legacyConnectionClientImpl.GetConnectionByUID could never resolve its plugin
type. For RBAC roles carrying the seeded datasources:uid:grafana grant this was
silently unresolved, and for global roles (orgID 0, multi-org) the store lookup
failed with ErrDataSourceIdentifierNotSet, breaking role provisioning.

Its UID and type are fixed and identical across orgs, so resolve it directly in
the legacy connection client. This fixes datasource-type resolution for every
caller that goes through this client (provisioning save and the k8s migration
type resolvers) without a store row.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 08:43:09 -06:00
Ryan McKinley
743cc5bc11
DataSources/Proxy: Use map[string]any rather than simplejson (#125465) 2026-05-28 21:47:07 +03:00
Ezequiel Victorero
0ad90635e8
ShortURL: Improve get error handling and delete (#125654) 2026-05-28 12:20:06 -03:00
Sofia Papagiannaki
e99df4816b
Datasources: return 400 when payload UID does not match URL UID in PUT /api/datasources/uid/:uid (#125398)
* Datasources: return 400 when payload UID does not match URL UID in PUT /api/datasources/uid/:uid

* CI: update workspace
2026-05-25 17:28:52 +03:00
Ryan McKinley
538d9be70c
DataSource/Proxy: Move OAuthPassThru settings to the datasource package (#125325)
Some checks failed
Build Release Packages / Upload docker (ubuntu) / linux-armv7 (push) Has been cancelled
Build Release Packages / Upload docker (ubuntu) / linux-s390x (push) Has been cancelled
Build Release Packages / Upload docker (ubuntu-slim) / linux-amd64 (push) Has been cancelled
Build Release Packages / Upload docker (ubuntu-slim) / linux-arm64 (push) Has been cancelled
Build Release Packages / Upload docker (ubuntu-slim) / linux-armv7 (push) Has been cancelled
Build Release Packages / Upload docker (ubuntu-slim) / linux-s390x (push) Has been cancelled
Build Release Packages / Upload docker (distroless) / linux-amd64 (push) Has been cancelled
Build Release Packages / Upload docker (distroless) / linux-arm64 (push) Has been cancelled
Build Release Packages / Upload docker (distroless) / linux-armv7 (push) Has been cancelled
Build Release Packages / Upload docker (distroless) / linux-s390x (push) Has been cancelled
Build Release Packages / Upload docker (distroless-slim) / linux-amd64 (push) Has been cancelled
Build Release Packages / Upload docker (distroless-slim) / linux-arm64 (push) Has been cancelled
Build Release Packages / Upload docker (distroless-slim) / linux-armv7 (push) Has been cancelled
Build Release Packages / Upload docker (distroless-slim) / linux-s390x (push) Has been cancelled
Build Release Packages / Upload windows / windows-amd64 (push) Has been cancelled
Build Release Packages / Upload windows / windows-arm64 (push) Has been cancelled
Build Release Packages / publish-dockerhub (artifacts-docker, , artifacts-docker-alpine-slim, -slim, alpine) (push) Has been cancelled
Build Release Packages / publish-dockerhub (artifacts-docker-distroless, -distroless, artifacts-docker-distroless-slim, -distroless-slim, distroless) (push) Has been cancelled
Build Release Packages / publish-dockerhub (artifacts-docker-ubuntu, -ubuntu, artifacts-docker-ubuntu-slim, -ubuntu-slim, ubuntu) (push) Has been cancelled
Build Release Packages / Run Meticulous tests (push) Has been cancelled
Build Release Packages / Dispatch publish NPM canaries (push) Has been cancelled
Build Release Packages / notify-pr (push) Has been cancelled
Run Storybook a11y tests / Run Storybook a11y tests (dark theme) (push) Has been cancelled
Run Storybook a11y tests / Run Storybook a11y tests (deut_prot_dark theme) (push) Has been cancelled
Run Storybook a11y tests / Run Storybook a11y tests (deut_prot_light theme) (push) Has been cancelled
Run Storybook a11y tests / Run Storybook a11y tests (light theme) (push) Has been cancelled
Run Storybook a11y tests / Run Storybook a11y tests (tritanopia_dark theme) (push) Has been cancelled
Run Storybook a11y tests / Run Storybook a11y tests (tritanopia_light theme) (push) Has been cancelled
Run Storybook a11y tests / Storybook a11y tests (push) Has been cancelled
Swagger generated code / Verify committed API specs match (push) Has been cancelled
2026-05-23 13:36:49 +03:00
Ryan McKinley
0fedd316eb
Datasource Proxy: Restrict full access to setting.Cfg (#125180)
Plugin Proxy: Narrow data source config to DataSourceProxySettings

The data source proxy only needs a handful of fields from setting.Cfg.
Introduce a focused DataSourceProxySettings struct that exposes only
those fields, load Azure settings lazily via a resolver callback so the
proxy avoids touching Azure configuration unless an Azure-authenticated
route is matched, and pass the new struct through the datasource proxy
service in place of *setting.Cfg.
2026-05-21 12:09:14 +03:00
Ezequiel Victorero
fb462e632c
ShortURL: Improve error handling in k8s goto redirect (#124983) 2026-05-19 10:55:19 -03:00
Kevin Minehart Tenorio
5f3f12b4e0
apply security patches (#124912)
* patch(security): restrict SSO token injection to allowlisted GCOM proxy paths

GL-Vuln: VUL-2026-0050

* patch(security): Snapshots: Wire SignedInUser on K8s custom route handlers

GL-Vuln: VUL-2026-0054

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-14 16:27:17 +00:00
Laura Fernández
c6345ce2ce
Chore: remove regionalFormat code in backend (#124610) 2026-05-14 17:00:47 +01:00
Dominik Prokop
d0a7c77508
Revert "Dashboards: Skip service for /api/dashboard/db (#122027)" (#124908)
This reverts commit 91e2732c10.
2026-05-14 15:32:11 +00:00
Josh Hunt
7e1ce459d5
Preferences: Use K8s client in legacy user api endpoints (#123808)
* legacy prefs api uses k8s impl

* tests

* fix workspace

* fix preferences flag

* fix team preferences not using open feature

* reword comment

* split tests into legacy + k8s, update first test

* update remaining tests

* kick CI

* kick CI again

* fix go linting

* refactor to use shared utils

* remove unnecessary skipping of test

* adjust logic of team authorizer

* stop checking if AccessClient is nil

* change comment for authoriser special case

* refactor to use context.Context

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2026-05-14 14:01:25 +01:00
Mustafa Sencer Özcan
4453ac1688
fix: starred dashboards nav tree display (#124841) 2026-05-14 14:54:35 +03:00
Mariell Hoversholm
fb7336fc36
patch(security): apply May 2026 patches (#124824)
* patch(security): Access Control: Fix Editor can remove any annotation

GL-Vuln: VUL-2026-0018
GL-Public-After: 2026-05-12
GL-Partner-Rel: 2026-04-27
GL-Partner-Ack: 2026-02-17

* patch(security): fix(live): limit input body to 500k

GL-Vuln: VUL-2026-0031 https://ops.grafana-ops.net/a/grafana-vulnerabilityobs-app/first-party/63
GL-Partner-Rel: 2026-04-09
GL-Public-After: 2026-05-12
GL-Partner-Ack: 2026-02-25T14:02:00Z

* patch(security): fix(plugins): limit input resource sizes

GL-Vuln: VUL-2026-0032 https://ops.grafana-ops.net/a/grafana-vulnerabilityobs-app/first-party/64
GL-Partner-Rel: 2026-04-09
GL-Public-After: 2026-05-12
GL-Partner-Ack: 2026-02-25T14:02:00Z

* patch(security): patch(security): fix broken access control in snapshot delete handler

GL-Vuln: VUL-2026-0044 https://ops.grafana-ops.net/a/grafana-vulnerabilityobs-app/first-party/76
GL-Partner-Rel: 2026-04-09
GL-Public-After: 2026-05-12
GL-Partner-Ack: 2026-03-31

* patch(security): patch(security): fix auth proxy IPv6 bare whitelist parsing (main)

GL-Vuln: VUL-2026-0045 https://ops.grafana-ops.net/a/grafana-vulnerabilityobs-app/first-party/77
GL-Partner-Rel: 2026-04-09
GL-Public-After: 2026-05-12
GL-Partner-Ack: 2026-03-30

* patch(security): Live: Avoid concurrent map read and map write

GL-Vuln: VUL-2026-0049 https://ops.grafana-ops.net/a/grafana-vulnerabilityobs-app/first-party/81
GL-Partner-Rel: 2026-04-09
GL-Public-After: 2026-05-12
GL-Partner-Ack: 2026-03-18

* patch(security): Dashboards: Fix /import permission setting

GL-Vuln: VUL-2026-0058 https://ops.grafana-ops.net/a/grafana-vulnerabilityobs-app/first-party/90
GL-Partner-Rel: 2026-04-09
GL-Public-After: 2026-05-12
GL-Partner-Ack: 2026-03-24

* patch(security): MSSQL, MySQL, postgres infinite loop exploit

GL-Vuln: VUL-2026-0057 https://ops.grafana-ops.net/a/grafana-vulnerabilityobs-app/first-party/89
GL-Partner-Rel: 2026-04-09
GL-Public-After: 2026-05-12
GL-Partner-Ack: 2026-03-20

* patch(security): patch(security): ServiceAccounts RBAC cache invalidation on permission change

GL-Vuln: VUL-2026-0061
GL-Public-After: 2026-05-12
GL-Partner-Rel: 2026-04-15
GL-Partner-Ack: 2026-04-06

* patch(security): SQL Expressions: Fix Security Bugs

GL-Vuln: VUL-2026-0064
GL-Public-After: 2026-05-12
GL-Partner-Rel: 2026-04-27
GL-Partner-Ack: 2026-04-11

* fix: nolint gocyclo

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-13 18:53:11 +02:00
Ryan McKinley
91e2732c10
Dashboards: Skip service for /api/dashboard/db (#122027) 2026-05-13 16:59:38 +02:00
Marc Sanmiquel
83838c58c1
Data Source: Cap forwarded User-Agent length (#124704) 2026-05-13 10:17:20 +02:00
Ryan McKinley
29939bcd79
DataSources: Load secure values from decrypter (#124515) 2026-05-11 18:58:44 +03:00
Victor Marin
2653465b7d
Annotations: Expose AnnotationAppPlatform.Enabled to FE bootstrap (#124386)
* feat(annotations): expose AnnotationAppPlatform.Enabled to FE bootstrap

Mirrors [annotations.app_platform] enabled into the frontend bootstrap
settings DTO so the client can route reads/writes through
/apis/annotation.grafana.app when on. Avoids adding a feature toggle
since the gate is fundamentally a deployment-time decision: "is the
new annotation app platform endpoint serving requests?".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* cleanup

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 18:42:34 +03:00
Michael Mandrus
aff227b764
Chore: Deprecate legacy encryption package for MT apps (#124337)
* deprecate packages

* nolint annotations

* more nolints

* more lint issues

* fix comment
2026-05-07 09:38:09 +02:00
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
ismail simsek
4fb13216fe
Zipkin: Remove from core plugins (#124148)
* delete zipkin backend

* delete zipkin frontend

* delete zipkin docker devenv

* update codeowners

* remove zipkin from more places

* copy transformToZipkin

* fix: update tests after Zipkin removal from core plugins

- Remove extra Zipkin nil arg from ProvideCoreRegistry call in plugin_resource_test.go
- Update fixture item count from 54 to 53 in v0alpha1AppMapper and v0alpha1PanelMapper tests
- Fix prettier formatting in v0alpha1Response.ts test fixture

Co-authored-by: Cursor <cursoragent@cursor.com>

* lint

* put zipkin back

* remove zipkin e2e test

* update length

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 13:31:03 +02:00
Marc Sanmiquel
fecc9466b4
Data Source: Add forward_user_agent option to preserve client User-Agent (#124244)
* Data Source: Add forward_user_agent option to preserve client User-Agent

* Update pkg/api/pluginproxy/ds_proxy.go

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>

* Data Source: Fix gofmt and add test for empty DataProxyUserAgent

---------

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2026-05-06 12:15:38 +02:00
Ryan McKinley
e726a67f8b
AppPlugins: Refactor plugin proxy for easier reuse in apiserver (#124075) 2026-05-05 14:11:47 +00:00
Syerikjan Kh
ccdf732763
Auth: Use dedicated token for requests to Grafana.com (#122269)
* feat: use dedicated token for plugin related requests to Grafana.com

Introduce install_token in the [plugins] config section as a dedicated
token for all plugin-related requests to the Grafana.com API (catalog
browsing, plugin downloads, grafana-cli installs). Falls back to
sso_api_token when install_token is not configured, preserving
backward compatibility.

* feat: guard dedicated gnet_proxy_token with feature flag

* ref: rename install_token to gnet_proxy_token under [grafana_com] section

- Move config key from [plugins] to [grafana_com], rename install_token -> proxy_token

* ref: rename feature flag to grafana.dedicatedGrafanaComProxyAPIToken
2026-05-05 09:55:22 -04:00
Ezequiel Victorero
0dd60fda62
Snapshots: Add public mode and external token support to snapshot MT k8s api (#120619) 2026-04-30 12:01:04 -03:00
Rafael Bortolon Paulovic
ee5fc1201c
Folder: Wrap remaining validation errors in metav1.Status (#123843)
* Folder: Wrap remaining validation errors in metav1.Status (follow-up)

Continues #123709 by extending APIStatus coverage to the remaining folder
admission validator paths that surfaced as 500 in production:

- Dashboard UID errors: validate.go now returns ErrAPIInvalidUID/ErrAPIUIDTooLong
  (errutil wrappers around the legacy dashboards sentinels) so they implement
  APIStatus and render as 400 instead of "Unhandled Error" 500.
- ErrNameExists: both call sites use .Errorf(...) so the apiserver gets an
  APIStatus error instead of a raw Base value.
- New ErrFolderCannotBeMovedToK6 for the k6 move rejection.
- ErrCircularReference reused for the move-under-descendant case.

ToFolderStatusError now copies errutil.Error.Status().Details into the
returned metav1.Status so downstream consumers can match on the structured
messageID via Status.Details.UID without parsing the human message.

ToFolderErrorResponse: dashboard branch only strips the errutil prefix when
the chain contains an errutil.Error AND the underlying matches one of
stableDashboardErrSentinels — keeps legacy /api/folders messages
byte-stable without dropping custom context from non-errutil callers.

Tests: TestIntegrationFolderValidationReturns400 is now a 9-row table
covering all create + update validation paths, each asserting Code=400,
exact message, and the messageID via Status.Details.UID.
doCreateCircularReferenceFolderTest fixed (broken JSON was silently
passing) and extended with a create-then-move circular flow.
TestToFolderErrorResponse moved to apierrors_test package so it can
reference the production folders.ErrAPI* wrappers directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Folder: gofmt fix

* Folder: clarify ErrAPIInvalidUID/ErrAPIUIDTooLong comment

* Folder: clarify validation error comments

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 11:50:49 +02:00
Yudintsev George (Egor)
0d0de1ebb3
GlobalRoles: Chore: export fixed roles (#123339)
issue: grafana/identity-access-team#2044

ENT: grafana/grafana-enterprise#11790

What is this feature?

We want to have one place which contains all the fixed: roles to register them on IAM service side.

This PR modifies the existing code to export the fixed: roles.
2026-04-29 15:36:15 +02:00
Ryan McKinley
e2bbde932e
Preferences: Remove unused/undocumented preferences api (#123784) 2026-04-29 09:43:08 +01:00
Rafael Bortolon Paulovic
fefb9483f3
Folder: Wrap validation errors in metav1.Status (#123709)
* Folder: Wrap validation errors in metav1.Status

The folder admission validator returned bare errors that the k8s apiserver
could not convert to a structured response, surfacing them as "Unhandled
Error" 500s instead of proper 4xx responses (alert #1782995). The bulk of
the SLO budget burn came from the max-depth check; the same pattern also
affected invalid-uid, title-empty, parent-of-itself, and cyclic-reference.

Wrap each one with errutil so they implement the APIStatus interface and
the apiserver renders them as structured 4xx. The legacy /api routes keep
their original errors.New sentinels and unchanged err.Error() strings;
new ErrAPIxxx variants in pkg/services/folder/model.go are pre-wrapped via
%w so errors.Is keeps matching the legacy sentinels for the existing
ToFolderErrorResponse handler.

Also moved the cyclic-reference sentinel from a local var in parents.go
into model.go for consistency, and retyped TestValidateCreate.expectedErr
from substring to typed error so assertions go through errors.Is.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Folder: Integration test for max-depth returning 400 not 500

Boots the folder apiserver via apis.NewK8sTestHelper, creates the
maximum allowed nesting (default depth 4), then attempts one more
folder and asserts the response is HTTP 400 BadRequest, not 500
InternalError. Guards the regression that fired alert #1782995.

Note: placed in pkg/tests/apis/folder/ rather than provisioning
because the bug is in the folder apiserver itself; provisioning is
just one of many consumers of that error path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Folder: Assert exact error message format for max-depth in integration test

Provisioning and external observability tooling consume the message
returned by the apiserver. Pin the full string ("[folder.maximum-depth-reached]
folder max depth exceeded, max depth is 4") so any change to the messageID
or the depth log message format fails this test.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Folder: gofmt fix

* Folder: add validation tests for other scenarios
- title-empty, invalid-uid, cannot-be-parent-of-itself
- fix TestIntegrationFoldersCreateAPIEndpointK8S

* Folder: Validation tests for other scenarios - title-empty, invalid-uid, cannot-be-parent-of-itself - fix TestIntegrationFoldersCreateAPIEndpointK8S

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 17:00:14 +02:00
Matheus Macabu
91337844c1
Plugins: Remove rendering related code (#123519) 2026-04-28 08:54:44 +02:00
Jack Westbrook
7d6e08a6d5
Frontend: Rewrite SRI checks feature flag to support frontend-service (#123491)
* refactor(frontend): rename assetSriChecks and generate go

* feat(frontend-service): pass sri checks feature flag to frontend html template

* feat(backend): pass asset sri check feature flag to st frontend template

* build(webpack): use global __grafanaAssetSriChecksEnabled var to control sri checks in async loading

* chore(frontend-service): add assetSriChecks to goff-flags.yaml

* docs(webpack): add more info on what and why to featureflaggedsriplugin
2026-04-27 14:43:09 +02:00
Ryan McKinley
b28e0e4992
Storage: Remove storage http bindings and feature toggle (#123484) 2026-04-25 00:56:27 +03:00
Yulia Shanyrova
b556615d74
Plugins: Add include-datasource param to show nested datasources in catalog (#122957)
* add include-datasource param to show nested datasources in catalog

* Add unit tests
2026-04-24 10:00:07 +02:00
Ryan McKinley
b8fd1b6c6b
Chore: use go 1.26.2 (#123379)
* golang 1.26

* bump all modules and docker file

* fix plugins test

---------

Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
2026-04-23 17:40:14 +03:00
Ryan McKinley
0dd281f4fd
User: Expose team UIDs as Groups (#123228) 2026-04-23 09:21:10 +00:00
Ryan McKinley
78a565bf18
Chore: Use range where possible (#123281) 2026-04-22 22:56:28 +00:00
Chris Chang
4c5defc4da
Alerting: Allow restricting contact point integration types (#118858)
* add config option [unified_alerting].allowed_integrations that controls what integration types are allowed for configuration. 
* fix contact point front-end component to disable not allowed integration types in the list. 

---------

Co-authored-by: Santiago Hernández <santiagohernandez.1997@gmail.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2026-04-20 14:41:15 -04: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
Stephanie Hingtgen
0e23c32329
Homepage: Support v2 dashboards if defined by a file (#122994) 2026-04-20 04:32:36 -05:00
beejeebus
2a197675f8
Add new feature flag for rollout of datasource CRUD APIs (#122618)
This PR adds `FlagDatasourceUseNewCRUDAPIs` and uses it for the backend
rollout of new CRUD APIs for datasources.

Previously we were using `FlagQueryServiceWithConnections`, but this
caused coupling withe rollout of the query service and caching.
2026-04-17 10:59:26 -04:00
Ryan McKinley
7516cc9233
Chore: Add K8s client provider (#122900) 2026-04-17 13:47:54 +03:00
John Clayton
9f585f3428
Auth: URL-encode redirectTo cookie value in OAuth login flow (#121953)
Some checks are pending
Build Release Packages / Upload deb/rpm / linux-s390x (push) Blocked by required conditions
Build Release Packages / Upload deb/rpm / linux-riscv64 (push) Blocked by required conditions
Build Release Packages / Upload docker (alpine) / linux-amd64 (push) Blocked by required conditions
Build Release Packages / Upload docker (alpine) / linux-arm64 (push) Blocked by required conditions
Build Release Packages / Upload docker (alpine) / linux-armv7 (push) Blocked by required conditions
Build Release Packages / Upload docker (alpine) / linux-s390x (push) Blocked by required conditions
Build Release Packages / Upload docker (ubuntu) / linux-amd64 (push) Blocked by required conditions
Build Release Packages / Upload docker (ubuntu) / linux-arm64 (push) Blocked by required conditions
Build Release Packages / Upload docker (ubuntu) / linux-armv7 (push) Blocked by required conditions
Build Release Packages / Upload docker (ubuntu) / linux-s390x (push) Blocked by required conditions
Build Release Packages / Upload windows / windows-amd64 (push) Blocked by required conditions
Build Release Packages / Upload windows / windows-arm64 (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
trigger-dashboard-search-e2e / trigger-search-e2e (push) Waiting to run
Trivy Scan / trivy-scan (push) Waiting to run
Go's net/http silently strips double-quote characters from cookie
values because they are not valid per RFC 6265. This causes redirectTo
URLs containing quotes (e.g. PromQL label matchers like {label="value"})
to be corrupted during the OAuth login redirect flow.

URL-encode the redirectTo value before writing it to the cookie, pairing
with the existing url.QueryUnescape on the read side in handleLogin.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:45:36 +02:00
Jo
c23637cfa8
Users: Use SHA-256 for Gravatar email identifier (#122319)
Use SHA-256 for Gravatar email hashes per current Gravatar docs
2026-04-13 16:12:51 +02:00
Will Assis
bdbb736263
unified-storage: fix case permission on folder list query (#122334) 2026-04-10 14:44:30 -03:00
Ryan McKinley
043af14f5e
Dashboard/DTO: Remove isStarred property (#122118) 2026-04-10 11:29:05 +03:00