Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgyongyosi committed Mar 1, 2024
1 parent ee82be8 commit 6968ca0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
3 changes: 2 additions & 1 deletion pkg/login/social/connectors/azuread_oauth.go
Expand Up @@ -200,7 +200,8 @@ func (s *SocialAzureAD) Validate(ctx context.Context, settings ssoModels.SSOSett

return validation.Validate(info, requester,
validateAllowedGroups,
//validation.MustBeEmptyValidator(info.ApiUrl, "API URL"), //uncomment this after the Terraform provider is updated
// FIXME: uncomment this after the Terraform provider is updated
//validation.MustBeEmptyValidator(info.ApiUrl, "API URL"),
validation.RequiredUrlValidator(info.AuthUrl, "Auth URL"),
validation.RequiredUrlValidator(info.TokenUrl, "Token URL"))
}
Expand Down
15 changes: 6 additions & 9 deletions public/app/features/auth-config/fields.tsx
Expand Up @@ -46,7 +46,6 @@ export const sectionFields: Section = {
'name',
'clientId',
'clientSecret',
'authStyle',
'scopes',
'authUrl',
'tokenUrl',
Expand All @@ -66,18 +65,16 @@ export const sectionFields: Section = {
fields: [
'allowedOrganizations',
'allowedDomains',
'defineAllowedGroups',
{ name: 'allowedGroups', dependsOn: 'defineAllowedGroups' },
'allowedGroups',
'forceUseGraphApi',
'usePkce',
'useRefreshToken',
'tlsSkipVerifyInsecure',
'tlsClientCert',
'tlsClientKey',
'tlsClientCa',
],
},
{
name: 'TLS',
id: 'tls',
fields: ['tlsSkipVerifyInsecure', 'tlsClientCert', 'tlsClientKey', 'tlsClientCa'],
},
],
generic_oauth: [
{
Expand Down Expand Up @@ -362,7 +359,7 @@ export function fieldMap(provider: string): Record<string, FieldData> {
},
forceUseGraphApi: {
label: 'Force use Graph API',
description: 'If enabled, Grafana will fetch the users\' groups using the Microsoft Graph API.',
description: "If enabled, Grafana will fetch the users' groups using the Microsoft Graph API.",
type: 'checkbox',
},
usePkce: {
Expand Down
4 changes: 2 additions & 2 deletions public/app/features/auth-config/types.ts
Expand Up @@ -53,6 +53,8 @@ export type SSOProviderSettingsBase = {
defineAllowedTeamsIds?: boolean;
configureTLS?: boolean;
tlsSkipVerifyInsecure?: boolean;
// For Azure AD
forceUseGraphApi?: boolean;
};

// SSO data received from the API and sent to it
Expand All @@ -66,8 +68,6 @@ export type SSOProvider = {
allowedDomains?: string;
allowedGroups?: string;
scopes?: string;
// For Azure AD
forceUseGraphApi?: boolean;
};
};

Expand Down

0 comments on commit 6968ca0

Please sign in to comment.