mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-29 02:22:16 +00:00
feat: mfa policy (#913)
* feat: add mfa to login policy * feat: add mfa to login policy * feat: add mfa to login policy * feat: add mfa to login policy * feat: add mfa to login policy on org * feat: add mfa to login policy on org * feat: append events on policy views * feat: iam login policy mfa definition * feat: login policies on orgs * feat: configured mfas in login process * feat: configured mfas in login process * Update internal/ui/login/static/i18n/en.yaml Co-authored-by: Livio Amstutz <[email protected]> * fix: rename software and hardware mfas * fix: pr requests * fix user mfa * fix: test * fix: oidc version * fix: oidc version * fix: proto gen Co-authored-by: Livio Amstutz <[email protected]> Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
co-authored by
Livio Amstutz
Max Peintner
parent
51417be35d
commit
202aae4954
@@ -4496,6 +4496,8 @@ func (m *DefaultLoginPolicy) Validate() error {
|
||||
}
|
||||
}
|
||||
|
||||
// no validation rules for ForceMfa
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -4569,6 +4571,8 @@ func (m *DefaultLoginPolicyRequest) Validate() error {
|
||||
|
||||
// no validation rules for AllowExternalIdp
|
||||
|
||||
// no validation rules for ForceMfa
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -4734,6 +4738,8 @@ func (m *DefaultLoginPolicyView) Validate() error {
|
||||
}
|
||||
}
|
||||
|
||||
// no validation rules for ForceMfa
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -5035,6 +5041,274 @@ var _ interface {
|
||||
ErrorName() string
|
||||
} = IdpProviderSearchRequestValidationError{}
|
||||
|
||||
// Validate checks the field values on SecondFactorsResult with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *SecondFactorsResult) Validate() error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SecondFactorsResultValidationError is the validation error returned by
|
||||
// SecondFactorsResult.Validate if the designated constraints aren't met.
|
||||
type SecondFactorsResultValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e SecondFactorsResultValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e SecondFactorsResultValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e SecondFactorsResultValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e SecondFactorsResultValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e SecondFactorsResultValidationError) ErrorName() string {
|
||||
return "SecondFactorsResultValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e SecondFactorsResultValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sSecondFactorsResult.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = SecondFactorsResultValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = SecondFactorsResultValidationError{}
|
||||
|
||||
// Validate checks the field values on SecondFactor with the rules defined in
|
||||
// the proto definition for this message. If any rules are violated, an error
|
||||
// is returned.
|
||||
func (m *SecondFactor) Validate() error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// no validation rules for SecondFactor
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SecondFactorValidationError is the validation error returned by
|
||||
// SecondFactor.Validate if the designated constraints aren't met.
|
||||
type SecondFactorValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e SecondFactorValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e SecondFactorValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e SecondFactorValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e SecondFactorValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e SecondFactorValidationError) ErrorName() string { return "SecondFactorValidationError" }
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e SecondFactorValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sSecondFactor.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = SecondFactorValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = SecondFactorValidationError{}
|
||||
|
||||
// Validate checks the field values on MultiFactorsResult with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *MultiFactorsResult) Validate() error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MultiFactorsResultValidationError is the validation error returned by
|
||||
// MultiFactorsResult.Validate if the designated constraints aren't met.
|
||||
type MultiFactorsResultValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e MultiFactorsResultValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e MultiFactorsResultValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e MultiFactorsResultValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e MultiFactorsResultValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e MultiFactorsResultValidationError) ErrorName() string {
|
||||
return "MultiFactorsResultValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e MultiFactorsResultValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sMultiFactorsResult.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = MultiFactorsResultValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = MultiFactorsResultValidationError{}
|
||||
|
||||
// Validate checks the field values on MultiFactor with the rules defined in
|
||||
// the proto definition for this message. If any rules are violated, an error
|
||||
// is returned.
|
||||
func (m *MultiFactor) Validate() error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// no validation rules for MultiFactor
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MultiFactorValidationError is the validation error returned by
|
||||
// MultiFactor.Validate if the designated constraints aren't met.
|
||||
type MultiFactorValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e MultiFactorValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e MultiFactorValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e MultiFactorValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e MultiFactorValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e MultiFactorValidationError) ErrorName() string { return "MultiFactorValidationError" }
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e MultiFactorValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sMultiFactor.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = MultiFactorValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = MultiFactorValidationError{}
|
||||
|
||||
// Validate checks the field values on DefaultPasswordComplexityPolicy with the
|
||||
// rules defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
|
||||
Reference in New Issue
Block a user