grafana/pkg/services
Jeremy Price 6dbb6408d4
Access Control: Add service accounts (#38994)
* Add extra fields to OSS types to support enterprise

* Create a service account at the same time as the API key

* Use service account credentials when accessing API with APIkey

* Add GetRole to service, merge RoleDTO and Role structs

This patch merges the identical OSS and Enterprise data structures, which improves the code for two reasons:

1.  Makes switching between OSS and Enterprise easier
2.  Reduces the chance of incompatibilities developing between the same functions in OSS and Enterprise

* If API key is not linked to a service account, continue login as usual

* Fallback to old auth if no service account linked to key

* Add CloneUserToServiceAccount

* Adding LinkAPIKeyToServiceAccount

* Handle api key link error

* Better error messages for OSS accesscontrol

* Set an invalid user id as default

* Re-arrange field names

* ServiceAccountId is integer

* Better error messages

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2021-10-20 14:36:11 +02:00
..
accesscontrol Access Control: Add service accounts (#38994) 2021-10-20 14:36:11 +02:00
alerting Chore: Propagate context for data source provisioning (#40235) 2021-10-18 17:06:19 +02:00
annotations Chore: Replace util.DynMap with structs (#36332) 2021-07-01 10:23:33 +02:00
auth Chore: Add context to user (#39649) 2021-10-04 15:46:09 +02:00
cleanup Chore: Add context to user (#39649) 2021-10-04 15:46:09 +02:00
contexthandler Access Control: Add service accounts (#38994) 2021-10-20 14:36:11 +02:00
dashboards Chore: Propagate context for data source provisioning (#40235) 2021-10-18 17:06:19 +02:00
dashboardsnapshots Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
datasourceproxy Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
datasources Chore: Propagate context for data source provisioning (#40235) 2021-10-18 17:06:19 +02:00
encryption Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
guardian Chore: Propagate context for dashboard guardian (#39201) 2021-09-23 17:43:32 +02:00
hooks Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
ldap LDAP: Search all DNs for users (#38891) 2021-09-14 10:49:37 +02:00
libraryelements Packaging: Dependency updates (#40534) 2021-10-18 19:50:10 +02:00
librarypanels LibraryPanels: Refactor to use context.Context instead of models.ReqContext (#39561) 2021-09-27 09:04:36 +02:00
licensing AccessControl: frontend changes for adding FGAC to licensing (#39484) 2021-10-05 14:54:26 +01:00
live Live: Test Converter tab (#40536) 2021-10-19 09:50:17 +02:00
login Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
multildap Chore: Enable errorlint linter (#29227) 2020-11-19 14:47:17 +01:00
ngalert Remove flakiness of google chat tests (#40592) 2021-10-19 16:18:44 -04:00
notifications Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
oauthtoken Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
pluginsettings Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
provisioning Chore: Propagate context for data source provisioning (#40235) 2021-10-18 17:06:19 +02:00
quota Alerting: Remove ngalert feature toggle and introduce two new settings for enabling Grafana 8 alerts and disabling them for specific organisations (#38746) 2021-09-29 16:16:40 +02:00
rendering ImageRendering: fix leakage of the rendering inflight counter (#34607) 2021-08-28 09:05:03 +02:00
schemaloader Fix the disjuction of panels (#39412) 2021-10-06 11:39:23 +02:00
search Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
searchusers Create search filters by interface (#39843) 2021-10-07 16:06:16 +02:00
secrets Chore: Refactor secrets service (#40331) 2021-10-12 17:08:07 +03:00
shorturls Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
sqlstore Access Control: Add service accounts (#38994) 2021-10-20 14:36:11 +02:00
teamguardian chore: avoid aliasing imports in services (#22499) 2020-02-29 13:35:15 +01:00
validations Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00