Commit Graph

11641 Commits

Author SHA1 Message Date
Gabriel MABILLE
83e9088314
AuthN: Set oauth client grant_types based on plugin state (#77248)
* Disable plugin service account

* Fix bug seen by linoman 💯

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>

* Account for PR feedback

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>

* Fix test data

* Enable datasource plugins by default

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>

* Update pkg/services/extsvcauth/oauthserver/oasimpl/service.go

* Handle error differently

* Fix service reg

---------

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2023-10-27 14:45:04 +02:00
Gabriel MABILLE
25b30aeb6d
Plugin: Enable service account based on plugin settings on init (#77193)
* Disable plugin service account

* Revert extsvc injection

* handle plugin state changes

* Use isProxyEnabled

* Remove plugininteg changes

* Change update function to also work for mysql 😩

* Plugin: enable service account based on plugin settings on
initialization

* Remove misleading comment

* Fix tests

* test message

* Clean up tests

* Simplify tests

* Re-order imports

* Remove unecessary comment

* Enable datasource plugins by default

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>

---------

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2023-10-27 14:27:06 +02:00
Gabriel MABILLE
2727f41474
AuthN: Change the external service account state on plugin state change (#77157)
* Disable plugin service account

* Revert extsvc injection

* handle plugin state changes

* Use isProxyEnabled

* Remove plugininteg changes

* Change update function to also work for mysql 😩

* Change test to also check no collateral update

* Update pkg/services/serviceaccounts/database/store_test.go

* Update pkg/services/serviceaccounts/database/store_test.go
2023-10-27 13:46:25 +02:00
Eric Leijonmarck
57335cb173
Team LBAC: Add validation/regex of teamheaders (#76905)
* add validation of team header values w. regex

* apply valid headers

* refactor testcases to account for badly formatted json

* refactoring to move validation code close to the validation itself

* removed tes

* Update pkg/api/datasources_test.go

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Update pkg/api/datasources.go

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* review comments

* review during pairing

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2023-10-27 12:37:37 +01:00
Matias Chomicki
46f331e284
Logs: remove toggleLabelsInLogsUI (#77264)
* toggleLabelsInLogsUI: remove flag

* Remove unused imports

* isFilterLabelActive: refId is not optional

* Revert "isFilterLabelActive: refId is not optional"

This reverts commit 008931b7e9.

* Revert method signature change

* Update tests

* Update tests
2023-10-27 13:00:49 +02:00
Shabeeb Khalid
df41378472
CloudWatch: Use context in aws ListSinks and ListAttachedLinks (#77083)
* Use context in aws ListSinks and ListAttachedLinks

In the current way, ListSinks and ListAttachedLinks is used which doesn't
allow cancelling the request if the context changes.
Using ListSinksWithContext and ListAttachedLinksWithContext is the
preferred way. Adding context for GetAccountsForCurrentUserOrRole
is required to pass it to ListSinks method.
2023-10-27 11:49:37 +03:00
Karl Persson
bc9fab6f30
IDForwarding: Update settings name (#77257)
Update settings name
2023-10-27 10:20:49 +02:00
Giuseppe Guerra
45bcbff115
Plugins: Fix plugin alias ID being used in PluginContext.ID (#77206)
* Fix PluginID being populated with alias in plugincontext Get and GetWithDataSource

* Add tests

* pr review suggestion

* pr review suggestion
2023-10-27 11:14:07 +03:00
Horst Gutmann
aa9fc3be72
CI: Fix release-npm-packages action (#77127)
* Remove dependency of NpmReleaseAction to the git binary

* Switch to using the node image for the release-npm-packages step
2023-10-27 10:20:20 +03:00
Karl Persson
1b6d39f823
IDForwarding: Require that id forwarding is enabled for data source (#77131)
* Require that id forwarding is enabled for data source

* Address feedback
2023-10-27 08:30:33 +02:00
Ezequiel Victorero
b2ef9a81f2
PublicDashboards: Chore refactor api test (#77091) 2023-10-26 14:52:27 -03:00
Ryan McKinley
7d619199d0
K8s/Authorizer: Move allow from fallback to org_role (#77235) 2023-10-26 20:46:45 +03:00
Ryan McKinley
c122ffc72b
K8s: Add integration test infra, and fix authz patterns (#77218) 2023-10-26 20:02:33 +03:00
Ieva
744f4defcf
Bug: fix a typo in dashboard permission logic (#77231)
fix an error handling typo
2023-10-26 19:39:27 +03:00
Ieva
f6e2a775d3
Bug fix: Correctly set permissions on provisioned dashboards (#77155)
* set default basic role permissions for dashboards even if dash creator permissions can't be set

* temporarily increase the test threshold until we can tweak the page
2023-10-26 17:21:50 +01:00
Ryan McKinley
ba1575322b
K8s: Share legacy storage configs with etcd based configs (#77181) 2023-10-26 09:05:51 -07:00
Kristin Laemmert
15c1d5f636
chore: add basic tracing to playlist service (#77165) 2023-10-26 09:25:31 -04:00
João Calisto
7869ca1932
Feature Management: UI improvements (#76866)
* Feature Management: UI improvements

* update UI logic

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2023-10-26 10:42:00 +01:00
Todd Treece
bf8af608a7
K8s: Add tracer provider to config (#77003) 2023-10-25 15:19:44 -04:00
Ryan McKinley
7e069f9d91
K8s: Move the namespace mapper to the same package that resolves them (#77101) 2023-10-25 14:13:46 -04:00
Ieva
39a30b0c01
Bug fix: add library panel permissions to basic roles (#77144)
set library panel permissions to basic roles
2023-10-25 18:44:55 +01:00
Misi
1e81ffccac
Auth: Handle when access token has already been refreshed in OAuth token sync (#77118)
* Use singleflight to prevent logging error if the token has already been refreshed

* Change order of error checks

* align tests, change error name

* Change sf key

* Update based on the review

* refactor
2023-10-25 18:15:41 +02:00
Ryan McKinley
d2732ae726
K8s: Add explicit table converter (#77098) 2023-10-25 09:00:20 -07:00
Santiago
f9fc2e4568
Alerting: Remove ConfigHash() from the Alertmanager interface (#77134) 2023-10-25 17:11:53 +02:00
Alexander Weaver
6ee52ac80c
Alerting: Allow more time before Alertmanager expire-resolves alerts (#77094)
* Sync endsAt factor with prometheus

* Fix state tests
2023-10-25 10:03:46 -05:00
linoman
dff7403b29
auth: implement feature flag for service account proxy (#77129)
* add FlagExternalServiceAccounts to proxy service

* add FlagExternalServiceAccounts value to tests

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-10-25 16:44:05 +02:00
Ryan McKinley
5d44240fca
K8s: Use grafana.app as the playlist+example group name domains (#77096) 2023-10-25 07:24:19 -07:00
Gilles De Mey
e12e40fc24
Alerting: Contact Points v2 part IV (#76063) 2023-10-25 15:57:53 +02:00
kay delaney
b215d2f0fb
Library Panels: Fix library panel creation with RBAC enabled (#76553) 2023-10-25 16:29:57 +03:00
Gabriel MABILLE
20fc0cbf35
Chore: Allow env overrides for the extended_jwt config (#77132)
Chore: Allow env overrides for the extended_jwt config
2023-10-25 14:28:12 +02:00
Marcus Efraimsson
9bf7eb5fbc
Plugins: Adds logging around loading of plugins for better tracking (#76896) 2023-10-25 14:01:30 +02:00
Santiago
322a9c0b15
Alerting: Replace FileStore() for CleanUp() in the Alertmanager interface (#77126)
Alerting: Remplace FileStore() for CleanUp() in the Alertmanager interface
2023-10-25 13:58:28 +02:00
linoman
1bc81b7bd1
auth: migrate api interface implementation (#77040)
* expand serviceaccount service interface

* implemet FakeServiceAccountService

* Replace SA service interface from api

* merge sa proxy tests with new fake service

* implement DeleteServiceAccountToken

* add test for DeleteServiceAccountToken
2023-10-25 12:40:30 +02:00
Santiago
01add144b8
Alerting: Send alerts to the remote Alertmanager (#77034)
* Alerting: Rename remote.ExternalAlertmanager to remote.Alertmanager

* Alerting: Send alerts to the remote Alertmanager

* add ticker to readiness check, add tests

* use options when creating a new sender.ExternaAlertmanager

* unexport defaultMaxQueueCapacity

* delete unused defaultConfig field

* add debug log line when sending alerts to the remote alertmanager

* move and refactor readiness check

* update tests to not include defaultConfig
2023-10-25 11:52:48 +02:00
Horst Gutmann
f7445777c7
CI: Temporarily disable arm build-tooling (#77064) 2023-10-24 18:14:08 +03:00
Hugo Kiyodi Oshiro
dfc1875061
Plugins: Add managed instance installation resources (#76767)
* Plugins: Add configs to allow managed install

* Expose methods to use with cloud plugin installer

* Change plugins installer bind to OSS
2023-10-24 16:21:37 +02:00
Todd Treece
162a422f0a
K8s: Playlist apply fix (#76971) 2023-10-24 10:19:17 -04:00
Gabriel MABILLE
897e3a4dab
AuthN: Add metrics to external service accounts management (#76789)
* AuthN: Add metrics to external service accounts management

* Add a new metric to count stored external service accounts

* Update variable names

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>

* Add test to SearchOrgServiceAccounts

* Add feature flags checks before registering and using the metrics

---------

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
2023-10-24 15:54:14 +02:00
Matias Chomicki
765defea1e
Loki Queries: Query Splitting enabled by default (#75876)
* Loki Query Splitting: enable by default

* Query splitting: add gdev dashboard

* Update testdata file

* Update devenv/dev-dashboards/datasource-loki/loki_query_splitting.json

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Revert "Update testdata file"

This reverts commit 5a891ba1f2.

* Update feature-toggles readme

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-10-24 16:09:30 +03:00
Alexander Zobnin
cad3c43bb1
Team LBAC: Move middleware to enterprise (#76969)
* Team LBAC: Move middleware to enterprise

* Remove ds proxy part

* Move utils to enterprise
2023-10-24 14:06:18 +03:00
Gabriel MABILLE
3015e5921f
Chore: Move extsvcaccounts package to serviceaccounts (#76977)
* Chore: Move extsvcaccounts package to serviceaccounts

* Fix proxy

* Fix tests

* Fix linting
2023-10-24 11:01:04 +02:00
Ieva
159bb3c032
RBAC: Allow scoping access to root level dashboards (#76987)
* correctly check permissions to list dashboards on the root

* correctly display the access inherited from general folder for dashboards

* Update pkg/services/sqlstore/permissions/dashboard.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Update dashboard_filter_no_subquery.go

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-10-24 11:55:38 +03:00
Sofia Papagiannaki
03a626f1d6
Search: Fix empty folder details for nested folder items (#76504)
* Introduce dashboard.folder_uid column

* Add data migration

* Search: Fix empty folder details for nested folders

* Set `dashboard.folder_uid` and update tests

* Add unique index

* lint

Ignore cyclomatic complexity of func
`(*DashboardServiceImpl).BuildSaveDashboardCommand

* Fix search by folder UID
2023-10-24 10:04:45 +03:00
Todd Treece
949b3af1b2
K8s: Remove duplicate listener in production (#76583) 2023-10-23 21:42:10 +03:00
ismail simsek
63abe25b74
InfluxDB: Fix table parsing with backend mode (#76899)
* Add resultFormat to query model

* don't add row name if the result format is table

* No need special formatting since we use unified dataframes

* betterer

* specify visualization type in response

* Unit tests

* fix unit tests
2023-10-23 19:21:30 +02:00
Kyle Brandt
59ef1558e8
Prometheus: (Chore) Switch to sdk tracing from infra tracing (#76975) 2023-10-23 13:11:12 -04:00
Ivan Ortega Alba
a03f9e7660
Feature toggle: Mark dashgpt as GA (#76304)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-10-23 09:39:12 -07:00
Shabeeb Khalid
3a9eb33b14
CloudWatch: Use context in aws GetResourcesPagesWithContext (#76921) 2023-10-23 11:46:48 -04:00
ismail simsek
5eb0b2bedb
InfluxDB: Fix aliasing with $measurement or $m on backend mode (#76917)
* better interpolation $measurement aliasing

* unit tests
2023-10-23 17:36:51 +02:00
Alexander Weaver
39599fa7f7
Alerting: Alert rule constraint violations return as 400s in provisioning API (#76396)
Constraint violations become 400s
2023-10-23 10:28:40 -05:00