mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-29 18:42:15 +00:00
feat: Lockout policy (#2121)
* feat: lock users if lockout policy is set * feat: setup * feat: lock user on password failes * feat: render error * feat: lock user on command side * feat: auth_req tests * feat: lockout policy docs * feat: remove show lockout failures from proto * fix: console lockout * feat: tests * fix: tests * unlock function * add unlock button * fix migration version * lockout policy * lint * Update internal/auth/repository/eventsourcing/eventstore/auth_request.go Co-authored-by: Silvan <[email protected]> * fix: err message * Update internal/command/setup_step4.go Co-authored-by: Silvan <[email protected]> Co-authored-by: Max Peintner <[email protected]> Co-authored-by: Livio Amstutz <[email protected]> Co-authored-by: Silvan <[email protected]>
This commit is contained in:
co-authored by
Silvan
Max Peintner
Livio Amstutz
parent
272e411e27
commit
bc951985ed
@@ -51,6 +51,8 @@ import {
|
||||
GetIDPByIDResponse,
|
||||
GetLabelPolicyRequest,
|
||||
GetLabelPolicyResponse,
|
||||
GetLockoutPolicyRequest,
|
||||
GetLockoutPolicyResponse,
|
||||
GetLoginPolicyRequest,
|
||||
GetLoginPolicyResponse,
|
||||
GetOrgFeaturesRequest,
|
||||
@@ -61,8 +63,6 @@ import {
|
||||
GetPasswordAgePolicyResponse,
|
||||
GetPasswordComplexityPolicyRequest,
|
||||
GetPasswordComplexityPolicyResponse,
|
||||
GetPasswordLockoutPolicyRequest,
|
||||
GetPasswordLockoutPolicyResponse,
|
||||
GetPreviewLabelPolicyRequest,
|
||||
GetPreviewLabelPolicyResponse,
|
||||
GetPrivacyPolicyRequest,
|
||||
@@ -144,6 +144,8 @@ import {
|
||||
UpdateIDPResponse,
|
||||
UpdateLabelPolicyRequest,
|
||||
UpdateLabelPolicyResponse,
|
||||
UpdateLockoutPolicyRequest,
|
||||
UpdateLockoutPolicyResponse,
|
||||
UpdateLoginPolicyRequest,
|
||||
UpdateLoginPolicyResponse,
|
||||
UpdateOrgIAMPolicyRequest,
|
||||
@@ -152,8 +154,6 @@ import {
|
||||
UpdatePasswordAgePolicyResponse,
|
||||
UpdatePasswordComplexityPolicyRequest,
|
||||
UpdatePasswordComplexityPolicyResponse,
|
||||
UpdatePasswordLockoutPolicyRequest,
|
||||
UpdatePasswordLockoutPolicyResponse,
|
||||
UpdatePrivacyPolicyRequest,
|
||||
UpdatePrivacyPolicyResponse,
|
||||
} from '../proto/generated/zitadel/admin_pb';
|
||||
@@ -431,20 +431,18 @@ export class AdminService {
|
||||
|
||||
/* lockout */
|
||||
|
||||
public getPasswordLockoutPolicy(): Promise<GetPasswordLockoutPolicyResponse.AsObject> {
|
||||
const req = new GetPasswordLockoutPolicyRequest();
|
||||
return this.grpcService.admin.getPasswordLockoutPolicy(req, null).then(resp => resp.toObject());
|
||||
public getLockoutPolicy(): Promise<GetLockoutPolicyResponse.AsObject> {
|
||||
const req = new GetLockoutPolicyRequest();
|
||||
return this.grpcService.admin.getLockoutPolicy(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public updatePasswordLockoutPolicy(
|
||||
public updateLockoutPolicy(
|
||||
maxAttempts: number,
|
||||
showLockoutFailures: boolean,
|
||||
): Promise<UpdatePasswordLockoutPolicyResponse.AsObject> {
|
||||
const req = new UpdatePasswordLockoutPolicyRequest();
|
||||
req.setMaxAttempts(maxAttempts);
|
||||
req.setShowLockoutFailure(showLockoutFailures);
|
||||
): Promise<UpdateLockoutPolicyResponse.AsObject> {
|
||||
const req = new UpdateLockoutPolicyRequest();
|
||||
req.setMaxPasswordAttempts(maxAttempts);
|
||||
|
||||
return this.grpcService.admin.updatePasswordLockoutPolicy(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.admin.updateLockoutPolicy(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
/* label */
|
||||
|
||||
Reference in New Issue
Block a user