User-based authentication credentials #15
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding two new credential types:
azcredentials.AadCurrentUserCredentials
azcredentials.AzureClientSecretOboCredentials
These credentials assume that authentication into a datasource performed using identity of the currently signed-in AAD user, as opposed to a service identity credentials stored with the datasource.
The user identity credentials can be supported only in scenarios where Grafana configured with AAD user authentication.
AadCurrentUserCredentials
Zero configuration "Current User" authentication. Assumes that all settings required for successful access token exchange are configured at the level of Grafana instance and there's no input required from the end user.
Similar to "access token pass-thru" but in case of pass-thru the access token is being sent to a datasource "as is", and in this case, a datasource scoped access token is being properly requested from an identity provider configured with Grafana instance.
This is credential type definition and it doesn't govern how specifically identity provider should be configured at the Grafana instance level (this is responsibility of a token provider implementation).
AzureClientSecretOboCredentials
"App Registration (on-behalf-of)" is similar to "Current User" with only difference is that AAD identity provider and AAD app provided by the user rather than configured at the Grafana instance level.
Configuration schema is identical to "App Registration" (aka client secret) but instead of requesting access token for the configured service identity itself, the service identity used to request an access token on-behalf-of currently signed user.