grafana/pkg
Gabriel MABILLE ba717454e1
ExtSvcAuth: Clean up orphaned external services on start up (#77951)
* Plugin: Remove external service on plugin removal

* Early exit no service account

* Add log

* WIP

* Cable OAuth2Server client removal

* Move function lower

* Add function to test removal

* Add test to RemoveExternalService

* Test RemoveExtSvcAccount

* remove apostrophy in comment

* Add cfg to plugin installer to check features

* Add feature flag check in the service registration service

* Comments

* Move metrics Inc

* Initialize map

* Reorder

* Initialize mutex as well

* Add HasExternalService as suggested

* WIP: CleanUpOrphanedExternalServices

* Commit suggestion

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>

* Nit on test.

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>

* oauthserver return names

* Name is not Slug

* Use plugin ID not slug

* Add background job

* remove negation on feature check

* Add test to the CleanUp function

* Test GetExternalServiceNames

* rename test

* Add test for ExtSvcAccountsService_GetExternalServiceNames

* Add a todo

* Add todo

* Option based on mix

* Rewrite a bit the comment

* Opinionated choice use slugs instead of names everywhere

* Nit.

* Comments and re-ordering

* Comment

* Add log

* Add context

---------

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
2023-11-16 12:07:42 +01:00
..
api Revert "Revert "RBAC: remove dashboard ACL logic from dash store, service #78130" (#78203) 2023-11-15 16:45:49 +00:00
apis K8s: Add subresource to the example apiserver (#78030) 2023-11-14 05:51:58 +02:00
build K8s: Use grafana executable for standalone api service (#77904) 2023-11-09 16:50:27 -08:00
bus Tracing: Standardize on otel tracing (#75528) 2023-10-03 14:54:20 +02:00
cmd K8s: Use grafana executable for standalone api service (#77904) 2023-11-09 16:50:27 -08:00
codegen Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
components imagestorage: fix templating of public_url option for webdav (#74885) 2023-09-28 00:35:10 +03:00
cuectx Kinds: publish kinds to kind registry (#67515) 2023-06-13 14:01:29 +02:00
events Alerting: Update rules version when folder title is updated (#53013) 2022-08-01 19:28:38 -04:00
expr Plugins: Backend: Skip host environment variables (#77858) 2023-11-15 18:09:14 +01:00
extensions Chore: Replace gofpdf (#75805) 2023-10-02 15:32:35 +02:00
ifaces/gcsifaces Chore: Upgrade Go to 1.19.1 (#54902) 2022-09-12 12:03:49 +02:00
infra K8s: Ensure there is always a user in appcontext.User (#78247) 2023-11-15 16:52:54 -08:00
kinds DashboardScene: Support dashboard links (#77855) 2023-11-15 17:49:51 +02:00
kindsysreport Playlist: Use a different go struct for sql service vs k8s (#76393) 2023-10-12 08:29:06 -07:00
login FeatureToggles: Add context and and an explicit global check (#78081) 2023-11-14 12:50:27 -08:00
middleware FeatureToggles: Add context and and an explicit global check (#78081) 2023-11-14 12:50:27 -08:00
mocks/mock_gcsifaces Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
models Auth: Add empty role definition (#64694) 2023-07-06 15:40:06 +02:00
modules Chore: refactor grafana-apiserver a bit (#74177) 2023-08-31 09:12:01 -04:00
plugins Plugins: Backend: Skip host environment variables (#77858) 2023-11-15 18:09:14 +01:00
registry ExtSvcAuth: Clean up orphaned external services on start up (#77951) 2023-11-16 12:07:42 +01:00
server postgresql: change plugin id (#77444) 2023-11-13 08:49:26 +01:00
services ExtSvcAuth: Clean up orphaned external services on start up (#77951) 2023-11-16 12:07:42 +01:00
setting Chore: Update settings to support k8s needs (#78235) 2023-11-15 15:26:28 -05:00
tests Chore: Deprecate Id from Folder in DTOs (#77943) 2023-11-15 10:29:49 -05:00
tsdb CloudWatch: Add missing GameLift metrics (#76102) 2023-11-16 10:02:29 +01:00
util Plugins: Follow root level dist and siblings when walking file system (#78042) 2023-11-14 10:31:46 +01:00
web Chore: Upgrade Go to 1.21.3 (#77304) 2023-11-01 09:17:38 -07:00
README.md Chore: Move all backend contribution documents to a single directory (#61140) 2023-01-11 11:16:52 +01:00
ruleguard.rules.go Chore: update all +build statements (#38782) 2021-09-01 17:38:56 +03:00

This directory contains the code for the Grafana backend.

The contributor documentation for Grafana's backend is in /contribute/backend/README.md.