mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-03 04:42:15 +00:00
* fix: wait for projection initialization to be done * feat: allow domain discovery for unknown usernames * fix linting * Update console/src/assets/i18n/de.json Co-authored-by: Fabi <[email protected]> * Update console/src/assets/i18n/en.json Co-authored-by: Fabi <[email protected]> * Update console/src/assets/i18n/it.json Co-authored-by: Fabi <[email protected]> * Update console/src/assets/i18n/fr.json Co-authored-by: Fabi <[email protected]> * fix zh i18n text * fix projection table name Co-authored-by: Fabi <[email protected]>
379 lines
11 KiB
HTML
379 lines
11 KiB
HTML
<div class="spinner-wr">
|
|
<mat-spinner diameter="30" *ngIf="loading" color="primary"></mat-spinner>
|
|
</div>
|
|
|
|
<h2>{{ 'SETTINGS.LIST.LOGIN' | translate }}</h2>
|
|
|
|
<ng-container *ngIf="serviceType === PolicyComponentServiceType.MGMT && !isDefault">
|
|
<ng-template cnslHasRole [hasRole]="['policy.delete']">
|
|
<button
|
|
color="primary"
|
|
class="loginpolicy-reset-button"
|
|
matTooltip="{{ 'POLICY.RESET' | translate }}"
|
|
color="warn"
|
|
(click)="removePolicy()"
|
|
mat-stroked-button
|
|
>
|
|
{{ 'POLICY.RESET' | translate }}
|
|
</button>
|
|
</ng-template>
|
|
</ng-container>
|
|
|
|
<br />
|
|
|
|
<h3>{{ 'MFA.LIST.MULTIFACTORTITLE' | translate }}</h3>
|
|
<p class="cnsl-secondary-text">{{ 'MFA.LIST.MULTIFACTORDESCRIPTION' | translate }}</p>
|
|
|
|
<div class="login-policy-row" *ngIf="loginData">
|
|
<cnsl-form-field class="passwordless-allowed" label="Access Code" required="true">
|
|
<cnsl-label>{{ 'LOGINPOLICY.PASSWORDLESS' | translate }}</cnsl-label>
|
|
<mat-select
|
|
[(ngModel)]="loginData.passwordlessType"
|
|
[disabled]="
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
<mat-option *ngFor="let pt of passwordlessTypes" [value]="pt">
|
|
{{ 'LOGINPOLICY.PASSWORDLESSTYPE.' + pt | translate }}
|
|
</mat-option>
|
|
</mat-select>
|
|
</cnsl-form-field>
|
|
</div>
|
|
|
|
<cnsl-card class="max-card-width" *ngIf="loginData">
|
|
<cnsl-factor-table
|
|
[service]="service"
|
|
[serviceType]="serviceType"
|
|
[componentType]="LoginMethodComponentType.MultiFactor"
|
|
[list]="loginData.multiFactorsList"
|
|
(typeRemoved)="removeFactor($event)"
|
|
(typeAdded)="addFactor($event)"
|
|
[disabled]="
|
|
loginData.passwordlessType === PasswordlessType.PASSWORDLESS_TYPE_NOT_ALLOWED ||
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
</cnsl-factor-table>
|
|
</cnsl-card>
|
|
|
|
<br />
|
|
|
|
<h3>{{ 'MFA.LIST.SECONDFACTORTITLE' | translate }}</h3>
|
|
<p class="cnsl-secondary-text">{{ 'MFA.LIST.SECONDFACTORDESCRIPTION' | translate }}</p>
|
|
|
|
<div *ngIf="loginData" class="login-policy-row">
|
|
<mat-checkbox
|
|
card-actions
|
|
class="login-policy-toggle"
|
|
color="primary"
|
|
ngDefaultControl
|
|
[(ngModel)]="loginData.forceMfa"
|
|
[disabled]="
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
{{ 'POLICY.DATA.FORCEMFA' | translate }}
|
|
</mat-checkbox>
|
|
</div>
|
|
<cnsl-card class="max-card-width" *ngIf="loginData">
|
|
<cnsl-factor-table
|
|
[service]="service"
|
|
[serviceType]="serviceType"
|
|
[componentType]="LoginMethodComponentType.SecondFactor"
|
|
[list]="loginData.secondFactorsList"
|
|
(typeRemoved)="removeFactor($event)"
|
|
(typeAdded)="addFactor($event)"
|
|
[disabled]="
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
</cnsl-factor-table>
|
|
</cnsl-card>
|
|
|
|
<br />
|
|
|
|
<h3>{{ 'POLICY.LOGIN_POLICY.LIFETIMEDURATIONS' | translate }}</h3>
|
|
|
|
<form class="lifetime-form" (ngSubmit)="savePolicy()" [formGroup]="lifetimeForm" autocomplete="off">
|
|
<cnsl-form-field class="lifetime-form-field" label="Password Check Lifetime" required="true">
|
|
<cnsl-label
|
|
>{{ 'POLICY.DATA.PASSWORDCHECKLIFETIME' | translate }} <strong
|
|
>({{ 'POLICY.DATA.INHOURS' | translate }})</strong
|
|
></cnsl-label
|
|
>
|
|
<input cnslInput type="number" name="passwordCheckLifetime" formControlName="passwordCheckLifetime" />
|
|
</cnsl-form-field>
|
|
|
|
<cnsl-form-field class="lifetime-form-field" label="external Login Check Lifetime" required="true">
|
|
<cnsl-label
|
|
>{{ 'POLICY.DATA.EXTERNALLOGINCHECKLIFETIME' | translate }} <strong
|
|
>({{ 'POLICY.DATA.INHOURS' | translate }})</strong
|
|
></cnsl-label
|
|
>
|
|
<input cnslInput type="number" name="externalLoginCheckLifetime" formControlName="externalLoginCheckLifetime" />
|
|
</cnsl-form-field>
|
|
|
|
<cnsl-form-field class="lifetime-form-field" label="MFA Init Skip Lifetime" required="true">
|
|
<cnsl-label
|
|
>{{ 'POLICY.DATA.MFAINITSKIPLIFETIME' | translate }} <strong
|
|
>({{ 'POLICY.DATA.INHOURS' | translate }})</strong
|
|
></cnsl-label
|
|
>
|
|
<input cnslInput type="number" name="mfaInitSkipLifetime" formControlName="mfaInitSkipLifetime" />
|
|
</cnsl-form-field>
|
|
|
|
<cnsl-form-field class="lifetime-form-field" label="Second Factor Check Lifetime" required="true">
|
|
<cnsl-label
|
|
>{{ 'POLICY.DATA.SECONDFACTORCHECKLIFETIME' | translate }}
|
|
<strong>({{ 'POLICY.DATA.INHOURS' | translate }})</strong></cnsl-label
|
|
>
|
|
<input cnslInput type="number" name="secondFactorCheckLifetime" formControlName="secondFactorCheckLifetime" />
|
|
</cnsl-form-field>
|
|
|
|
<cnsl-form-field class="lifetime-form-field" label="Multi Factor Check Lifetime" required="true">
|
|
<cnsl-label
|
|
>{{ 'POLICY.DATA.MULTIFACTORCHECKLIFETIME' | translate }}
|
|
<strong>({{ 'POLICY.DATA.INHOURS' | translate }})</strong></cnsl-label
|
|
>
|
|
<input cnslInput type="number" name="multiFactorCheckLifetime" formControlName="multiFactorCheckLifetime" />
|
|
</cnsl-form-field>
|
|
</form>
|
|
|
|
<br />
|
|
|
|
<h3>{{ 'POLICY.LOGIN_POLICY.ADVANCED' | translate }}</h3>
|
|
|
|
<div class="max-card-width login-policy-content" *ngIf="loginData">
|
|
<div class="login-policy-row">
|
|
<mat-checkbox
|
|
class="login-policy-toggle"
|
|
color="primary"
|
|
matTooltip="{{ 'POLICY.DATA.FORCEMFA_DESC' | translate }}"
|
|
ngDefaultControl
|
|
[(ngModel)]="loginData.allowUsernamePassword"
|
|
[disabled]="
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
{{ 'POLICY.DATA.ALLOWUSERNAMEPASSWORD' | translate }}
|
|
</mat-checkbox>
|
|
|
|
<!-- <cnsl-info-section class="info">
|
|
{{ 'POLICY.DATA.ALLOWUSERNAMEPASSWORD_DESC' | translate }}
|
|
</cnsl-info-section> -->
|
|
</div>
|
|
<div class="login-policy-row">
|
|
<mat-checkbox
|
|
class="login-policy-toggle"
|
|
color="primary"
|
|
ngDefaultControl
|
|
[(ngModel)]="loginData.allowRegister"
|
|
[disabled]="
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
{{ 'POLICY.DATA.ALLOWREGISTER' | translate }}
|
|
</mat-checkbox>
|
|
|
|
<!-- <ng-template #regInfo>
|
|
<cnsl-info-section class="info">
|
|
{{ 'POLICY.DATA.ALLOWREGISTER_DESC' | translate }}
|
|
</cnsl-info-section>
|
|
</ng-template> -->
|
|
</div>
|
|
<div class="login-policy-row">
|
|
<mat-checkbox
|
|
class="login-policy-toggle"
|
|
color="primary"
|
|
ngDefaultControl
|
|
[(ngModel)]="loginData.allowExternalIdp"
|
|
[disabled]="
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
{{ 'POLICY.DATA.ALLOWEXTERNALIDP' | translate }}
|
|
</mat-checkbox>
|
|
|
|
<!-- <ng-template #idpInfo>
|
|
<cnsl-info-section class="info">
|
|
{{ 'POLICY.DATA.ALLOWEXTERNALIDP_DESC' | translate }}
|
|
</cnsl-info-section>
|
|
</ng-template> -->
|
|
</div>
|
|
|
|
<div class="login-policy-row">
|
|
<mat-checkbox
|
|
class="login-policy-toggle"
|
|
color="primary"
|
|
ngDefaultControl
|
|
[(ngModel)]="loginData.hidePasswordReset"
|
|
[disabled]="
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
{{ 'POLICY.DATA.HIDEPASSWORDRESET' | translate }}
|
|
</mat-checkbox>
|
|
|
|
<!-- <ng-template #passwordResetInfo>
|
|
<cnsl-info-section class="info">
|
|
{{ 'POLICY.DATA.HIDEPASSWORDRESET_DESC' | translate }}
|
|
</cnsl-info-section>
|
|
</ng-template> -->
|
|
</div>
|
|
|
|
<div class="login-policy-row">
|
|
<mat-checkbox
|
|
class="login-policy-toggle"
|
|
color="primary"
|
|
ngDefaultControl
|
|
[(ngModel)]="loginData.allowDomainDiscovery"
|
|
[disabled]="
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
{{ 'POLICY.DATA.ALLOWDOMAINDISCOVERY' | translate }}
|
|
</mat-checkbox>
|
|
</div>
|
|
|
|
<div class="login-policy-row">
|
|
<mat-checkbox
|
|
class="login-policy-toggle"
|
|
color="primary"
|
|
ngDefaultControl
|
|
[(ngModel)]="loginData.ignoreUnknownUsernames"
|
|
[disabled]="
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
{{ 'POLICY.DATA.IGNOREUNKNOWNUSERNAMES' | translate }}
|
|
</mat-checkbox>
|
|
</div>
|
|
|
|
<div class="login-policy-row">
|
|
<cnsl-form-field class="form-field" label="Access Code" required="true">
|
|
<cnsl-label>{{ 'POLICY.DATA.DEFAULTREDIRECTURI' | translate }}</cnsl-label>
|
|
<input
|
|
cnslInput
|
|
placeholder="https://"
|
|
[(ngModel)]="loginData.defaultRedirectUri"
|
|
[disabled]="
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
/>
|
|
</cnsl-form-field>
|
|
</div>
|
|
</div>
|
|
|
|
<br />
|
|
|
|
<div class="login-policy-btn-container">
|
|
<button
|
|
class="login-policy-save-button"
|
|
(click)="savePolicy()"
|
|
color="primary"
|
|
type="submit"
|
|
mat-raised-button
|
|
[disabled]="
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
{{ 'ACTIONS.SAVE' | translate }}
|
|
</button>
|
|
</div>
|