grafana/pkg/services/serviceaccounts
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 Swagger: Fix listTokensResponse (#78155) 2023-11-15 08:59:54 -05:00
database AuthN: Change the external service account state on plugin state change (#77157) 2023-10-27 13:46:25 +02:00
extsvcaccounts ExtSvcAuth: Clean up orphaned external services on start up (#77951) 2023-11-16 12:07:42 +01:00
manager auth: wire service account proxy (#77215) 2023-11-03 10:27:43 +01:00
proxy FeatureToggles: Add context and and an explicit global check (#78081) 2023-11-14 12:50:27 -08:00
retriever Auth: Service account store refactor (#58961) 2022-12-13 14:56:10 +01:00
secretscan Chore: capitalise log message for auth packages (#74332) 2023-09-04 18:49:47 +02:00
tests Plugin: Remove external service on plugin removal (#77712) 2023-11-13 13:18:13 +01:00
models.go IAM: Protect managed service account frontend details page (#77839) 2023-11-14 17:52:48 +01:00
serviceaccounts.go Plugin: Remove external service on plugin removal (#77712) 2023-11-13 13:18:13 +01:00