Ieva
a06564fb0d
Access control: allow granting a fixed role dynamically based on the startup settings ( #43867 )
...
* allow granting a fixed role dynamically depending on startup config
* move role definition for team writing
* undo test changes
* nicer naming
2022-01-11 11:58:40 +01:00
Ieva
41b709d08d
Access control: permissions for team creation ( #43506 )
...
* FGAC for team creation
* tests
* fix snapshot for UI tests
* linting
* update snapshots
* Remove unecessary class and update tests
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
* Make the condition slightly easier
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: gamab <gabi.mabs@gmail.com>
2022-01-10 17:05:53 +00:00
Katarina Yang
5bab02c7ef
Refactor: Change sqlstore.inTransaction to SQLStore.WithTransactional… ( #43823 )
...
* Refactor: Change sqlstore.inTransaction to SQLStore.WithTransactionalDBSession in user files
* update milesone
2022-01-10 11:28:41 -05:00
Ryan McKinley
b404aae9c3
Crawler: use existing render service to generate dashboard thumbnails ( #43515 )
...
Co-authored-by: Artur Wierzbicki <artur@arturwierzbicki.com>
2022-01-10 08:21:35 -08:00
Karl Persson
d350ed0f35
Access Control: SQL filter ( #43560 )
...
* Add the accesscontrol sql filter utility
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-01-10 14:26:57 +01:00
Dan Cech
34f757ba5a
switch to using featureEnabled for enterprise features ( #41559 )
...
* switch to using featureEnabled for enterprise features
2022-01-07 15:11:23 -05:00
Travis Patterson
9eb82f9fff
Propagate all headers ( #43812 )
...
* Propagate all headers
* stable header order
2022-01-07 12:45:26 -07:00
Katarina Yang
a30ca86084
Refactor: Change sqlstore.inTransaction to SQLStore.WithTransactional… ( #43772 )
...
* Refactor: Change sqlstore.inTransaction to SQLStore.WithTransactionalDBSession in dashboard
* Fix: Fix failing lint and BE tests
2022-01-07 17:50:59 +01:00
Joan López de la Franca Beltran
532e71554f
Usage Stats: Add metrics to count enabled kms providers per kind ( #43640 )
...
* Usage Insights: Add metrics to count enabled kms providers per kind
* Add backwards compatibility
2022-01-07 13:52:28 +01:00
Selene
32ed680fc2
Team Guardian: Refactor it to remove the bus dependency ( #43058 )
...
* Refactor team guardian to avoid to use bus
* Fix lint
* Fix lint
2022-01-07 13:38:00 +01:00
Yuriy Tseretyan
ea478dec22
Alerting: Remove bridge between log15 and go-kit logger ( #43769 )
...
* remove bridge between log15 and go-kit logger.
* fix tests
2022-01-07 09:40:09 +01:00
Katarina Yang
7f8daa0eae
Refactor: Change sqlstore.inTransaction to .WithTransactionalDBSession ( #43245 )
...
* Refactor: Change sqlstore.inTransaction(...) to SQLStore.WithTransactionalDBSession(...) in alert_notification.go
* Chore: Fix BE lint err
* fix: fix failing sqlstore nil error
* chore: remove unecessary setup()
* fix: use appropriate ctx
2022-01-06 18:21:39 +01:00
ying-jeanne
a8eef45a44
Logger migration from log15 to gokit/log ( #41636 )
...
* migrate log15 to gokit/log
* fix console log
* update some unittest
* fix all unittest
* fix the build
* Update pkg/infra/log/log.go
Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
* general type vector
* correct the level key
Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
2022-01-06 22:28:05 +08:00
Gabriel MABILLE
92c568e9f7
AccessControl: Remove unused error from GetResourcesMetadata
( #43710 )
...
* AccessControl: Remove unused error from GetResourcesMetadata
Co-authored-by: J Guerreiro <joao.guerreiro@grafana.com>
2022-01-05 17:24:14 +01:00
Alexander Weaver
fd583a0e3b
Alerting: Allow customization of Google chat message ( #43568 )
...
* Allow customizable googlechat message via optional setting
* Add optional message field in googlechat contact point configurator
* Fix strange error message on send if template fails to fully evaluate
* Elevate template evaluation failure logs to Warn level
* Extract default.title template embed from all channels to shared constant
2022-01-05 09:47:08 -06:00
Eric Leijonmarck
0aa905bb1f
Serviceaccounts: feat - tabview for serviceaccounts ( #43573 )
2022-01-05 15:32:38 +01:00
Gilles De Mey
837925390f
fix: pass OrgId to alertNotification model ( #43678 )
...
fixes #43214
2022-01-05 10:19:45 +01:00
Jeremy Price
42ccc44eca
Accesscontrol: Apply FGAC to APIKey endpoints ( #42659 )
...
* Move definitions to serviceaccounts
* Use constant names, add scope to delete
* Add descriptions to roles
* Rename roles
2022-01-04 15:37:40 +01:00
Karl Persson
2425828a0b
quote reserved keyword ( #43652 )
2022-01-04 13:35:52 +01:00
Selene
bdbd199910
Remove unnecesary joins from queries ( #43626 )
2022-01-04 13:04:02 +01:00
Karl Persson
ee690a7bb0
Add org_id in join ( #43648 )
2022-01-04 11:13:45 +01:00
idafurjes
65e60759fb
Rename AddEventListenerCtx to AddEventListener and PublishCtx to Publish ( #43566 )
2022-01-04 09:36:01 +01:00
J Guerreiro
a0cf57b5b8
AccessControl: Reduce tone of access error ( #43601 )
2022-01-04 09:28:55 +01:00
idafurjes
8e6d6af744
Rename DispatchCtx to Dispatch ( #43563 )
2021-12-28 17:36:22 +01:00
idafurjes
7936c4c522
Rename AddHandlerCtx to AddHandler ( #43557 )
2021-12-28 16:08:07 +01:00
Joan López de la Franca Beltran
80e0dd74d2
Encryption: Increase context timeout on flaky test ( #43553 )
2021-12-28 13:34:45 +01:00
idafurjes
56c3875bb9
Chore: Remove context.TODO ( #43458 )
...
* Remove context.TODO() from services
* Fix live test
2021-12-28 10:26:18 +01:00
Alexander Weaver
56b3dc5445
Alerting: Allow configuration of non-ready alertmanagers ( #43063 )
...
* Create API test for overwriting invalid alertmanager config
* Avoid requiring alertmanager readiness for config changes
* AlertmanagerSrv depends on functionality rather than concrete types
* Add test for non-ready alertmanagers
* Additional cleanup and polish
* Back out previous integration test changes
* Refactor of tests incorrectly caused a test to become redundant
* Use pre-existing fake secret service
* Drop unused interface
* Test against concrete MultiOrgAlertmanager re-using fake infra from other tests
* Fix linter error
* Empty commit to rerun checks
2021-12-27 17:01:17 -06:00
Alexander Weaver
9abdaf251f
Alerting: Fix global state sensitivity in notifier channel tests ( #43508 )
2021-12-27 11:58:17 -06:00
Joan López de la Franca Beltran
83bc445d3e
Encryption: Fix DEKs cache ( #43129 )
...
* Encryption: Fix DEKs cache
* Clarify tests
2021-12-27 18:04:47 +01:00
Ryan McKinley
4233a62aeb
DashboardPreviews: add dashboard previews behind feature flag ( #43226 )
...
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Artur Wierzbicki <artur@arturwierzbicki.com>
2021-12-23 09:43:53 -08:00
Karl Persson
0ace9695a6
Access control: Add optional hooks ( #43372 )
...
* Add optional OnSet hooks
2021-12-23 10:10:06 +01:00
J Guerreiro
a1b8b5d123
Usage stats: Count API keys ( #42883 )
...
* Stats: add api key count to usage stats
* Chore: correctly capitalize struct member
2021-12-22 17:37:45 +01:00
idafurjes
b8852ef6a3
Chore: Remove context.TODO() ( #43409 )
...
* Remove context.TODO() from services
* Fix live test
* Remove context.TODO
2021-12-22 11:02:42 +01:00
Karl Persson
2409d8dc1f
check the value of the feature toggle ( #43433 )
2021-12-22 10:05:53 +01:00
Jean-Philippe Quéméner
ffc72aa255
Alerting: fix gosec warning that is not valid ( #43425 )
2021-12-21 19:47:47 +01:00
Daniel Lee
93de61f690
fix for CWE-89 ( #43407 )
...
The sqlOrArgs unpacking seems to confuse CodeQL. Trying something simpler
2021-12-21 19:04:56 +01:00
Karl Persson
b3d5a607d4
Access Control: Add option to filter only managed permissions ( #43371 )
...
* Add option to filter only managed permissions
2021-12-21 14:22:54 +01:00
idafurjes
ff3cf94b56
Chore: Remove context.TODO() from services ( #42555 )
...
* Remove context.TODO() from services
* Fix live test
2021-12-20 17:05:33 +01:00
Tania B
0dc86bf7f4
Chore: Move default encryption provider to kmsproviders package ( #43331 )
2021-12-20 12:47:49 +02:00
Karl Persson
c3ca2d214d
Access control: Refactor managed permission system to create api and frontend components ( #42540 )
...
* Refactor resource permissions
* Add frondend components for resource permissions
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2021-12-20 09:52:24 +01:00
Artur Wierzbicki
197f4f81f2
#41993 : make it possible to create N random60hz channels ( #43295 )
2021-12-17 23:42:37 +04:00
Sofia Papagiannaki
c4aaf5f9d1
API: prevent provisioned dashboard from being updated ( #41894 )
2021-12-17 10:31:52 -05:00
Alexander Zobnin
2c0f961c59
OAuth: Fix forwarding id token to the data source ( #43204 )
2021-12-17 03:34:16 -05:00
Yuriy Tseretyan
1a762083d7
Alerting: make alert rule routine evaluation control be thread-safe ( #41220 )
...
* change registry.delete to return deleted struct
* use pointer to alertRuleInfo instead copying.
* do not access evaluation channel when routine is stopped
* remove stopCh and use context cancellation
* do not return ctx.Err when channel is cancelled because it cancels all other routines
* make alertRuleInfo fields and functions package private
2021-12-16 14:52:47 -05:00
Ryan McKinley
2754e4fdf0
Expressions: use datasource model from the query ( #41376 )
...
* refactor datasource loading
* refactor datasource loading
* pass uid
* use dscache in alerting to get DS
* remove expr/translate pacakge
* remove dup injection entry
* fix DS type on metrics endpoint, remove SQL DS lookup inside SSE
* update test and adapter
* comment fix
* Make eval run as admin when getting datasource info
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* fmt and comment
* remove unncessary/redundant code
Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2021-12-16 13:51:46 -03:00
Jeremy Price
13fdc5231d
AccessControl: upgrade apikeys by adding service accounts ( #42425 )
...
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
* Change default options for cloned service account
* Run in background
* Add endpoint to upgrade api keys to service accounts
2021-12-16 14:28:16 +01:00
Jean-Philippe Quéméner
b605340668
Alerting: log errors happening in the API on server side ( #43192 )
...
* Alerting: log errors happening in the API on server side
* adapt tests to reflect changed payload
2021-12-16 13:33:10 +01:00
Gilles De Mey
bb3b5c10e7
Alerting: fix WeCom channel notifier test assertion ( #43173 )
2021-12-15 19:45:12 +01:00
Gilles De Mey
cbbbb505b4
Alerting: use HTML-safe characters for the default template ( #43148 )
2021-12-15 17:57:08 +01:00