mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-06 14:37:41 +00:00
parent
d140f9373a
commit
e79e280dc7
@ -25,9 +25,14 @@
|
||||
<input cnslInput formControlName="clientId" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<mat-checkbox *ngIf="provider" [(ngModel)]="updateClientSecret" [ngModelOptions]="{ standalone: true }">{{
|
||||
'IDP.UPDATECLIENTSECRET' | translate
|
||||
}}</mat-checkbox>
|
||||
<mat-checkbox
|
||||
class="update-secret-checkbox"
|
||||
*ngIf="provider"
|
||||
[(ngModel)]="updateClientSecret"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
>{{ 'IDP.UPDATECLIENTSECRET' | translate }}</mat-checkbox
|
||||
>
|
||||
|
||||
<cnsl-form-field *ngIf="!provider || (provider && updateClientSecret)" class="formfield">
|
||||
<cnsl-label>{{ 'IDP.CLIENTSECRET' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="clientSecret" />
|
||||
@ -85,7 +90,7 @@
|
||||
</mat-select>
|
||||
</cnsl-form-field>
|
||||
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-form-field class="formfield" *ngIf="tenantType?.value === AzureTenantIDType">
|
||||
<cnsl-label>{{ 'IDP.AZUREADTENANTID' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="tenantId" />
|
||||
</cnsl-form-field>
|
||||
|
@ -44,7 +44,10 @@ export class ProviderAzureADComponent {
|
||||
|
||||
public provider?: Provider.AsObject;
|
||||
public updateClientSecret: boolean = false;
|
||||
|
||||
public AzureTenantIDType: number = 3;
|
||||
public tenantTypes = [
|
||||
this.AzureTenantIDType,
|
||||
AzureADTenantType.AZURE_AD_TENANT_TYPE_COMMON,
|
||||
AzureADTenantType.AZURE_AD_TENANT_TYPE_ORGANISATIONS,
|
||||
AzureADTenantType.AZURE_AD_TENANT_TYPE_CONSUMERS,
|
||||
@ -126,15 +129,34 @@ export class ProviderAzureADComponent {
|
||||
: new MgmtGetProviderByIDRequest();
|
||||
req.setId(id);
|
||||
this.service
|
||||
.getProviderByID(req)
|
||||
.getProviderID(req)
|
||||
.then((resp) => {
|
||||
this.provider = resp.idp;
|
||||
const object = resp.toObject();
|
||||
this.provider = object.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);
|
||||
|
||||
const tenant = resp.getIdp()?.getConfig()?.getAzureAd()?.getTenant();
|
||||
|
||||
if (tenant) {
|
||||
switch (tenant.getTypeCase()) {
|
||||
case AzureADTenant.TypeCase.TENANT_ID:
|
||||
this.tenantId?.setValue(tenant.getTenantId());
|
||||
this.tenantType?.setValue(this.AzureTenantIDType);
|
||||
break;
|
||||
case AzureADTenant.TypeCase.TENANT_TYPE:
|
||||
this.tenantType?.setValue(tenant.getTenantType());
|
||||
this.tenantId?.setValue('');
|
||||
break;
|
||||
case AzureADTenant.TypeCase.TYPE_NOT_SET:
|
||||
this.tenantType?.setValue(this.AzureTenantIDType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
@ -159,8 +181,11 @@ export class ProviderAzureADComponent {
|
||||
req.setEmailVerified(this.emailVerified?.value);
|
||||
|
||||
const tenant = new AzureADTenant();
|
||||
tenant.setTenantId(this.tenantId?.value);
|
||||
tenant.setTenantType(this.tenantType?.value);
|
||||
if (this.tenantType?.value === this.AzureTenantIDType) {
|
||||
tenant.setTenantId(this.tenantId?.value);
|
||||
} else {
|
||||
tenant.setTenantType(this.tenantType?.value);
|
||||
}
|
||||
req.setTenant(tenant);
|
||||
|
||||
req.setScopesList(this.scopesList?.value);
|
||||
@ -194,9 +219,11 @@ export class ProviderAzureADComponent {
|
||||
req.setEmailVerified(this.emailVerified?.value);
|
||||
|
||||
const tenant = new AzureADTenant();
|
||||
|
||||
tenant.setTenantId(this.tenantId?.value);
|
||||
tenant.setTenantType(this.tenantType?.value);
|
||||
if (this.tenantType?.value === this.AzureTenantIDType) {
|
||||
tenant.setTenantId(this.tenantId?.value);
|
||||
} else {
|
||||
tenant.setTenantType(this.tenantType?.value);
|
||||
}
|
||||
req.setTenant(tenant);
|
||||
|
||||
req.setScopesList(this.scopesList?.value);
|
||||
|
@ -40,9 +40,14 @@
|
||||
<input cnslInput formControlName="clientId" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<mat-checkbox *ngIf="provider" [(ngModel)]="updateClientSecret" [ngModelOptions]="{ standalone: true }">{{
|
||||
'IDP.UPDATECLIENTSECRET' | translate
|
||||
}}</mat-checkbox>
|
||||
<mat-checkbox
|
||||
class="update-secret-checkbox"
|
||||
*ngIf="provider"
|
||||
[(ngModel)]="updateClientSecret"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
>{{ 'IDP.UPDATECLIENTSECRET' | translate }}</mat-checkbox
|
||||
>
|
||||
|
||||
<cnsl-form-field *ngIf="!provider || (provider && updateClientSecret)" class="formfield">
|
||||
<cnsl-label>{{ 'IDP.CLIENTSECRET' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="clientSecret" />
|
||||
|
@ -153,6 +153,7 @@ export class ProviderGithubESComponent {
|
||||
req.setClientId(this.clientId?.value);
|
||||
req.setClientSecret(this.clientSecret?.value);
|
||||
req.setScopesList(this.scopesList?.value);
|
||||
req.setProviderOptions(this.options);
|
||||
|
||||
this.loading = true;
|
||||
this.service
|
||||
@ -183,6 +184,7 @@ export class ProviderGithubESComponent {
|
||||
req.setClientId(this.clientId?.value);
|
||||
req.setClientSecret(this.clientSecret?.value);
|
||||
req.setScopesList(this.scopesList?.value);
|
||||
req.setProviderOptions(this.options);
|
||||
|
||||
this.loading = true;
|
||||
this.service
|
||||
|
@ -21,9 +21,14 @@
|
||||
<input cnslInput formControlName="clientId" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<mat-checkbox *ngIf="provider" [(ngModel)]="updateClientSecret" [ngModelOptions]="{ standalone: true }">{{
|
||||
'IDP.UPDATECLIENTSECRET' | translate
|
||||
}}</mat-checkbox>
|
||||
<mat-checkbox
|
||||
class="update-secret-checkbox"
|
||||
*ngIf="provider"
|
||||
[(ngModel)]="updateClientSecret"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
>{{ 'IDP.UPDATECLIENTSECRET' | translate }}</mat-checkbox
|
||||
>
|
||||
|
||||
<cnsl-form-field *ngIf="!provider || (provider && updateClientSecret)" class="formfield">
|
||||
<cnsl-label>{{ 'IDP.CLIENTSECRET' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="clientSecret" />
|
||||
|
@ -30,9 +30,14 @@
|
||||
<input cnslInput formControlName="clientId" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<mat-checkbox *ngIf="provider" [(ngModel)]="updateClientSecret" [ngModelOptions]="{ standalone: true }">{{
|
||||
'IDP.UPDATECLIENTSECRET' | translate
|
||||
}}</mat-checkbox>
|
||||
<mat-checkbox
|
||||
class="update-secret-checkbox"
|
||||
*ngIf="provider"
|
||||
[(ngModel)]="updateClientSecret"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
>{{ 'IDP.UPDATECLIENTSECRET' | translate }}</mat-checkbox
|
||||
>
|
||||
|
||||
<cnsl-form-field *ngIf="!provider || (provider && updateClientSecret)" class="formfield">
|
||||
<cnsl-label>{{ 'IDP.CLIENTSECRET' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="clientSecret" />
|
||||
|
@ -20,9 +20,14 @@
|
||||
<input cnslInput formControlName="clientId" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<mat-checkbox *ngIf="provider" [(ngModel)]="updateClientSecret" [ngModelOptions]="{ standalone: true }">{{
|
||||
'IDP.UPDATECLIENTSECRET' | translate
|
||||
}}</mat-checkbox>
|
||||
<mat-checkbox
|
||||
class="update-secret-checkbox"
|
||||
*ngIf="provider"
|
||||
[(ngModel)]="updateClientSecret"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
>{{ 'IDP.UPDATECLIENTSECRET' | translate }}</mat-checkbox
|
||||
>
|
||||
|
||||
<cnsl-form-field *ngIf="!provider || (provider && updateClientSecret)" class="formfield">
|
||||
<cnsl-label>{{ 'IDP.CLIENTSECRET' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="clientSecret" />
|
||||
|
@ -20,9 +20,13 @@
|
||||
<input cnslInput formControlName="clientId" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<mat-checkbox *ngIf="provider" [(ngModel)]="updateClientSecret" [ngModelOptions]="{ standalone: true }">{{
|
||||
'IDP.UPDATECLIENTSECRET' | translate
|
||||
}}</mat-checkbox>
|
||||
<mat-checkbox
|
||||
class="update-secret-checkbox"
|
||||
*ngIf="provider"
|
||||
[(ngModel)]="updateClientSecret"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
>{{ 'IDP.UPDATECLIENTSECRET' | translate }}</mat-checkbox
|
||||
>
|
||||
<cnsl-form-field *ngIf="!provider || (provider && updateClientSecret)" class="formfield">
|
||||
<cnsl-label>{{ 'IDP.CLIENTSECRET' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="clientSecret" />
|
||||
|
@ -39,9 +39,13 @@
|
||||
<input cnslInput formControlName="bindDn" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<mat-checkbox *ngIf="provider" [(ngModel)]="updateBindPassword" [ngModelOptions]="{ standalone: true }">{{
|
||||
'IDP.UPDATEBINDPASSWORD' | translate
|
||||
}}</mat-checkbox>
|
||||
<mat-checkbox
|
||||
class="update-secret-checkbox"
|
||||
*ngIf="provider"
|
||||
[(ngModel)]="updateBindPassword"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
>{{ 'IDP.UPDATEBINDPASSWORD' | translate }}</mat-checkbox
|
||||
>
|
||||
<cnsl-form-field *ngIf="!provider || (provider && updateBindPassword)" class="formfield">
|
||||
<cnsl-label>{{ 'IDP.BINDPASSWORD' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="bindPassword" />
|
||||
|
@ -13,40 +13,45 @@
|
||||
<p class="identity-provider-desc cnsl-secondary-text">{{ 'IDP.CREATE.OAUTH.DESCRIPTION' | translate }}</p>
|
||||
|
||||
<form [formGroup]="form" (ngSubmit)="submitForm()">
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ 'IDP.NAME' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="name" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ 'IDP.AUTHORIZATIONENDPOINT' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="authorizationEndpoint" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ 'IDP.TOKENENDPOINT' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="tokenEndpoint" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ 'IDP.USERENDPOINT' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="userEndpoint" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ 'IDP.IDATTRIBUTE' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="idAttribute" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<div class="identity-provider-content">
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ 'IDP.NAME' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="name" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ 'IDP.AUTHORIZATIONENDPOINT' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="authorizationEndpoint" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ 'IDP.TOKENENDPOINT' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="tokenEndpoint" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ 'IDP.USERENDPOINT' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="userEndpoint" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ 'IDP.IDATTRIBUTE' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="idAttribute" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ 'IDP.CLIENTID' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="clientId" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<mat-checkbox *ngIf="provider" [(ngModel)]="updateClientSecret" [ngModelOptions]="{ standalone: true }">{{
|
||||
'IDP.UPDATECLIENTSECRET' | translate
|
||||
}}</mat-checkbox>
|
||||
<mat-checkbox
|
||||
class="update-secret-checkbox"
|
||||
*ngIf="provider"
|
||||
[(ngModel)]="updateClientSecret"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
>{{ 'IDP.UPDATECLIENTSECRET' | translate }}</mat-checkbox
|
||||
>
|
||||
|
||||
<cnsl-form-field *ngIf="!provider || (provider && updateClientSecret)" class="formfield">
|
||||
<cnsl-label>{{ 'IDP.CLIENTSECRET' | translate }}</cnsl-label>
|
||||
<input cnslInput formControlName="clientSecret" />
|
||||
|
@ -155,6 +155,7 @@ export class ProviderOAuthComponent {
|
||||
req.setClientId(this.clientId?.value);
|
||||
req.setClientSecret(this.clientSecret?.value);
|
||||
req.setScopesList(this.scopesList?.value);
|
||||
req.setProviderOptions(this.options);
|
||||
|
||||
this.loading = true;
|
||||
this.service
|
||||
@ -186,6 +187,7 @@ export class ProviderOAuthComponent {
|
||||
req.setClientId(this.clientId?.value);
|
||||
req.setClientSecret(this.clientSecret?.value);
|
||||
req.setScopesList(this.scopesList?.value);
|
||||
req.setProviderOptions(this.options);
|
||||
|
||||
this.loading = true;
|
||||
this.service
|
||||
|
@ -130,6 +130,7 @@ export class ProviderOIDCComponent {
|
||||
req.setClientSecret(this.clientSecret?.value);
|
||||
req.setIssuer(this.issuer?.value);
|
||||
req.setScopesList(this.scopesList?.value);
|
||||
req.setProviderOptions(this.options);
|
||||
|
||||
this.loading = true;
|
||||
this.service
|
||||
@ -158,6 +159,7 @@ export class ProviderOIDCComponent {
|
||||
req.setClientSecret(this.clientSecret?.value);
|
||||
req.setIssuer(this.issuer?.value);
|
||||
req.setScopesList(this.scopesList?.value);
|
||||
req.setProviderOptions(this.options);
|
||||
|
||||
this.loading = true;
|
||||
this.service
|
||||
|
@ -36,6 +36,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.update-secret-checkbox {
|
||||
margin: 0.5rem 0 0 0;
|
||||
}
|
||||
|
||||
.formfield {
|
||||
display: block;
|
||||
max-width: 400px;
|
||||
|
@ -1047,6 +1047,10 @@ export class AdminService {
|
||||
return this.grpcService.admin.getProviderByID(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public getProviderID(req: GetProviderByIDRequest): Promise<GetProviderByIDResponse> {
|
||||
return this.grpcService.admin.getProviderByID(req, null);
|
||||
}
|
||||
|
||||
public listIAMMembers(
|
||||
limit: number,
|
||||
offset: number,
|
||||
|
@ -987,6 +987,10 @@ export class ManagementService {
|
||||
return this.grpcService.mgmt.getProviderByID(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public getProviderID(req: GetProviderByIDRequest): Promise<GetProviderByIDResponse> {
|
||||
return this.grpcService.mgmt.getProviderByID(req, null);
|
||||
}
|
||||
|
||||
public addHumanUser(req: AddHumanUserRequest): Promise<AddHumanUserResponse.AsObject> {
|
||||
return this.grpcService.mgmt.addHumanUser(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
@ -1699,6 +1699,7 @@
|
||||
"2": "inaktiv"
|
||||
},
|
||||
"AZUREADTENANTTYPES": {
|
||||
"3": "Tenant ID",
|
||||
"0": "Common",
|
||||
"1": "Organizations",
|
||||
"2": "Consumers"
|
||||
|
@ -1699,6 +1699,7 @@
|
||||
"2": "inactive"
|
||||
},
|
||||
"AZUREADTENANTTYPES": {
|
||||
"3": "Tenant ID",
|
||||
"0": "Common",
|
||||
"1": "Organizations",
|
||||
"2": "Consumers"
|
||||
|
@ -1699,9 +1699,10 @@
|
||||
"2": "inactivo"
|
||||
},
|
||||
"AZUREADTENANTTYPES": {
|
||||
"0": "Común",
|
||||
"1": "Organizaciones",
|
||||
"2": "Clientes"
|
||||
"3": "Tenant ID",
|
||||
"0": "Common",
|
||||
"1": "Organizations",
|
||||
"2": "Consumers"
|
||||
},
|
||||
"AZUREADTENANTTYPE": "Tipo de Tenant",
|
||||
"AZUREADTENANTID": "ID de Tenant",
|
||||
|
@ -1703,6 +1703,7 @@
|
||||
"2": "inactif"
|
||||
},
|
||||
"AZUREADTENANTTYPES": {
|
||||
"3": "Tenant ID",
|
||||
"0": "Common",
|
||||
"1": "Organizations",
|
||||
"2": "Consumers"
|
||||
|
@ -1704,6 +1704,7 @@
|
||||
"2": "inattivo"
|
||||
},
|
||||
"AZUREADTENANTTYPES": {
|
||||
"3": "Tenant ID",
|
||||
"0": "Common",
|
||||
"1": "Organizations",
|
||||
"2": "Consumers"
|
||||
|
@ -1694,9 +1694,10 @@
|
||||
"2": "非アクティブ"
|
||||
},
|
||||
"AZUREADTENANTTYPES": {
|
||||
"0": "共通",
|
||||
"1": "組織",
|
||||
"2": "顧客"
|
||||
"3": "Tenant ID",
|
||||
"0": "Common",
|
||||
"1": "Organizations",
|
||||
"2": "Consumers"
|
||||
},
|
||||
"AZUREADTENANTTYPE": "テナントタイプ",
|
||||
"AZUREADTENANTID": "テナントID",
|
||||
|
@ -1703,6 +1703,7 @@
|
||||
"2": "nieaktywny"
|
||||
},
|
||||
"AZUREADTENANTTYPES": {
|
||||
"3": "Tenant ID",
|
||||
"0": "Common",
|
||||
"1": "Organizations",
|
||||
"2": "Consumers"
|
||||
|
@ -1702,6 +1702,7 @@
|
||||
"2": "停用"
|
||||
},
|
||||
"AZUREADTENANTTYPES": {
|
||||
"3": "Tenant ID",
|
||||
"0": "Common",
|
||||
"1": "Organizations",
|
||||
"2": "Consumers"
|
||||
|
Loading…
x
Reference in New Issue
Block a user