SCIM: Add access control for non provisioned users (#103596)
* Add hook to validate access for users based on provisioning logic * Wire the hook * Add tests * declare new variables for errors * rework the authorization flow for provisioned users * Add scim feature to testinfra opts * Grant access if the identity doesn't have associated a user * skip external uid check for subsequent calls * Update tests
This commit is contained in:
@@ -494,6 +494,12 @@ func CreateGrafDir(t *testing.T, opts GrafanaOpts) (string, string) {
|
||||
_, err = pathsSect.NewKey("permitted_provisioning_paths", opts.PermittedProvisioningPaths)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
if opts.EnableSCIM {
|
||||
scimSection, err := getOrCreateSection("auth.scim")
|
||||
require.NoError(t, err)
|
||||
_, err = scimSection.NewKey("user_sync_enabled", "true")
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
dbSection, err := getOrCreateSection("database")
|
||||
require.NoError(t, err)
|
||||
@@ -558,6 +564,7 @@ type GrafanaOpts struct {
|
||||
GrafanaComSSOAPIToken string
|
||||
LicensePath string
|
||||
EnableRecordingRules bool
|
||||
EnableSCIM bool
|
||||
|
||||
// When "unified-grpc" is selected it will also start the grpc server
|
||||
APIServerStorageType options.StorageType
|
||||
|
||||
Reference in New Issue
Block a user