Commit Graph

12897 Commits

Author SHA1 Message Date
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
Jo
da40158fed
Auth: Improve org role sync debugging (#85146)
add login to the context of the logger
2024-03-26 17:22:10 +01:00
Carl Bergquist
b214b07695
Scopes: Name relationship objects *binding (#84955)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Bogdan Matei <bogdan.matei@grafana.com>
2024-03-26 15:52:12 +01:00
Ryan McKinley
e5cf863973
Prometheus: Create jsonschema spec (#85077) 2024-03-26 16:36:39 +03:00
Andreas Christou
19159a89a2
SQLEngine: Use debug method instead of custom implementation (#85118)
Use debug method instead of custom implementation
2024-03-26 11:27:07 +00:00
Sven Grossmann
9a8ae3c932
Loki: Support custom X-Query-Tags header (#85123)
* Loki: Support custom `X-Query-Tags` header

* add comment
2024-03-26 13:08:09 +02:00
Alexander Zobnin
02606be3ed
Access control: Improve annotation delete performance (#85068)
* Access control: Improve annotation delete performance

* simplify query string

* Refactor

* remove unnecessary join
2024-03-26 11:50:51 +01:00
Karl Persson
2f5e3023c2
IDFowrarding: ignore logging context canceled errors (#85141) 2024-03-26 11:36:44 +01:00
Sofia Papagiannaki
5ebf2d08f6
Provisioning: Fix regression when dashboardProvisioner is accessed before being initialised (#85011)
* Provisioning: Fix regression when dashboardProvisioner is accessed before being initialized

* Set dashboard provisioner in the provider
2024-03-26 12:32:56 +02:00
Gábor Farkas
3b7ee3a56b
MySQL: snapshot tests (#84846)
mysql: add snapshot tests
2024-03-26 10:24:33 +01:00
Gábor Farkas
c835022861
postgres: improved tests (#84677)
* postgres: tests: better test aligning time-series results

* postgres: add snapshot test for a backward-compat code
2024-03-26 10:22:58 +01:00
Jo
7649d93d17
AuthProxy: Fix missing session for ldap auth proxy users (#85090)
fix missing session for ldap auth proxy users
2024-03-26 09:24:24 +01:00