MSP-2243 update remote config
This commit is contained in:
1 parent
d208ad633e
commit
5cff5df97b
2 files changed
+48
-3
No files matched your search
@@ -1,4 +1,32 @@
|
||||
{
|
||||
"audit": {
|
||||
"eventSettings": [
|
||||
{
|
||||
"event": "success_login",
|
||||
"name": "Успешный вход"
|
||||
},
|
||||
{
|
||||
"event": "error_login",
|
||||
"name": "Неуспешный вход"
|
||||
},
|
||||
{
|
||||
"event": "success_logout",
|
||||
"name": "Успешный выход"
|
||||
},
|
||||
{
|
||||
"event": "role_changed",
|
||||
"name": "Изменение роли"
|
||||
},
|
||||
{
|
||||
"event": "user_changed",
|
||||
"name": "Изменение пользователя"
|
||||
}
|
||||
],
|
||||
"auditTTl": {
|
||||
"timeToLiveInMin": 525600,
|
||||
"expireSyncPeriodInMin": 1440
|
||||
}
|
||||
},
|
||||
"database": {
|
||||
"host": "{{ msp_pgsql_address }}",
|
||||
"port": 5432,
|
||||
@@ -9,11 +37,11 @@
|
||||
},
|
||||
"logLevel": "debug",
|
||||
"antiBruteforce": {
|
||||
"maxInFlightLoginRequests" : 3,
|
||||
"maxInFlightLoginRequests": 3,
|
||||
"delayLoginRequestInSec": 3
|
||||
},
|
||||
"expireSec": 3600,
|
||||
"blockInactiveWorker" : {
|
||||
"blockInactiveWorker": {
|
||||
"daysThreshold": 90,
|
||||
"runIntervalInMinutes": 60
|
||||
}
|
||||
|
||||
+18
-1
@@ -9,7 +9,8 @@ import (
|
||||
"github.com/integration-system/jsonschema"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// nolint: gochecknoinits
|
||||
func init() { //
|
||||
schema.CustomGenerators.Register("logLevel", func(field reflect.StructField, t *jsonschema.Type) {
|
||||
t.Type = "string"
|
||||
t.Enum = []interface{}{"debug", "info", "error", "fatal"}
|
||||
@@ -17,6 +18,7 @@ func init() {
|
||||
}
|
||||
|
||||
type Remote struct {
|
||||
Audit Audit
|
||||
Database dbx.Config
|
||||
ExpireSec int `valid:"required" schema:"Время жизни токена в секундах,in seconds"`
|
||||
UiDesign UIDesign `schema:"Кастомизация интерфейса"`
|
||||
@@ -27,6 +29,21 @@ type Remote struct {
|
||||
Permissions []Permission
|
||||
}
|
||||
|
||||
type Audit struct {
|
||||
EventSettings []AuditEventSetting
|
||||
AuditTTl AuditTTlSetting
|
||||
}
|
||||
|
||||
type AuditTTlSetting struct {
|
||||
TimeToLiveInMin int `valid:"required"`
|
||||
ExpireSyncPeriodInMin int `valid:"required"`
|
||||
}
|
||||
|
||||
type AuditEventSetting struct {
|
||||
Event string
|
||||
Name string
|
||||
}
|
||||
|
||||
type UIDesign struct {
|
||||
Name string `schema:"Название стенда"`
|
||||
PrimaryColor string `schema:"Цвет в HEX, примеры: #ff4d4f #fa8c16 #a0d911 #1890ff #722ed1 #d4b106 #e91e63 #ff5722 #795548 #abb8c3 #525252 #689f38"`
|
||||
|
||||
Reference in new issue
Block a user