feat: provide option to limit (T)OTP checks (#7693)

* feat: provide option to limit (T)OTP checks

* fix requests in console

* update errors pkg

* cleanup

* cleanup

* improve naming of existing config
This commit is contained in:
Livio Spring
2024-04-10 11:14:55 +02:00
committed by GitHub
parent e3f10f7e23
commit 153df2e12f
58 changed files with 752 additions and 755 deletions

View File

@@ -6650,6 +6650,12 @@ message UpdateLockoutPolicyRequest {
example: "\"10\""
}
];
uint32 max_otp_attempts = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Maximum failed attempts for a single OTP type (TOTP, SMS, Email) before the account gets locked. Attempts are reset as soon as the OTP is entered correctly. If set to 0 the account will never be locked."
example: "\"10\""
}
];
}
message UpdateLockoutPolicyResponse {

View File

@@ -10412,6 +10412,12 @@ message AddCustomLockoutPolicyRequest {
description: "When the user has reached the maximum password attempts the account will be locked, If this is set to 0 the lockout will not trigger."
}
];
uint32 max_otp_attempts = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Maximum failed attempts for a single OTP type (TOTP, SMS, Email) before the account gets locked. Attempts are reset as soon as the OTP is entered correctly. If set to 0 the account will never be locked."
example: "\"10\""
}
];
}
message AddCustomLockoutPolicyResponse {
@@ -10424,6 +10430,12 @@ message UpdateCustomLockoutPolicyRequest {
description: "When the user has reached the maximum password attempts the account will be locked, If this is set to 0 the lockout will not trigger."
}
];
uint32 max_otp_attempts = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Maximum failed attempts for a single OTP type (TOTP, SMS, Email) before the account gets locked. Attempts are reset as soon as the OTP is entered correctly. If set to 0 the account will never be locked."
example: "\"10\""
}
];
}
message UpdateCustomLockoutPolicyResponse {

View File

@@ -337,6 +337,12 @@ message LockoutPolicy {
example: "\"10\""
}
];
uint64 max_otp_attempts = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Maximum failed attempts for a single OTP type (TOTP, SMS, Email) before the account gets locked. Attempts are reset as soon as the OTP is entered correctly. If set to 0 the account will never be locked."
example: "\"10\""
}
];
bool is_default = 4 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if the organization's admin changed the policy"

View File

@@ -20,4 +20,10 @@ message LockoutSettings {
description: "resource_owner_type returns if the settings is managed on the organization or on the instance";
}
];
uint64 max_otp_attempts = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Maximum failed attempts for a single OTP type (TOTP, SMS, Email) before the account gets locked. Attempts are reset as soon as the OTP is entered correctly. If set to 0 the account will never be locked."
example: "\"10\""
}
];
}