github.com/infraboard/keyauth@v0.8.1/apps/domain/pb/setting.proto (about) 1 syntax = "proto3"; 2 3 package infraboard.keyauth.domain; 4 option go_package = "github.com/infraboard/keyauth/apps/domain"; 5 6 // PasswordSecurity 密码安全设置 7 message PasswordSecurity { 8 // 密码长度 9 // @gotags: bson:"length" json:"length" validate:"required,min=8,max=64" 10 int32 length = 1; 11 // 包含数字 12 // @gotags: bson:"include_number" json:"include_number" 13 bool include_number = 2; 14 // 包含小写字母 15 // @gotags: bson:"include_lower_letter" json:"include_lower_letter" 16 bool include_lower_letter = 3; 17 // 包含大写字母 18 // @gotags: bson:"include_upper_letter" json:"include_upper_letter" 19 bool include_upper_letter = 4; 20 // 包含特殊字符 21 // @gotags: bson:"include_symbols" json:"include_symbols" 22 bool include_symbols = 5; 23 // 重复限制 24 // @gotags: bson:"repeate_limite" json:"repeate_limite" validate:"required,min=1,max=24" 25 uint32 repeate_limite = 6; 26 // 密码过期时间, 密码过期后要求用户重置密码 27 // @gotags: bson:"password_expired_days" json:"password_expired_days" validate:"required,min=0,max=365" 28 uint32 password_expired_days = 7; 29 // 密码过期前多少天开始提醒 30 // @gotags: bson:"before_expired_remind_days" json:"before_expired_remind_days" validate:"required,min=0,max=365" 31 uint32 before_expired_remind_days = 8; 32 } 33 34 // ExceptionLockConfig todo 35 message ExceptionLockConfig { 36 // 异地登录 37 // @gotags: bson:"other_place_login" json:"other_place_login" 38 bool other_place_login = 1; 39 // 未登录天数 40 // @gotags: bson:"not_login_days" json:"not_login_days" 41 uint32 not_login_days = 2; 42 } 43 44 // IPLimiteConfig todo 45 message IPLimiteConfig { 46 // 黑名单还是白名单 47 // @gotags: bson:"type" json:"type" 48 string type = 1; 49 // ip列表 50 // @gotags: bson:"ip" json:"ip" 51 repeated string ip = 2; 52 } 53 54 // RetryLockConfig 重试锁配置 55 message RetryLockConfig { 56 // 重试限制 57 // @gotags: bson:"retry_limite" json:"retry_limite" 58 uint32 retry_limite = 1; 59 // 锁定时长 60 // @gotags: bson:"locked_minite" json:"locked_minite" 61 uint32 locked_minite = 2; 62 } 63 64 // LoginSecurity 登录安全 65 message LoginSecurity { 66 // 异常登录锁 67 // @gotags: bson:"exception_lock" json:"exception_lock" 68 bool exception_lock = 1; 69 // 异常配置 70 // @gotags: bson:"exception_lock_config" json:"exception_lock_config" 71 ExceptionLockConfig exception_lock_config = 2; 72 // 重试锁 73 // @gotags: bson:"retry_lock" json:"retry_lock" 74 bool retry_lock = 3; 75 // 重试锁配置 76 // @gotags: bson:"retry_lock_config" json:"retry_lock_config" 77 RetryLockConfig retry_lock_config = 4; 78 // IP限制 79 // @gotags: bson:"ip_limite" json:"ip_limite" 80 bool ip_limite = 5; 81 // IP限制配置 82 // @gotags: bson:"ip_limite_config" json:"ip_limite_config" 83 IPLimiteConfig ip_limite_config = 6; 84 }