diff --git a/console/src/app/modules/idp-table/idp-table.component.html b/console/src/app/modules/idp-table/idp-table.component.html index b9eeb5e10..bcbf18e49 100644 --- a/console/src/app/modules/idp-table/idp-table.component.html +++ b/console/src/app/modules/idp-table/idp-table.component.html @@ -38,13 +38,17 @@ {{ 'IDP.TYPE' | translate }}
+
+ + Microsoft +
- + Google
- - + + GitHub
@@ -52,7 +56,7 @@ Generic OIDC
- + Generic OAuth
@@ -60,16 +64,16 @@ Generic JWT
- + Gitlab
- + Gitlab Self Hosted
- - + + GitHub Enterprise Server
coming soon
diff --git a/console/src/app/modules/idp-table/idp-table.component.ts b/console/src/app/modules/idp-table/idp-table.component.ts index 147eeb21b..55567fc06 100644 --- a/console/src/app/modules/idp-table/idp-table.component.ts +++ b/console/src/app/modules/idp-table/idp-table.component.ts @@ -226,6 +226,8 @@ export class IdpTableComponent implements OnInit { public routerLinkForRow(row: Provider.AsObject): any { if (row.id) { switch (row.type) { + case ProviderType.PROVIDER_TYPE_AZURE_AD: + return [row.owner === IDPOwnerType.IDP_OWNER_TYPE_SYSTEM ? '/instance' : '/org', 'provider', 'azure-ad', row.id]; case ProviderType.PROVIDER_TYPE_OIDC: return [row.owner === IDPOwnerType.IDP_OWNER_TYPE_SYSTEM ? '/instance' : '/org', 'provider', 'oidc', row.id]; case ProviderType.PROVIDER_TYPE_GITHUB_ES: diff --git a/console/src/app/modules/policies/idp-settings/idp-settings.component.html b/console/src/app/modules/policies/idp-settings/idp-settings.component.html index 095362b43..3af55f368 100644 --- a/console/src/app/modules/policies/idp-settings/idp-settings.component.html +++ b/console/src/app/modules/policies/idp-settings/idp-settings.component.html @@ -18,19 +18,27 @@ : [] " > - +
Google
-
- {{ 'ACTIONS.COMINGSOON' | translate }} - + +
Microsoft
-
+ - - + +
GitHub @@ -61,8 +69,8 @@ : [] " > - - + +
GitHub Enterprise Server @@ -70,7 +78,7 @@ - {{ 'ACTIONS.COMINGSOON' | translate }} - +
GitLab
@@ -96,7 +103,7 @@ : [] " > - +
GitLab Self Hosted
@@ -130,7 +137,7 @@ : [] " > - +
Generic OAuth diff --git a/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad-routing.module.ts b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad-routing.module.ts new file mode 100644 index 000000000..0769a1481 --- /dev/null +++ b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad-routing.module.ts @@ -0,0 +1,18 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +import { ProviderAzureADComponent } from './provider-azure-ad.component'; + +const routes: Routes = [ + { + path: '', + component: ProviderAzureADComponent, + data: { animation: 'DetailPage' }, + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class ProviderAzureADRoutingModule {} diff --git a/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.html b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.html new file mode 100644 index 000000000..e78f10877 --- /dev/null +++ b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.html @@ -0,0 +1,108 @@ + +
+
+ +

{{ 'IDP.CREATE.AZUREAD.TITLE' | translate }}

+ +
+ +

+ {{ !provider ? ('IDP.CREATE.AZUREAD.DESCRIPTION' | translate) : ('IDP.DETAIL.DESCRIPTION' | translate) }} +

+ +
+
+ + {{ 'IDP.NAME' | translate }} + + + + + {{ 'IDP.CLIENTID' | translate }} + + + + {{ + 'IDP.UPDATECLIENTSECRET' | translate + }} + + {{ 'IDP.CLIENTSECRET' | translate }} + + + +
+

{{ 'IDP.OPTIONAL' | translate }}

+ +
+
+
+
+ + {{ 'IDP.SCOPESLIST' | translate }} + + + + +
+ + + + + {{ scope }} cancel + + + +
+ + {{ 'IDP.EMAILVERIFIED' | translate }} + + + {{ 'IDP.AZUREADTENANTTYPE' | translate }} + + + {{ 'IDP.AZUREADTENANTTYPES.' + type | translate }} + + + + + + {{ 'IDP.AZUREADTENANTID' | translate }} + + + + +
+
+ +
+ +
+
+
+
diff --git a/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.scss b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.scss new file mode 100644 index 000000000..71901ab02 --- /dev/null +++ b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.scss @@ -0,0 +1,87 @@ +.desc { + font-size: 14px; +} + +.azure-ad-create-content { + .title-row { + display: flex; + align-items: center; + + .idp-logo { + height: 36px; + width: 36px; + margin-right: 1rem; + flex-shrink: 0; + } + + h1 { + margin: 0 1rem 0 0; + } + } + + .formfield { + display: block; + max-width: 400px; + + .name-hint { + font-size: 12px; + } + + .mat-chip-input { + width: 100%; + margin: 0; + } + + .chip { + border-radius: 0.5rem; + height: 40px; + } + + @media only screen and (max-width: 450px) { + max-width: none; + } + } + + .azure-ad-content { + .desc { + margin-bottom: 1rem; + } + + .idp-scopes { + padding-bottom: 0.5rem; + + .flex-line { + display: flex; + align-items: flex-start; + max-width: 400px; + + .formfield { + flex: 1; + } + + .scope-add-button { + margin-top: 1.75rem; + } + } + } + } +} + +.azure-ad-create-actions { + display: flex; + margin-top: 1rem; + + button[mat-raised-button] { + border-radius: 0.5rem; + padding: 0.5rem 4rem; + } +} + +.optional-h-wrapper { + display: flex; + align-items: center; + + h2 { + margin-right: 0.25rem; + } +} diff --git a/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.spec.ts b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.spec.ts new file mode 100644 index 000000000..83b7a8fd3 --- /dev/null +++ b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; + +import { ProviderAzureADComponent } from './provider-azure-ad.component'; + +describe('ProviderAzureADComponent', () => { + let component: ProviderAzureADComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ProviderAzureADComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ProviderAzureADComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.ts b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.ts new file mode 100644 index 000000000..cf81d287e --- /dev/null +++ b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.ts @@ -0,0 +1,320 @@ +import { COMMA, ENTER, SPACE } from '@angular/cdk/keycodes'; +import { Location } from '@angular/common'; +import { Component, Injector, Type } from '@angular/core'; +import { AbstractControl, FormControl, FormGroup } from '@angular/forms'; +import { MatLegacyChipInputEvent as MatChipInputEvent } from '@angular/material/legacy-chips'; +import { ActivatedRoute, Router } from '@angular/router'; +import { take } from 'rxjs'; +import { + AddAzureADProviderRequest as AdminAddAzureADProviderRequest, + GetProviderByIDRequest as AdminGetProviderByIDRequest, + UpdateAzureADProviderRequest as AdminUpdateAzureADProviderRequest, +} from 'src/app/proto/generated/zitadel/admin_pb'; +import { AzureADTenant, AzureADTenantType, Options, Provider } from 'src/app/proto/generated/zitadel/idp_pb'; +import { + AddAzureADProviderRequest as MgmtAddAzureADProviderRequest, + GetProviderByIDRequest as MgmtGetProviderByIDRequest, + UpdateAzureADProviderRequest as MgmtUpdateAzureADProviderRequest, +} from 'src/app/proto/generated/zitadel/management_pb'; +import { AdminService } from 'src/app/services/admin.service'; +import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.service'; +import { ManagementService } from 'src/app/services/mgmt.service'; +import { ToastService } from 'src/app/services/toast.service'; +import { requiredValidator } from '../../form-field/validators/validators'; + +import { PolicyComponentServiceType } from '../../policies/policy-component-types.enum'; + +@Component({ + selector: 'cnsl-provider-azure-ad', + templateUrl: './provider-azure-ad.component.html', + styleUrls: ['./provider-azure-ad.component.scss'], +}) +export class ProviderAzureADComponent { + public showOptional: boolean = false; + public options: Options = new Options(); + public id: string | null = ''; + public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT; + private service!: ManagementService | AdminService; + + public readonly separatorKeysCodes: number[] = [ENTER, COMMA, SPACE]; + + public form!: FormGroup; + + public loading: boolean = false; + + public provider?: Provider.AsObject; + public updateClientSecret: boolean = false; + public tenantTypes = [ + AzureADTenantType.AZURE_AD_TENANT_TYPE_COMMON, + AzureADTenantType.AZURE_AD_TENANT_TYPE_ORGANISATIONS, + AzureADTenantType.AZURE_AD_TENANT_TYPE_CONSUMERS, + ]; + + constructor( + private router: Router, + private route: ActivatedRoute, + private toast: ToastService, + private injector: Injector, + private _location: Location, + private breadcrumbService: BreadcrumbService, + ) { + this.form = new FormGroup({ + name: new FormControl('', []), + clientId: new FormControl('', [requiredValidator]), + clientSecret: new FormControl('', [requiredValidator]), + scopesList: new FormControl(['openid', 'profile', 'email'], []), + tenantType: new FormControl(AzureADTenantType.AZURE_AD_TENANT_TYPE_COMMON), + tenantId: new FormControl(''), + emailVerified: new FormControl(false), + }); + + this.route.data.pipe(take(1)).subscribe((data) => { + this.serviceType = data.serviceType; + + switch (this.serviceType) { + case PolicyComponentServiceType.MGMT: + this.service = this.injector.get(ManagementService as Type); + + const bread: Breadcrumb = { + type: BreadcrumbType.ORG, + routerLink: ['/org'], + }; + + this.breadcrumbService.setBreadcrumb([bread]); + break; + case PolicyComponentServiceType.ADMIN: + this.service = this.injector.get(AdminService as Type); + + const iamBread = new Breadcrumb({ + type: BreadcrumbType.ORG, + name: 'Instance', + routerLink: ['/instance'], + }); + this.breadcrumbService.setBreadcrumb([iamBread]); + break; + } + + this.id = this.route.snapshot.paramMap.get('id'); + if (this.id) { + this.clientSecret?.setValidators([]); + this.getData(this.id); + } + }); + } + + private getData(id: string): void { + const req = + this.serviceType === PolicyComponentServiceType.ADMIN + ? new AdminGetProviderByIDRequest() + : new MgmtGetProviderByIDRequest(); + req.setId(id); + this.service + .getProviderByID(req) + .then((resp) => { + this.provider = resp.idp; + this.loading = false; + if (this.provider?.config?.azureAd) { + this.form.patchValue(this.provider.config.azureAd); + this.name?.setValue(this.provider.name); + this.tenantId?.setValue(this.provider.config.azureAd.tenant?.tenantId); + this.tenantType?.setValue(this.provider.config.azureAd.tenant?.tenantType); + } + }) + .catch((error) => { + this.toast.showError(error); + this.loading = false; + }); + } + + public submitForm(): void { + this.provider ? this.updateAzureADProvider() : this.addAzureADProvider(); + } + + public addAzureADProvider(): void { + if (this.serviceType === PolicyComponentServiceType.MGMT) { + const req = new MgmtAddAzureADProviderRequest(); + + req.setName(this.name?.value); + req.setClientId(this.clientId?.value); + req.setClientSecret(this.clientSecret?.value); + req.setEmailVerified(this.emailVerified?.value); + + const tenant = new AzureADTenant(); + tenant.setTenantId(this.tenantId?.value); + tenant.setTenantType(this.tenantType?.value); + req.setTenant(tenant); + + req.setScopesList(this.scopesList?.value); + req.setProviderOptions(this.options); + + this.loading = true; + (this.service as ManagementService) + .addAzureADProvider(req) + .then((idp) => { + setTimeout(() => { + this.loading = false; + this.router.navigate(['/org-settings'], { queryParams: { id: 'idp' } }); + }, 2000); + }) + .catch((error) => { + this.toast.showError(error); + this.loading = false; + }); + } else if (PolicyComponentServiceType.ADMIN) { + const req = new AdminAddAzureADProviderRequest(); + req.setName(this.name?.value); + req.setClientId(this.clientId?.value); + req.setClientSecret(this.clientSecret?.value); + req.setEmailVerified(this.emailVerified?.value); + + const tenant = new AzureADTenant(); + tenant.setTenantId(this.tenantId?.value); + tenant.setTenantType(this.tenantType?.value); + req.setTenant(tenant); + + req.setScopesList(this.scopesList?.value); + req.setProviderOptions(this.options); + + this.loading = true; + (this.service as AdminService) + .addAzureADProvider(req) + .then((idp) => { + setTimeout(() => { + this.loading = false; + this.router.navigate(['/settings'], { queryParams: { id: 'idp' } }); + }, 2000); + }) + .catch((error) => { + this.loading = false; + this.toast.showError(error); + }); + } + } + + public updateAzureADProvider(): void { + if (this.provider) { + if (this.serviceType === PolicyComponentServiceType.MGMT) { + const req = new MgmtUpdateAzureADProviderRequest(); + req.setId(this.provider.id); + req.setName(this.name?.value); + req.setClientId(this.clientId?.value); + req.setEmailVerified(this.emailVerified?.value); + + const tenant = new AzureADTenant(); + + tenant.setTenantId(this.tenantId?.value); + tenant.setTenantType(this.tenantType?.value); + req.setTenant(tenant); + + req.setScopesList(this.scopesList?.value); + req.setProviderOptions(this.options); + + if (this.updateClientSecret) { + req.setClientSecret(this.clientSecret?.value); + } + + this.loading = true; + (this.service as ManagementService) + .updateAzureADProvider(req) + .then((idp) => { + setTimeout(() => { + this.loading = false; + this.router.navigate(['/org-settings'], { queryParams: { id: 'idp' } }); + }, 2000); + }) + .catch((error) => { + this.toast.showError(error); + this.loading = false; + }); + } else if (PolicyComponentServiceType.ADMIN) { + const req = new AdminUpdateAzureADProviderRequest(); + req.setId(this.provider.id); + req.setName(this.name?.value); + req.setClientId(this.clientId?.value); + req.setEmailVerified(this.emailVerified?.value); + + const tenant = new AzureADTenant(); + tenant.setTenantId(this.tenantId?.value); + tenant.setTenantType(this.tenantType?.value); + req.setTenant(tenant); + + req.setScopesList(this.scopesList?.value); + req.setProviderOptions(this.options); + + if (this.updateClientSecret) { + req.setClientSecret(this.clientSecret?.value); + } + + this.loading = true; + (this.service as AdminService) + .updateAzureADProvider(req) + .then((idp) => { + setTimeout(() => { + this.loading = false; + this.router.navigate(['/settings'], { queryParams: { id: 'idp' } }); + }, 2000); + }) + .catch((error) => { + this.loading = false; + this.toast.showError(error); + }); + } + } + } + + public close(): void { + this._location.back(); + } + + public addScope(event: MatChipInputEvent): void { + const input = event.chipInput?.inputElement; + const value = event.value.trim(); + + if (value !== '') { + if (this.scopesList?.value) { + this.scopesList.value.push(value); + if (input) { + input.value = ''; + } + } + } + } + + public removeScope(uri: string): void { + if (this.scopesList?.value) { + const index = this.scopesList.value.indexOf(uri); + + if (index !== undefined && index >= 0) { + this.scopesList.value.splice(index, 1); + } + } + } + + public get name(): AbstractControl | null { + return this.form.get('name'); + } + + public get clientId(): AbstractControl | null { + return this.form.get('clientId'); + } + + public get clientSecret(): AbstractControl | null { + return this.form.get('clientSecret'); + } + + public get scopesList(): AbstractControl | null { + return this.form.get('scopesList'); + } + + public get emailVerified(): AbstractControl | null { + return this.form.get('emailVerified'); + } + + public get tenantId(): AbstractControl | null { + return this.form.get('tenantId'); + } + + public get tenantType(): AbstractControl | null { + return this.form.get('tenantType'); + } +} diff --git a/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.module.ts b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.module.ts new file mode 100644 index 000000000..9b6b875b0 --- /dev/null +++ b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.module.ts @@ -0,0 +1,43 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatIconModule } from '@angular/material/icon'; +import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button'; +import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox'; +import { MatLegacyChipsModule as MatChipsModule } from '@angular/material/legacy-chips'; +import { MatLegacyProgressSpinnerModule } from '@angular/material/legacy-progress-spinner'; +import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select'; +import { MatLegacyTooltipModule as MatTooltipModule } from '@angular/material/legacy-tooltip'; +import { TranslateModule } from '@ngx-translate/core'; +import { InputModule } from 'src/app/modules/input/input.module'; + +import { CardModule } from '../../card/card.module'; +import { CreateLayoutModule } from '../../create-layout/create-layout.module'; +import { InfoSectionModule } from '../../info-section/info-section.module'; +import { ProviderOptionsModule } from '../../provider-options/provider-options.module'; +import { ProviderAzureADRoutingModule } from './provider-azure-ad-routing.module'; +import { ProviderAzureADComponent } from './provider-azure-ad.component'; + +@NgModule({ + declarations: [ProviderAzureADComponent], + imports: [ + ProviderAzureADRoutingModule, + CommonModule, + FormsModule, + ReactiveFormsModule, + CreateLayoutModule, + InfoSectionModule, + InputModule, + MatButtonModule, + MatSelectModule, + MatIconModule, + MatChipsModule, + CardModule, + MatCheckboxModule, + MatTooltipModule, + TranslateModule, + ProviderOptionsModule, + MatLegacyProgressSpinnerModule, + ], +}) +export default class ProviderAzureADModule {} diff --git a/console/src/app/modules/providers/provider-github-es/provider-github-es.component.html b/console/src/app/modules/providers/provider-github-es/provider-github-es.component.html index 03c2edc23..3501933b0 100644 --- a/console/src/app/modules/providers/provider-github-es/provider-github-es.component.html +++ b/console/src/app/modules/providers/provider-github-es/provider-github-es.component.html @@ -4,8 +4,8 @@ >
- - + +

{{ 'IDP.CREATE.GITHUBES.TITLE' | translate }}

diff --git a/console/src/app/modules/providers/provider-github/provider-github.component.html b/console/src/app/modules/providers/provider-github/provider-github.component.html index 9723db050..57527abac 100644 --- a/console/src/app/modules/providers/provider-github/provider-github.component.html +++ b/console/src/app/modules/providers/provider-github/provider-github.component.html @@ -4,8 +4,8 @@ >
- - + +

{{ 'IDP.CREATE.GITHUB.TITLE' | translate }}

diff --git a/console/src/app/modules/providers/provider-gitlab-self-hosted/provider-gitlab-self-hosted.component.html b/console/src/app/modules/providers/provider-gitlab-self-hosted/provider-gitlab-self-hosted.component.html index 49f306de4..abc88d91c 100644 --- a/console/src/app/modules/providers/provider-gitlab-self-hosted/provider-gitlab-self-hosted.component.html +++ b/console/src/app/modules/providers/provider-gitlab-self-hosted/provider-gitlab-self-hosted.component.html @@ -4,7 +4,7 @@ >
- +

{{ 'IDP.CREATE.GITLABSELFHOSTED.TITLE' | translate }}

diff --git a/console/src/app/modules/providers/provider-gitlab/provider-gitlab.component.html b/console/src/app/modules/providers/provider-gitlab/provider-gitlab.component.html index 85397eb64..cf9961038 100644 --- a/console/src/app/modules/providers/provider-gitlab/provider-gitlab.component.html +++ b/console/src/app/modules/providers/provider-gitlab/provider-gitlab.component.html @@ -4,7 +4,7 @@ >
- +

{{ 'IDP.CREATE.GITLAB.TITLE' | translate }}

diff --git a/console/src/app/modules/providers/provider-google/provider-google.component.html b/console/src/app/modules/providers/provider-google/provider-google.component.html index d49717dcc..77f313fdf 100644 --- a/console/src/app/modules/providers/provider-google/provider-google.component.html +++ b/console/src/app/modules/providers/provider-google/provider-google.component.html @@ -4,7 +4,7 @@ >
- +

{{ 'IDP.CREATE.GOOGLE.TITLE' | translate }}

diff --git a/console/src/app/modules/providers/provider-oauth/provider-oauth.component.html b/console/src/app/modules/providers/provider-oauth/provider-oauth.component.html index 3e34d9d2b..c04122dc8 100644 --- a/console/src/app/modules/providers/provider-oauth/provider-oauth.component.html +++ b/console/src/app/modules/providers/provider-oauth/provider-oauth.component.html @@ -4,7 +4,7 @@ >
- +

{{ 'IDP.CREATE.OAUTH.TITLE' | translate }}

diff --git a/console/src/app/pages/instance/instance-routing.module.ts b/console/src/app/pages/instance/instance-routing.module.ts index 766d4c9dd..273858d5f 100644 --- a/console/src/app/pages/instance/instance-routing.module.ts +++ b/console/src/app/pages/instance/instance-routing.module.ts @@ -31,6 +31,19 @@ const routes: Routes = [ serviceType: PolicyComponentServiceType.ADMIN, }, children: [ + { + path: 'azure-ad', + children: [ + { + path: 'create', + loadChildren: () => import('src/app/modules/providers/provider-azure-ad/provider-azure-ad.module'), + }, + { + path: ':id', + loadChildren: () => import('src/app/modules/providers/provider-azure-ad/provider-azure-ad.module'), + }, + ], + }, { path: 'oidc', children: [ diff --git a/console/src/app/pages/orgs/org-routing.module.ts b/console/src/app/pages/orgs/org-routing.module.ts index 3c2f5d50d..89241b30b 100644 --- a/console/src/app/pages/orgs/org-routing.module.ts +++ b/console/src/app/pages/orgs/org-routing.module.ts @@ -125,6 +125,19 @@ const routes: Routes = [ }, ], }, + { + path: 'azure-ad', + children: [ + { + path: 'create', + loadChildren: () => import('src/app/modules/providers/provider-azure-ad/provider-azure-ad.module'), + }, + { + path: ':id', + loadChildren: () => import('src/app/modules/providers/provider-azure-ad/provider-azure-ad.module'), + }, + ], + }, ], }, { diff --git a/console/src/app/services/admin.service.ts b/console/src/app/services/admin.service.ts index df94cf526..8fea7f440 100644 --- a/console/src/app/services/admin.service.ts +++ b/console/src/app/services/admin.service.ts @@ -6,6 +6,8 @@ import { ActivateLabelPolicyResponse, ActivateSMSProviderRequest, ActivateSMSProviderResponse, + AddAzureADProviderRequest, + AddAzureADProviderResponse, AddCustomDomainPolicyRequest, AddCustomOrgIAMPolicyResponse, AddGenericOAuthProviderRequest, @@ -200,6 +202,8 @@ import { SetSecurityPolicyResponse, SetUpOrgRequest, SetUpOrgResponse, + UpdateAzureADProviderRequest, + UpdateAzureADProviderResponse, UpdateCustomDomainPolicyRequest, UpdateCustomDomainPolicyResponse, UpdateDomainPolicyRequest, @@ -914,6 +918,14 @@ export class AdminService { // idp templates + public addAzureADProvider(req: AddAzureADProviderRequest): Promise { + return this.grpcService.admin.addAzureADProvider(req, null).then((resp) => resp.toObject()); + } + + public updateAzureADProvider(req: UpdateAzureADProviderRequest): Promise { + return this.grpcService.admin.updateAzureADProvider(req, null).then((resp) => resp.toObject()); + } + public addGoogleProvider(req: AddGoogleProviderRequest): Promise { return this.grpcService.admin.addGoogleProvider(req, null).then((resp) => resp.toObject()); } diff --git a/console/src/app/services/mgmt.service.ts b/console/src/app/services/mgmt.service.ts index ca9024b11..ea76ed319 100644 --- a/console/src/app/services/mgmt.service.ts +++ b/console/src/app/services/mgmt.service.ts @@ -15,6 +15,8 @@ import { AddAPIAppResponse, AddAppKeyRequest, AddAppKeyResponse, + AddAzureADProviderRequest, + AddAzureADProviderResponse, AddCustomLabelPolicyRequest, AddCustomLabelPolicyResponse, AddCustomLockoutPolicyRequest, @@ -423,6 +425,8 @@ import { UpdateAPIAppConfigResponse, UpdateAppRequest, UpdateAppResponse, + UpdateAzureADProviderRequest, + UpdateAzureADProviderResponse, UpdateCustomLabelPolicyRequest, UpdateCustomLabelPolicyResponse, UpdateCustomLockoutPolicyRequest, @@ -873,6 +877,14 @@ export class ManagementService { // idp templates + public addAzureADProvider(req: AddAzureADProviderRequest): Promise { + return this.grpcService.mgmt.addAzureADProvider(req, null).then((resp) => resp.toObject()); + } + + public updateAzureADProvider(req: UpdateAzureADProviderRequest): Promise { + return this.grpcService.mgmt.updateAzureADProvider(req, null).then((resp) => resp.toObject()); + } + public addGoogleProvider(req: AddGoogleProviderRequest): Promise { return this.grpcService.mgmt.addGoogleProvider(req, null).then((resp) => resp.toObject()); } diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index 6b76b3fc7..f50d16cc8 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -1642,6 +1642,10 @@ "GITHUB": { "TITLE": "Github Provider", "DESCRIPTION": "Geben Sie die erforderlichen Daten für Ihren Github-Identitätsprovider ein." + }, + "AZUREAD": { + "TITLE": "Microsoft Provider", + "DESCRIPTION": "Geben Sie die erforderlichen Daten für Ihren Microsoft-Identitätsprovider ein." } }, "DETAIL": { @@ -1674,6 +1678,14 @@ "1": "aktiv", "2": "inaktiv" }, + "AZUREADTENANTTYPES": { + "0": "Common", + "1": "Organizations", + "2": "Customers" + }, + "AZUREADTENANTTYPE": "Tenant Typ", + "AZUREADTENANTID": "Tenant ID", + "EMAILVERIFIED": "Email verifiziert", "NAMEHINT": "Wenn angegeben, wir er im Login interface angezeigt.", "OPTIONAL": "optional", "UPDATECLIENTSECRET": "Client Secret updaten", diff --git a/console/src/assets/i18n/en.json b/console/src/assets/i18n/en.json index d8e465ee1..3621f9ecc 100644 --- a/console/src/assets/i18n/en.json +++ b/console/src/assets/i18n/en.json @@ -1647,6 +1647,10 @@ "GITHUB": { "TITLE": "Github Provider", "DESCRIPTION": "Enter the credentials for your Github Identity Provider" + }, + "AZUREAD": { + "TITLE": "Microsoft Provider", + "DESCRIPTION": "Enter the credentials for your Microsoft Identity Provider" } }, "DETAIL": { @@ -1674,6 +1678,14 @@ "1": "active", "2": "inactive" }, + "AZUREADTENANTTYPES": { + "0": "Common", + "1": "Organizations", + "2": "Customers" + }, + "AZUREADTENANTTYPE": "Tenant Type", + "AZUREADTENANTID": "Tenant ID", + "EMAILVERIFIED": "Email verified", "NAMEHINT": "If specified it will be shown in the login interface.", "OPTIONAL": "optional", "UPDATECLIENTSECRET": "update client secret", diff --git a/console/src/assets/i18n/fr.json b/console/src/assets/i18n/fr.json index beb22c68e..dbc1d9931 100644 --- a/console/src/assets/i18n/fr.json +++ b/console/src/assets/i18n/fr.json @@ -1646,6 +1646,10 @@ "GITHUB": { "TITLE": "Fournisseur Github", "DESCRIPTION": "Saisissez les informations d'identification de votre fournisseur d'identité Github" + }, + "AZUREAD": { + "TITLE": "Fournisseur Microsoft", + "DESCRIPTION": "Saisissez les informations d'identification de votre fournisseur d'identité Microsoft" } }, "DETAIL": { @@ -1678,6 +1682,14 @@ "1": "actif", "2": "inactif" }, + "AZUREADTENANTTYPES": { + "0": "Common", + "1": "Organizations", + "2": "Customers" + }, + "AZUREADTENANTTYPE": "Type de locataire", + "AZUREADTENANTID": "ID du locataire", + "EMAILVERIFIED": "Courriel vérifié", "NAMEHINT": "Si elle est spécifiée, elle sera affichée dans l'interface de connexion.", "OPTIONAL": "optionnel", "UPDATECLIENTSECRET": "mise à jour du secret client", diff --git a/console/src/assets/i18n/it.json b/console/src/assets/i18n/it.json index 948062a89..bd24f122c 100644 --- a/console/src/assets/i18n/it.json +++ b/console/src/assets/i18n/it.json @@ -1647,6 +1647,10 @@ "GITHUB": { "TITLE": "Github Provider", "DESCRIPTION": "Inserisci i dati necessari per il tuo Github provider." + }, + "AZUREAD": { + "TITLE": "Microsoft Provider", + "DESCRIPTION": "Inserisci i dati necessari per il tuo Microsoft provider." } }, "DETAIL": { @@ -1679,6 +1683,14 @@ "1": "attivo", "2": "inattivo" }, + "AZUREADTENANTTYPES": { + "0": "Common", + "1": "Organizations", + "2": "Customers" + }, + "AZUREADTENANTTYPE": "Tipo tenant", + "AZUREADTENANTID": "tenant ID", + "EMAILVERIFIED": "Email verificata", "NAMEHINT": "Se specificato, verrà mostrato nell'interfaccia di accesso.", "OPTIONAL": "opzionale", "UPDATECLIENTSECRET": "Aggiorna secret", diff --git a/console/src/assets/i18n/pl.json b/console/src/assets/i18n/pl.json index cfea8f36e..0cdf39e13 100644 --- a/console/src/assets/i18n/pl.json +++ b/console/src/assets/i18n/pl.json @@ -1646,6 +1646,10 @@ "GITHUB": { "TITLE": "Github Provider", "DESCRIPTION": "Wprowadź dane dla swojego dostawcy tożsamości Github" + }, + "AZUREAD": { + "TITLE": "Microsoft Provider", + "DESCRIPTION": "Wprowadź dane dla swojego dostawcy tożsamości Microsoft" } }, "DETAIL": { @@ -1678,6 +1682,14 @@ "1": "aktywny", "2": "nieaktywny" }, + "AZUREADTENANTTYPES": { + "0": "Common", + "1": "Organizations", + "2": "Customers" + }, + "AZUREADTENANTTYPE": "Rodzaj najemcy", + "AZUREADTENANTID": "Identyfikator najemcy", + "EMAILVERIFIED": "Email zweryfikowany", "NAMEHINT": "Jeśli zostanie podany, będzie widoczny w interfejsie logowania.", "OPTIONAL": "opcjonalnie", "UPDATECLIENTSECRET": "aktualizacja tajemnicy klienta", diff --git a/console/src/assets/i18n/zh.json b/console/src/assets/i18n/zh.json index ffeb3831d..516d20bbb 100644 --- a/console/src/assets/i18n/zh.json +++ b/console/src/assets/i18n/zh.json @@ -1645,6 +1645,10 @@ "GITHUB": { "TITLE": "Github 身份提供者", "DESCRIPTION": "输入您的 Github 身份提供商的凭据" + }, + "AZUREAD": { + "TITLE": "Microsoft 身份提供者", + "DESCRIPTION": "输入您的 Microsoft 身份提供商的凭据" } }, "DETAIL": { @@ -1677,6 +1681,14 @@ "1": "启用", "2": "停用" }, + "AZUREADTENANTTYPES": { + "0": "Common", + "1": "Organizations", + "2": "Customers" + }, + "AZUREADTENANTTYPE": "租户类型", + "AZUREADTENANTID": "租户编号", + "EMAILVERIFIED": "电子邮件已验证", "NAMEHINT": "如果指定,它将显示在登录界面。", "OPTIONAL": "可选", "UPDATECLIENTSECRET": "更新客户秘密",