Commit Graph

12908 Commits

Author SHA1 Message Date
Serge Zaitsev
faa1244518
Chore: Replace sqlstore with db interface (#85366)
* replace sqlstore with db interface in a few packages

* remove from stats

* remove sqlstore in admin test

* remove sqlstore from api plugin tests

* fix another createUser

* remove sqlstore in publicdashboards

* remove sqlstore from orgs

* clean up orguser test

* more clean up in sso

* clean up service accounts

* further cleanup

* more cleanup in accesscontrol

* last cleanup in accesscontrol

* clean up teams

* more removals

* split cfg from db in testenv

* few remaining fixes

* fix test with bus

* pass cfg for testing inside db as an option

* set query retries when no opts provided

* revert golden test data

* rebase and rollback
2024-04-04 15:04:47 +02:00
Arati R
2232fe033b
Storage: Add mode-specific dual writers (#85551)
* Set up skeleton dual writers for each mode
* Add Create functionality to each of the mode-specific DualWriters
* Add switch for selecting DualWriter
2024-04-04 14:02:51 +02:00
Dominik Prokop
32b6ef9d15
Feature toggle to add filter and group by variables to all new dashboards by default (#85531)
* Add feature toggle

* Add filters and group by variables by default to all new dashboards

* Nits

* Tests

* Rename feature toggle to newDashboardWithFiltersAndGroupBy
2024-04-04 13:25:21 +02:00
Leonor Oliveira
01afca9d99
Add setup and spies for the dual writer (#85568)
* Add setup and spy client for dual writer

* Get rid of reset method
2024-04-04 11:46:16 +02:00
Karl Persson
504870f10a
Auth: Decouple client and hook registration (#85084) 2024-04-04 09:33:00 +02:00
Marcus Efraimsson
bdc492b96c
Chore: Upgrade grafana-plugin-sdk-go (#85562) 2024-04-04 08:07:29 +03:00
Todd Treece
c01531dc79
K8s: Use tracing handler from component-base (#85560) 2024-04-04 00:39:09 +03:00
Tristan
77133ac9c1
CloudWatch: Fix SageMaker MBP namespace typo (#85557) 2024-04-03 15:50:09 -04:00
Michael Mandrus
ddf5fbe591
CMS: Update permissions required to use endpoints (#85555)
* try different perms

* fix compile issue

* remove ac dependency

* remove dependency
2024-04-03 22:43:48 +03:00
Josh Hunt
aad79c9400
E2C: Start connecting on-prem to real apis (#85527)
* E2C: Start connecting on-prem to real apis

* actually run the migration

* show resources

* basic dashboards resources

* show dashboard title

* remove console logs

* cleanup 1

* i18n

* disconnect

* i18n

* restore type

* use fixed format

* fix
2024-04-03 13:47:02 -04:00
William Wernert
cad8190a91
Alerting/Annotations: Return nothing from historian store if filtering by tags and matchAny is false (#85488)
* Return nothing from historian store if filtering by tag
2024-04-03 13:01:13 -04:00
Leonard Gram
a457ab3192
Cloudmigration: decode json data (#85548)
* decode get

* decode bytes

* response

* .

* linter

* quick fixes

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2024-04-03 18:47:49 +02:00
Jean-Philippe Quéméner
7cfd470c91
fix(alerting): only expose metrics if executing alerts (#85512) 2024-04-03 17:18:02 +02:00
Josh Hunt
e08b5bd456
E2C: Fix Swagger spec for createMigration post body (#85525)
* E2C: Fix Swagger spec for CreateCloudMigration post body

* actually, don't rename that type
2024-04-03 11:59:50 +00:00
idafurjes
b885da09da
CloudMigrations: Implement migrations API (#85348)
* Implement run migration endpoint

* Refactor RunMigration method into separate methods

* Save migration runs fix lint

* Minor changes

* Refactor how to use cms endpoint

* fix interface

* complete merge

* add individual items

* adds tracing to getMigration

* linter

* updated swagger definition with the latest changes

* CloudMigrations: Implement core API handlers for cloud migrations and migration runs (#85407)

* implement delete

* add auth token encryption

* implement token validation

* call token validation during migration creation

* implement get migration status

* implement list migration runs

* fix bug

* finish parse domain func

* fix urls

* fix typo

* fix encoding and decoding

* remove double decryption

* add missing slash

* fix id returned by create function

* inject missing services

* finish implementing (as far as I can tell right now) data migration and response handling

* comment out broken test, needs a rewrite

* add a few final touches

* get dashboard migration to work properly

* changed runMigration to a POST

* swagger

* swagger

* swagger

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: Leonard Gram <leo@xlson.com>
Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>
2024-04-03 13:36:13 +02:00
Ieva
beb15d938b
RBAC: Fix access checks for interactions with RBAC roles in hosted Grafana (#85485)
* don't check global permissions for cloud instances

* linting
2024-04-03 11:44:16 +01:00
Gábor Farkas
8159e1db3a
Revert "Postgres: Switch the datasource plugin from lib/pq to pgx (#8… (#85509)
Revert "Postgres: Switch the datasource plugin from lib/pq to pgx (#83768)"

This reverts commit ecd6de826a.
2024-04-03 11:02:22 +02:00
Andres Martinez Gotor
9c7237891c
Plugins: Expose ExternalService in request config (#85187) 2024-04-03 09:22:34 +02:00
Leon Sorokin
1522499c4a
VizTooltips: Remove remaining old bits (#85500)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2024-04-02 19:32:01 -05:00
Marcus Efraimsson
c9ab4e3a9e
DS apiserver: Fix resource path (#85494) 2024-04-02 20:09:18 +02:00
Jo
5340a6e548
Auth: Extended JWT client for OBO and Service Authentication (#83814)
* reenable ext-jwt-client

* fixup settings struct

* add user and service auth

* lint up

* add user auth to grafana ext

* fixes

* Populate token permissions

Co-authored-by: jguer <joao.guerreiro@grafana.com>

* fix tests

* fix lint

* small prealloc

* small prealloc

* use special namespace for access policies

* fix access policy auth

* fix tests

* fix uncalled settings expander

* add feature toggle

* small feedback fixes

* rename entitlements to permissions

* add authlibn

* allow viewing the signed in user info for non user namespace

* fix invalid namespacedID

* use authlib as verifier for tokens

* Update pkg/services/authn/clients/ext_jwt.go

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

* Update pkg/services/authn/clients/ext_jwt_test.go

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

* fix parameter names

* change asserts to normal package

* add rule for assert

* fix ownerships

* Local diff

* test and lint

* Fix test

* Fix ac test

* Fix pluginproxy test

* Revert testdata changes

* Force revert on test data

---------

Co-authored-by: gamab <gabriel.mabille@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2024-04-02 17:45:15 +02:00
Will Browne
257cc98062
Datasources: Remove unused functions (#85473)
* cleanup unused funcs

* remove more stuff
2024-04-02 16:19:52 +02:00
linoman
147154d2ea
Remove AuthConfigUIAdminAccess (#85452)
* Remove AuthConfigUIAdminAccess
2024-04-02 15:02:28 +02:00
Leonard Gram
4e89267603
Cloudmigration: swagger for the cloudmigration api (#85255)
* swagger for create token

* tried to fix errors

* update swagger annotations

* update swagger annotations

* update api GetMigrationList to return the *Response directly

* clean up previous commit

---------

Co-authored-by: joshhunt <josh@trtr.co>
2024-04-02 13:57:42 +02:00
Andres Martinez Gotor
d2ca95d304
Update plugin SDK to v0.219.0 (#85438) 2024-04-02 10:22:24 +02:00
Will Browne
22fe7b067c
Plugins: Set correct PDC config values for proxy requests (#85412)
pass appropriate values
2024-03-29 20:17:05 +02:00
Ryan McKinley
dd6c8732b3
Scopes: Add basic integration tests (#85351)
Co-authored-by: Kyle Brandt <kyle@grafana.com>
2024-03-29 16:12:28 +02:00
Leonard Gram
383ebb2bc4
Cloudmigration: create migration (#85386)
* Cloudmigration: create migration

* fix drone build

* lint fix

* fix unit test

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2024-03-29 01:55:27 +01:00
Tristan
58b583f0c5
AWS DataSource: Fix namespaces in sagemaker metrics (#85357) 2024-03-28 22:11:11 +02:00
Michael Mandrus
5a5f76ae0a
CloudMigrations: Add instance metadata to auth token (#85381)
* update how tokens are passed around

* rename structs
2024-03-28 15:02:54 -04:00
Charandas
0f1151964c
K8s: standalone authenticator that allows a type of downstream forwarding (#85130) 2024-03-28 20:52:28 +02:00
Carl Bergquist
a71dfe806a
Scopes: Create binding per relationship (#85332)
scopes: create binding per relationship

Signed-off-by: bergquist <carl.bergquist@gmail.com>
2024-03-28 13:22:21 -04:00
linoman
e4250a72db
JWT: Find login and email claims with JMESPATH (#85305)
* add function to static function to static service

* find email and login claims with jmespath

* rename configuration files

* Replace JWTClaims struct for map

* check for subclaims error
2024-03-28 17:25:26 +01:00
Karl Persson
73e426b081
User: email verification completion (#85259)
* TempUser: Include InvitedById in TempUserDTO

* Extract email verfication completion flow to service
2024-03-28 16:05:33 +01:00
lean.dev
5b147d0847
CloudMigration: Add service to list all migrations (#85308) 2024-03-28 08:50:31 -03:00
Karl Persson
5dd98a0fd5
RBAC: handle partially resolved scopes (#85323)
* RBAC: handle partially resolved scopes

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2024-03-28 10:08:07 +01:00
Will Browne
1a0ac381eb
Plugins: Send PDC file paths and contents for backwards compatibility (#85287)
* send paths and contents

* go work sync
2024-03-27 18:19:11 +01:00
Kyle Brandt
136f8e6f0c
Scopes: Add Filtering for ScopeDashoardBinding and Update Prometheus for ScopeFilterOperator Changes (#85284) 2024-03-27 11:39:55 -04:00
Dan Cech
ef26fe95dc
Storage: GuaranteedUpdate fix & other improvements (#85206)
make GuaranteedUpdate work when ignoring not found errors, increase poll frequency, fix Delete
2024-03-27 10:38:49 -04:00
Karl Persson
152cb47692
AuthN: Add IsAuthenticatedBy to identity interface and replace checks (#85262)
Add IsAuthenticatedBy to identity interface and replace checks
2024-03-27 15:22:13 +01:00
Will Browne
cd912367b3
Plugins: Pass PDC info as file paths (#85239)
* pass filepaths

* fix test
2024-03-27 15:21:05 +01:00
Kyle Brandt
fe209fdf7c
Revert "Scopes: Add more BE filtering (field selectors) (#85169)" (#85264)
This reverts commit 222f93794d.
2024-03-27 15:47:48 +02:00
Kyle Brandt
222f93794d
Scopes: Add more BE filtering (field selectors) (#85169) 2024-03-27 13:10:49 +00:00
Kyle Brandt
d71266b8af
QueryLibrary: Use default variable values in render (#84678) 2024-03-27 08:48:08 -04:00
Pablo
ace1cd6301
CloudWatch : Add missing AWS/ES metrics (#85210)
Adding missing ES metrics
2024-03-26 16:37:07 -04:00
Sven Grossmann
e284812796
Applinks: Adds grafana-lokiexplore-app to Explore -> Logs section (#85200) 2024-03-26 22:18:17 +02:00
ismail simsek
fec7765111
Chore: InfluxQL stream parser improvements (#85041)
* don't iterate over first column as it is a time column already

* don't iterate over first column as it was handled earlier

* add more flexibility to run the commands

* Update pkg/tsdb/influxdb/influxql/converter/converter.go

Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>

---------

Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
2024-03-26 19:25:03 +02:00
Sven Grossmann
c80b31a0d4
Loki: Remove API restrictions on resource calls (#85191)
Loki: Remove API restrictions
2024-03-26 18:15:35 +01:00
Benoit Tigeot
6f38ac6615
Alerting: Reduce set of fields that could trigger alert state change (#83496)
We want to avoid too much change of alert state based on change on
alert's fields. For that we ignore some fields from the diff.
2024-03-26 12:35:30 -04:00
Julien Duchesne
2188516a21
Alerting: Fix receiver inheritance when provisioning a notification policy (#82007)
Terraform Issue: grafana/terraform-provider-grafana#1007
Nested routes should be allowed to inherit the contact point from the root (or direct parent) route but this fails in the provisioning API (it works in the UI)
2024-03-26 12:31:59 -04:00