33 Commits

Author SHA1 Message Date
dc79e6f3dc unified-storage: fix auth handling in distributor (#106062)
* disable auth handling in the distributor
2025-06-26 12:32:59 -04:00
6e5056e1be Add tracing to bulk process. (#107047)
Add logging to bulk process.
2025-06-24 09:45:32 +01:00
e9ed7223a6 Use authlib repo. Use otel (#103178)
* Use authlib repo. Use otel

* Use interceptors on the provider level

* Create a new wire set with otel

* Lint

* Fix test

* make update-workflow

* make update-workspace

* make update-workspace. Try to add authlib as enterprise imports

* make update-workspace
2025-04-07 15:47:40 +02:00
b58b5b5768 grpc: improve grpc logger (#100606)
use proper grpc logging
2025-02-13 17:39:33 +01:00
5922015fec Zanzana: Setup GRPC authentication in client/server mode (#98680)
* Zanzana: Setup GRPC authentication in client/server mode

* don't use grpcutils

* refactor

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

* Add a namespace stub for in-proc mode

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

* Read parameters from config

* authorize server requests

* add namespace to the tests context

* use stack id from config

* simplify authorize func

* properly format namespace

* return Unauthenticated if namespace is empty

* use insecure cred only in dev env

* check request namespace

* Use CallCredentials API for client auth

* provide config

* fail if stack id is missing

* improve error message

* use insecure connection by default

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2025-01-13 10:02:15 +01:00
aa2b4751a0 AuthZ: Launch service within IAM app (#96421) 2024-11-20 11:13:33 +01:00
a2868fdb14 Plugins: Replace references of plugin SDK backend.Logger with Grafana logger (#95235)
replace references
2024-10-24 12:00:40 +01:00
830600dab0 AuthN: Optionally use tokens for unified storage client authentication (#91665)
* extracted in-proc mode to #93124

* allow insecure conns in dev mode + refactoring

* removed ModeCloud, relying on ModeGrpc and stackID instead to discover if we're running in Cloud

* remove the NamespaceAuthorizer would fail in legacy mode. It will be added back in the future.

* use FlagAppPlatformGrpcClientAuth to enable new behavior, instead of legacy

* extracted authz package changes in #95120

* extracted server side changes in #95086

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: gamab <gabriel.mabille@grafana.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
2024-10-24 09:12:37 +02:00
2387798719 Unified Storage: Propagate traces from the apiserver grpc client (#91226) 2024-08-06 09:52:11 -06:00
4baca6947d ResourceServer: make the resource store the default unified storage backend (#90899)
* make the resource store the default unified storage backend

* add integration tests

* fix test non passing

* Update pkg/storage/unified/sql/test/integration_test.go

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* lint

* fix tests

* fix no rows

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-07-25 18:17:39 +02:00
cfe8317d45 Add auth spans and remove deduplication code for scopes (#89804)
Adds more spans for timing in accesscontrol and remove permission deduplicating code after benchmarking

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2024-07-02 22:08:57 -08:00
1059441ec6 GRPC Service: Use native histogram when enabled (#88804)
* use native histogram when enabled

* enable native histograms permanently for grpc service histogram
2024-06-05 12:25:09 -06:00
16b1e285ea Chore: Use cache for all signed in user lookups (#88133)
* GetSignedInUser unexported (renamed to getSignedInUser)
* GetSignedInUserWithCacheCtx renamed to GetSignedInUser
* added a check for a nil cacheservice (as defensive programming / test convenience)
2024-05-22 08:58:16 -04:00
80f10e2a09 GRPC Server: Add README (#87442) 2024-05-08 15:29:43 -04:00
5c89b8fe12 gRPC Server: Make message size limits configurable. (#86982)
* gRPC Server: Make message size limits configurable.

* Fix mistake, don't add opts twice

* Apply suggestions from code review

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2024-04-30 16:18:03 +02:00
ac152ca416 Chore: Upgrade grpc-ecosystem/go-grpc-middleware to v2 (#86724)
* Chore: Replace deprecated prometheus grpc middleware

* go mod tidy without enterprise

* with updated sdk branch

* sdk v0.226.0

* remove deprecated opentracing support for outgoing plugin requests

* migrate to github.com/grpc-ecosystem/go-grpc-middleware/v2

* fix
2024-04-25 17:25:48 +02:00
8c8885ef23 Storage Api: Adds traces (#85391)
- adds traces and improved logging to the unified storage server
- add a configurable logger to the gRPC server service
2024-04-16 08:30:51 -06:00
a8fb01a502 Swap weaveworks/common utilities for equivalents in grafana/dskit (#80051)
* Replace histogram collector and grpc injectors

* Extract request timing utility

* Also vendor test file

* Suppress erroneous linter warn
2024-01-05 10:08:38 -06:00
f69fd3726b FeatureToggles: Add context and and an explicit global check (#78081) 2023-11-14 12:50:27 -08:00
dec9a07738 Settings: Actually deprecate access to feature flags (#78073) 2023-11-13 11:39:01 -08:00
36dba7584d grpcserver: Extract existing span context from grpc request metadata prior to span creation (#77833)
Extract existing span context from grpc metadata
2023-11-09 11:25:19 -06:00
85e629dc7d Chore: make GPRCServerService private (#74612) 2023-09-08 12:44:18 -07:00
025b2f3011 Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
2d5300ce3a gRPC Server: Instrument requests made to the server. (#71914)
* gRPC Server: Instrument requests made to the server.

Expose metrics from the gRPC server in order to monitor for failed responses
and response latency. Uses code from the already vendored weaveworks/common.

* Review comments.
2023-07-19 16:01:54 +02:00
e4d998dc1a ApiKeyGenPrefix: rename package (#65623)
* Rename package to satokengen to make it clearer that it is for service
account tokens
2023-03-30 17:04:10 +02:00
982939111b Rename Id to ID for annotation models (#62886)
* Rename Id to ID for annotation models

* Add xorm tags

* Rename Id to ID for API key models

* Add xorm tags
2023-02-03 17:23:09 +01:00
bc2813ef06 Chore: Fix goimports grouping in pkg/services (#62420)
* fix goimports

* fix goimports order
2023-01-30 08:21:27 +00:00
6e3de8d016 gRPC Server: Fix logging unauthenticated request error (#57490) 2022-10-23 03:51:23 +08:00
4163f31d76 GRPC Server: Add signedInUser to context (#56059) 2022-10-04 16:31:02 -04:00
2d433194d0 GRPC Server: Add tracing interceptors (#56045)
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-10-04 14:27:14 +04:00
64eff8196c Chore: expose grpc server address (#56013) 2022-09-29 08:42:01 -04:00
a281c26580 GRPC Server: Move reflection to a separate gRPC service (#55872) 2022-09-28 14:00:46 -04:00
55aae79744 GRPC Server: Add gRPC server service (#47849)
Co-authored-by: Todd Treece <todd.treece@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-09-26 16:25:34 -04:00