Commit Graph

5473 Commits

Author SHA1 Message Date
Will Browne
91b0cdc871
Plugins: Account for nil user when constructing plugin context (#69811)
cater for nil user
2023-06-08 19:36:41 +03:00
Ryan McKinley
8aae6b679a
FeatureFlags: Change alpha/beta language to align with release staging language (#69422) 2023-06-08 09:16:55 -07:00
Alexander Zobnin
4e1f69d83f
Authentication UI: Enable by default (#69803) 2023-06-08 18:53:51 +03:00
Will Browne
624777258b
Plugins: Refactor creation of plugin context to dedicated service (#66451)
* first pass

* fix tests

* return errs

* change signature

* tidy

* delete unnecessary fields from test

* tidy

* fix tests

* simplify

* separate error check in API

* apply nits
2023-06-08 13:59:51 +02:00
Will Browne
a221e1d226
Plugins: Standardize Golang enum naming convention (#69449)
* standardize enum pattern

* fix up
2023-06-08 12:21:19 +02:00
Eric Leijonmarck
5dceb5dff3
Service accounts: API key migration refactoring to parse as json object of the results (#69771)
refactoring to parse as json object of the results
2023-06-08 12:12:26 +02:00
Eric Leijonmarck
081f59feba
Service accounts: UI migration results (#68789)
* ui migration WIP

* merge

* migration tests for api

* revert chagnes to align with main

* revert chagnes to align with main

* revert chagnes to align with main

* remove unused code and comments

* revert gen files

* retry logic inplace

* fix a any

* fixed types

* migraiton results now show only result if no failures

* review comments

* wording to make it more actionable

* add migraiton summary text onyl for failed apikeys

* fixed wording and added a close button to the modal

* made the button close the modal

* moved state into component

* fix based on review, naming and removed unused code

* service account migration state optional

* making migration result undefined

* showing total and migrated numbers for a successful migration

* fix payload const to take the payload
2023-06-08 10:09:30 +02:00
Giuseppe Guerra
f148b5fb28
Plugins: Forbid loading Angular plugins when Angular is disabled (#69679)
* Plugins: Forbid loading Angular plugins when Angular is disabled

* Plugins: Made angulardetector a service, add tests for angular loader cases

* Fix missing import

* Add nolint:gocyclo to loadPlugins
2023-06-07 11:08:01 +02:00
Jo
aee5c6dea0
Auth: Use auth broker by default (#69620)
remove authnservice toggle
2023-06-07 08:57:41 +02:00
Jev Forsberg
c0a1fc2cbd
SQL Datasources: Reinstate SQL data source behavior around database selection when default configured databases already exist (#65659)
* badlm0mma/sql_datasource_update/ initial notes

* baldm0mma/sql_datasource_update/ solution

* baldm0mma/sql_datasource_update/ clean datasetSelector

* baldm0mma/sql_datasource_update/ clean up queryEditor.tsx

* baldm0mma/sql_datasource_update/ clewan up queryHeader.tsx

* baldm0mma/sql_datasource_update/ clean up tableSelector.tsx

* baldm0mma/sql_datasource_update/ clean up mysqlDatasource.ts

* baldm0mma/sql_datasource_update/ clean up configurationEditor.tsx

* baldm0mma/sql_datasource_update/ rem conlog from queryEditor.tsx

* baldm0mma/sql_datasource_update/ rem conlog from queryEditor.tsx

* baldm0mma/sql_datasource_update/ remove conlog in tableSelector.tsx

* baldm0mma/sql_datasource_update/ rem conlog in sqlDatasource.ts

* baldm0mma/sql_datasource_update/ update deafult database value in sqlDatasource.ts

* baldm0mma/sql_datasource_update/ update logic to accomidate no preconfig

* baldm0mma/sql_datasource_update/ update props

* baldm0mma/sql_datasource_update/ update prop names

* baldm0mma/sql_datasource_update/ update prop names in tableSelector

* baldm0mma/sql_datasource_update/ update annos in datasetSelector

* baldm0mma/sql_datasource_update/ update naming

* baldm0mma/sql_datasource_update/ update to standard langauae

* baldm0mma/sql_datasource_update/ update prop names

* baldm0mma/sql_datasource_update/ update annos in datasetSelector

* baldm0mma/sql_datasource_update/ remove unused import in tableSelector.tsx

* baldm0mma/sql_datasource_update/ remove addDefaultdataset

* baldm0mma/sql_datasource_update/ reset query when needed

* baldm0mma/sql_datasource_update/ update asymc return val

* baldm0mma/sql_datasource_update/ remove psql query editor

* baldm0mma/sql_datasource_update/ remove con logs in defaults.ts

* baldm0mma/sql_datasource_update/ revert postgres changes

* baldm0mma/sql_datasource_update/ update postgres naming

* baldm0mma/sql_datasource_update/ add altert

* baldm0mma/sql_datasource_update/ update annos and add alerts and alert logic

* baldm0mma/sql_datasource_update/ update postgres nomenclature

* baldm0mma/sql_datasource_update/ update annos and remove con logs

* baldm0mma/sql_datasource_update/ update nomenclature

* baldm0mma/sql_datasource_update/ drone fix

* baldm0mma/sql_datasource_update/ export and format

* baldm0mma/sql_datasource_update/ update docs for mysql datasource with dataset dropdown disable info

* baldm0mma/sql_datasource_update/ update mssql docs

* baldm0mma/sql_datasource_update/ update postgres docs and alert logic

* baldm0mma/sql_datasource_update/ add tests

* baldm0mma/sql_datasource_update/ update docs

* baldm0mma/sql_datasource_update/ update test names

* baldm0mma/sql_datasource_update/ update alert language

* baldm0mma/sql_datasource_update/ correct spelling

* baldm0mma/sql_datasource_update/ update postgres query builder image

* baldm0mma/sql_datasource_update/ update annos

* baldm0mma/sql_datasource_update/ update tests

* baldm0mma/sql_datasource_update/ docs updated

* baldm0mma/sql_datsource_update/ refactor determinePlaceholder

* Update public/app/features/plugins/sql/components/QueryEditor.tsx

spelling

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* Update public/app/features/plugins/sql/components/QueryEditor.tsx

spelling

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* baldm0mma/sql_datasource_update/ remove superfluous cleanup data from tests

* baldm0mma/sql_datasource_update/ update spelling

* Update public/app/features/plugins/sql/components/SqlComponents.test.tsx

spelling

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* baldm0mma/sql_datasource_update/ add logic to prevent db call for tables if dataset it nullish

* baldm0mma/sql_datasource_update/ update alert tests

* baldm0mma/sql_datasource_update/ update button text

* baldm0mma/sql_datasource_update/ update tests to preferred standard

* baldm0mma/sql_datasource_update/add feature flag

* baldm0mma/sql_datasource_update/ update mssql docs

* baldm0mma/sql_datasource_update/ add feature flag to registry

* baldm0mma/sql_datasource_update/ adjust table and dataset dropdown logic

* baldm0mma/sql_datasource_update/ update testing to deal with feature flag

* baldm0mma/sql_datasource_update/ update wioth cascadeDisable

* baldm0mma/sql_datasource_update/ update naming

* baldm0mma/sql_datasource_update/ update tests to reflect enabled feature flag

* baldm0mma/sql_datasource_update/ update annotations

* baldm0mma/sql_datasource_update/ update annos in queryEd

* baldm0mma/sql_datasource_update/ update test names

* baldm0mma/sql_datasource_update/ update anno issues

* baldm0mma/slq_datasource_update/ add query to sqlDatasource with error

* baldm0mma/sql_datasource_update/ update docs language

* baldm0mma/sql_datasource_update/ remove notes to self

* baldm0mma/sql_datasource_update/ add QueryEditorFeatureFlag.utils.ts

* baldm0mma/sql_datasource_update/ update database into json

* baldm0mma/sql_datasource_update/ found file

* Update docs/sources/datasources/mssql/query-editor/index.md

Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>

* baldm0mma/sql_datasource_update/ update feature flag and toggles

* baldm0mma/sql_datasource_update/ add hasConfigIssue, update annos, rethink disable logic

* baldm0mma/sql_datasource_update/ update warning language

* baldm0mma/sql_datasource_update/ update button content

* baldm0mma/sql_datasource_update/ update jsonData logic in frontendsettings.go

* baldm0mma/sql_datasource_update/ update jsonData logic

* baldm0mma/sql_datasource_update/ update annos in frontendsettings.go

* baldm0mma/sql_datasource_update/ update sql editor docs

* baldm0mma/sql_datasource_update/ update mysql docs

* baldm0mma/sql_datasource_update/ update postgres docs

* baldm0mma/sql_datasource_update/ remove unused code in datasetSelector.tsx

* baldm0mma/sql_datasource_update/ update syntax conventions

* baldm0mma/sql_datasource_update/ add logs

* baldm0mma/sql_datasource_update/ remove unused code

* baldm0mma/sql_datasource_update/ remove conlogs

* baldm0mma/sql_datasource_update/ update tests

* baldm0mma/sql_datasource_update/ add second error to query

* baldm0mma/sql_datasource_update/ run make gen-cue

* baldm0mma/sql_database_update/ lint registry

* baldm0mma/sql_datasource_update/ update registry

* baldm0mma/sql_datasource_update/ upate datasource logic

* baldm0mma/sql_datasource_update/ add logs

* baldm0mma/sql_datasource_update/ add comms to self

* baldm0mma/sql_datasource_update/ comment out false pos tests, and add investigatory comments

* baldm0mma/sql_database_update/ update query error to only test for config change if query was made in "builder" mode

* baldm0mma/sql_datasource_update/ update annos in frontendsettings.go

* baldm0mma/sql_datasource_update/ update error logic to datasource

* baldm0mma/sql_datasource_update/ remove alerts from query editor

* baldm0mma/sql_datasource_update/ remove unused imports

* baldm0mma/sql_datasource_update/ update tests

* baldm0mma/sql_datasource_update/ remove comments

* baldm0mma/sql_datasource_update/ remove logs in queryGroup.tsx

* baldm0mma/sql_datasource_update/ remove outdated annotation in datasetSelector.tsx

* baldm0mma/sql_datasource_update/ remove superfluous test and update test description

* baldm0mma/sql_datasource_update/ remove feature flag

* baldm0mma/sql_datasource_update/ add back feature flag

* baldm0mma/sql_datasource_update/ update to enums

* baldm0mma/sql_datasource_update/ update panel caps

* baldm0mma/sql_datasource_update/ update dataset selector to default update the database correctly

* baldm0mma/sql_datasource_update/ move onChange into conditional

* baldm0mma/sql_datasource_update/ add logic for previous datasets choice

* baldm0mma/sql_datasource_update/ add back previous logic for assigning default datasets

* baldm0mma/sql_datasource_update/ update useEffect dep array

* baldm0mma/sql_datasource_update/ remove feature toggle

* baldm0mma/sql_datasource_update/ add feature toggle

---------

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
2023-06-06 10:28:52 -06:00
Giuseppe Guerra
7a132680ef
Revert "Plugins: Forbid loading Angular plugins when Angular is disabled (#69225)" (#69657)
This reverts commit ff34279ff4.
2023-06-06 18:09:41 +02:00
Giuseppe Guerra
ff34279ff4
Plugins: Forbid loading Angular plugins when Angular is disabled (#69225)
* Plugins: Forbid loading Angular plugins when Angular is disabled

* Plugins: Made angulardetector a service, add tests for angular loader cases

* Fix missing import
2023-06-06 17:14:31 +02:00
Alexa V
07dd90b5a8
Dashboards: Variables - Improve slow template variable loading due same variable loaded multiple times on time range change (#66965) 2023-06-06 16:12:09 +03:00
Michael Mandrus
f1178e0b81
Prevent crash while executing concurrent mixed queries (#874)
limit parallel query execution to 1 at a time
2023-06-06 13:49:21 +02:00
Horst Gutmann
f4c04d4055
Alerting: Update patch for #865 after #68898 (#890) 2023-06-06 13:38:37 +02:00
dsotirakis
f9c310dbaf
Require alert.notifications:write permissions to test receivers and templates (#865)
# Conflicts:
#	pkg/services/ngalert/api/authorization.go
2023-06-06 13:33:56 +02:00
Ieva
7871052899
RBAC: remove unused code (#69470)
remove unused code
2023-06-05 15:47:22 +01:00
Ashley Harrison
d1a32d4baa
Chore: update user-essentials to frontend-platform (#69533)
user-essentials -> frontend-platform
2023-06-05 12:24:17 +01:00
Eng Zer Jun
cf1945d0c3
Tests: use t.Setenv to set env vars (#69516)
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-06-05 11:31:03 +02:00
Esteban Beltran
1ed4c0382b
Plugins: Add Initial implementation for frontend plugins sandboxing (#68889) 2023-06-05 10:51:36 +02:00
Matthew Jacobson
c16f1f5e99
Alerting: Fix provisioned templates being ignored by alertmanager (#69485)
* Alerting: Fix provisioned templates being ignored by alertmanager

Template provisioning sets the template in cfg.TemplateFiles while a recent change
made it so that alertmanager reads cfg.AlertmanagerConfig.Templates instead.

This change fixes the issue on both ends, by having provisioning set boths fields and
reverts the change on the alertmanager side so that it uses cfg.TemplateFiles.
2023-06-02 15:47:43 -04:00
Arati R
6cb1a5e368
Nested folders: Add alert rule counts and deletion to folder registry (#67259)
* Let alert rule service implement registry service
* Add count method to RuleStore interface
* Add implementation for deletion of alert rules
* Rename uid to folderUID in registry methods
* Check forceDeleteRule value for registry deletion
* Register alerting store with folder service
* Move folder test functions to separate package
* Add testing for alert rule counting, deletion
* Remove redundant count method
* Fix deleteChildrenInFolder signature
* Update pkg/services/ngalert/store/alert_rule.go
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Add tests for nested folder deletion
* Refactor TestIntegrationNestedFolderService
* Add rules store as parameter for alertng provider

---------

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-06-02 16:38:02 +02:00
Ivana Huckova
06003c98c8
Loki: Add predefined operations functionality behind feature flag (#69379)
* Add feature toggle for lokiPredefinedOperations

* Add config editor for predefined operations

* Add predefined patterns to editor

* Update content in tooltip

* Update public/app/plugins/datasource/loki/configuration/QuerySettings.tsx

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Update public/app/plugins/datasource/loki/components/LokiQueryEditor.tsx

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Add experimental badge

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-06-02 12:52:36 +02:00
Ashley Harrison
5a98348faf
Chore: remove i18n toggle (#69389)
* remove i18n toggle

* remove beta badge on language picker

* remove toggle from go code

* Revert "remove beta badge on language picker"

This reverts commit 3b76300aa7.
2023-06-02 09:24:40 +01:00
Misi
28bb960e42
AuthN: Make clientTokenRotation work when Grafana is accessible on a sub url (#69385)
Fix clientTokenRotation for auth-proxy
2023-06-01 17:06:00 +02:00
17billion
6d9db92a07
Dashboards: Improve delete dashboard performance due to slow annotations query (#68544)
* Add index on dashboard_id column in annotation table

* Added org_id condition to the delete query for dashboard deletion.
2023-06-01 15:31:03 +03:00
Ieva
d8b66d5c4b
RBAC: remove some IsDisabled checks (#69272)
* remove some access contorl IsDisabled() checks

* cleaning up tests

* update tests

* linting
2023-05-31 09:58:57 +01:00
Artur Wierzbicki
15f06a93b2
Storage: increase size of the contents column (#69152)
* fix size of contents column

* temporarily re-enable integration tests

* lint

* revert: temporarily re-enable integration tests
2023-05-30 21:11:04 +04:00
Alexander Weaver
0ed5d3bdf2
Revert "Alerting: Refactor the ImageStore/Provider to provide image URL/bytes" (#69265)
Revert "Alerting: Refactor the ImageStore/Provider to provide image URL/bytes (#67693)"

This reverts commit 72a187b0be.
2023-05-30 11:33:33 -05:00
Ryan McKinley
a61d828998
FeatureFlags: Support hiding from docs (#69261) 2023-05-30 09:04:01 -07:00
Alexander Weaver
0f88b117dc
Alerting: Skip flaky test TestRouteGetRuleStatuses (#69258)
Skip TestRouteGetRuleStatuses
2023-05-30 09:48:02 -05:00
Santiago
72a187b0be
Alerting: Refactor the ImageStore/Provider to provide image URL/bytes (#67693)
* (WIP) Refactor the ImageStore interface to work with our latest alerting repository

* update alerting package

* refactor, new URLExists method in ImageProvider

* tests for the new methods

* fix linter warnings

* use alertingImages as an alias for grafana/alerting/images

* logs about image uris and not found images

* nerf image not found logs

* extract duplicated code to getImageFromURI() method

* refactor getImageFromURI()

* add index on url

* add comment about migration log

* sync generated files
2023-05-30 11:25:55 -03:00
Ieva
d98813796c
RBAC: Remove legacy AC from HasAccess permission check (#68995)
* remove unused HasAdmin and HasEdit permission methods

* remove legacy AC from HasAccess method

* remove unused function

* update alerting tests to work with RBAC
2023-05-30 14:39:09 +01:00
Konrad Lalik
2f0728ac67
Alerting: Matching instances preview for notification policies (#68882)
* Basic implementation in web worker

* Move instances discovery to the worker

* Remove filtering from the worker

* Use normalized routes, use rtk query for alert groups fetching

* Reorganize matchers utilities to be available for web workers

* Move object matchers to the machers util file, rename worker

* Move worker code to a separate hook, add perf logging

* Add a mock for the web worker code, fix tests

* Fix tests warnings

* Remove notification policy feature flag

* Add normalizeRoute tests, change the regex match to test for label matching

* Move worker init to the file scope

* Simplify useAsyncFn hook

* Use CorsWorker as a workaround for web workers loading from CDN

* Use a feature flag to enable/disable worker-based preview, add worker error handling

* Add POC for react-enable working with grafana feature toggles

* Code cleanup

* Remove console error, add useRouteGroupsMatcher tests

* Fix tests mock
2023-05-30 15:15:22 +02:00
Juan Cabanas
9890ff7c92
PublicDashboards: Audit table redesign (#68137) 2023-05-29 12:59:29 -03:00
Sofia Papagiannaki
74e87ccbbd
SQLStore: Align SQLite IsUniqueConstraintViolation() with other backend implementations (#69224)
* Add integration test for primary key and unique constrain violation

* Align SQLite IsUniqueConstraintViolation implementation with other backends
2023-05-29 14:45:08 +00:00
Eng Zer Jun
7f7b03d794
Chore: Avoid unnecessary byte/string conversions (#69001)
Avoid unnecessary byte/string conversion

We can use alternative functions/methods to avoid unnecessary
byte/string conversion calls.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-05-26 10:08:50 +00:00
Misi
6702f07a87
AuthN: Use EqualFold for skipping introspection endpoint (#69126)
Add equality check for introspect ep in basic.go
2023-05-26 10:22:59 +02:00
Domas
ae1e40dcc6
Navigation: Add app observability plugin to Observability navigation group (#68805)
* add app o11y plugin to monitoring nav group

* Update applinks.go
2023-05-26 09:41:09 +03:00
Matthew Jacobson
97ae6ae6ef
Alerting: Fix flaky TestIntegrationUpdateAlertRules (#69106)
Prevents duplicate alert rule ids and 0 value for BaseInterval and IntervalSeconds
2023-05-25 16:00:06 -04:00
Yuri Tseretyan
b57ef1f2c7
Alerting: Fix TestIntegration_GetAlertRulesForScheduling to make sure rules are created in different org (#69088)
make sure rules are created in different org
2023-05-25 13:51:38 -04:00
Sladyn
a06a5a7393
Alerting: Improve log messages (#67688)
* Rename base logger and capatilize messages
* Remove cflogger from config.go
2023-05-25 18:55:01 +03:00
Yuri Tseretyan
e00260465b
Alerting: Fix provenance guard checks for Alertmanager configuration to not cause panic when compared nested objects (#69009)
* fix current settings parsed as new
* replace map comparison with cmp.Diff and log the diff
2023-05-25 11:41:11 -04:00
Gabriel MABILLE
edf1775d49
AuthN: Embed an OAuth2 server for external service authentication (#68086)
* Moving POC files from #64283 to a new branch

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Adding missing permission definition

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Force the service instantiation while client isn't merged

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Merge conf with main

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Leave go-sqlite3 version unchanged

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* tidy

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* User SearchUserPermissions instead of SearchUsersPermissions

* Replace DummyKeyService with signingkeys.Service

* Use user🆔<id> as subject

* Fix introspection endpoint issue

* Add X-Grafana-Org-Id to get_resources.bash script

* Regenerate toggles_gen.go
* Fix basic.go

* Add GetExternalService tests

* Add GetPublicKeyScopes tests

* Add GetScopesOnUser tests

* Add GetScopes tests

* Add ParsePublicKeyPem tests

* Add database test for GetByName

* re-add comments

* client tests added

* Add GetExternalServicePublicKey tests

* Add other test case to GetExternalServicePublicKey

* client_credentials grant test

* Add test to jwtbearer grant

* Test Comments

* Add handleKeyOptions tests

* Add RSA key generation test

* Add ECDSA by default to EmbeddedSigningKeysService

* Clean up org id scope and audiences

* Add audiences to the DB

* Fix check on Audience

* Fix double import

* Add AC Store mock and align oauthserver tests

* Fix test after rebase

* Adding missing store function to mock

* Fix double import

* Add CODEOWNER

* Fix some linting errors

* errors don't need type assertion

* Typo codeowners

* use mockery for oauthserver store

* Add feature toggle check

* Fix db tests to handle the feature flag

* Adding call to DeleteExternalServiceRole

* Fix flaky test

* Re-organize routes comments and plan futur work

* Add client_id check to Extended JWT client

* Clean up

* Fix

* Remove background service registry instantiation of the OAuth server

* Comment cleanup

* Remove unused client function

* Update go.mod to use the latest ory/fosite commit

* Remove oauth2_server related configs from defaults.ini

* Add audiences to DTO

* Fix flaky test

* Remove registration endpoint and demo scripts. Document code

* Rename packages

* Remove the OAuthService vs OAuthServer confusion

* fix incorrect import ext_jwt_test

* Comments and order

* Comment basic auth

* Remove unecessary todo

* Clean api

* Moving ParsePublicKeyPem to utils

* re ordering functions in service.go

* Fix comment

* comment on the redirect uri

* Add RBAC actions, not only scopes

* Fix tests

* re-import featuremgmt in migrations

* Fix wire

* Fix scopes in test

* Fix flaky test

* Remove todo, the intersection should always return the minimal set

* Remove unecessary check from intersection code

* Allow env overrides on settings

* remove the term app name

* Remove app keyword for client instead and use Name instead of ExternalServiceName

* LogID remove ExternalService ref

* Use Name instead of ExternalServiceName

* Imports order

* Inline

* Using ExternalService and ExternalServiceDTO

* Remove xorm tags

* comment

* Rename client files

* client -> external service

* comments

* Move test to correct package

* slimmer test

* cachedUser -> cachedExternalService

* Fix aggregate store test

* PluginAuthSession -> AuthSession

* Revert the nil cehcks

* Remove unecessary extra

* Removing custom session

* fix typo in test

* Use constants for tests

* Simplify HandleToken tests

* Refactor the HandleTokenRequest test

* test message

* Review test

* Prevent flacky test on client as well

* go imports

* Revert changes from 526e48ad45

* AuthN: Change the External Service registration form (#68649)

* AuthN: change the External Service registration form

* Gen default permissions

* Change demo script registration form

* Remove unecessary comment

* Nit.

* Reduce cyclomatic complexity

* Remove demo_scripts

* Handle case with no service account

* Comments

* Group key gen

* Nit.

* Check the SaveExternalService test

* Rename cachedUser to cachedClient in test

* One more test case to database test

* Comments

* Remove last org scope

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Update pkg/services/oauthserver/utils/utils_test.go

* Update pkg/services/sqlstore/migrations/oauthserver/migrations.go

Remove comment

* Update pkg/setting/setting.go

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

---------

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
2023-05-25 15:38:30 +02:00
Jean-Philippe Quéméner
5717d8954f
Alerting: Return empty list on export if no rules exist (#69023) 2023-05-25 14:12:18 +02:00
Giuseppe Guerra
e8c1592a47
Datasources: Deprecate and log creating/updating datasources with invalid UIDs (#68800)
* Datasources: Deprecate and log when creating/updating datasources with invalid UIDs

* trigger

* Update invalid uid deprecation log message

* capitalize log
2023-05-25 12:11:51 +02:00
Ryan McKinley
e7da2a179e
Schema: Add schema for role+access policies (#68047) 2023-05-24 10:31:57 -07:00
Yuri Tseretyan
3af95bebe1
Alerting: Migrate unknown NoData\Error settings to the default (#68403)
* use default execution if legacy is not known

* update docs

* Update docs/sources/alerting/migrating-alerts/migrating-legacy-alerts.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Update docs/sources/alerting/migrating-alerts/migrating-legacy-alerts.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

---------

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-05-24 13:09:17 -04:00
Ryan McKinley
c66d5721f7
Kinds: Use apimachinery ObjectMeta for metadata (#68668) 2023-05-24 09:13:44 -07:00
Ieva
9439649a4c
RBAC: remove unused dash and folder permission logic (#68968)
remove unused HasAdmin and HasEdit permission methods
2023-05-24 15:33:35 +01:00