From e57574f10addf178dd7b189afbe6e14c512c42a8 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 19 Jul 2021 18:04:52 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=B7=BB=E5=8A=A0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E6=8E=A7=E5=88=B6luna=E6=B0=B4?= =?UTF-8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit perf: 添加配置文件样例 --- apps/jumpserver/conf.py | 1 + apps/jumpserver/settings/custom.py | 1 + apps/settings/api/common.py | 1 + config_example.yml | 21 +++++++++++++++++++++ 4 files changed, 24 insertions(+) diff --git a/apps/jumpserver/conf.py b/apps/jumpserver/conf.py index 449ae7974..8d25bc2dd 100644 --- a/apps/jumpserver/conf.py +++ b/apps/jumpserver/conf.py @@ -264,6 +264,7 @@ class Config(dict): 'SECURITY_INSECURE_COMMAND_LEVEL': 5, 'SECURITY_INSECURE_COMMAND_EMAIL_RECEIVER': '', 'SECURITY_LUNA_REMEMBER_AUTH': True, + 'SECURITY_WATERMARK_ENABLED': False, 'HTTP_BIND_HOST': '0.0.0.0', 'HTTP_LISTEN_PORT': 8080, diff --git a/apps/jumpserver/settings/custom.py b/apps/jumpserver/settings/custom.py index c60c53788..ae4e4fdad 100644 --- a/apps/jumpserver/settings/custom.py +++ b/apps/jumpserver/settings/custom.py @@ -128,3 +128,4 @@ HEALTH_CHECK_TOKEN = CONFIG.HEALTH_CHECK_TOKEN TERMINAL_RDP_ADDR = CONFIG.TERMINAL_RDP_ADDR SECURITY_LUNA_REMEMBER_AUTH = CONFIG.SECURITY_LUNA_REMEMBER_AUTH +SECURITY_WATERMARK_ENABLED = CONFIG.SECURITY_WATERMARK_ENABLED diff --git a/apps/settings/api/common.py b/apps/settings/api/common.py index 1cb39e62d..85e1c941f 100644 --- a/apps/settings/api/common.py +++ b/apps/settings/api/common.py @@ -129,6 +129,7 @@ class PublicSettingApi(generics.RetrieveAPIView): }, "AUTH_WECOM": settings.AUTH_WECOM, "AUTH_DINGTALK": settings.AUTH_DINGTALK, + 'SECURITY_WATERMARK_ENABLED': settings.SECURITY_WATERMARK_ENABLED } } return instance diff --git a/config_example.yml b/config_example.yml index 9fa4c1814..d2124df2e 100644 --- a/config_example.yml +++ b/config_example.yml @@ -129,3 +129,24 @@ REDIS_PORT: 6379 # # Windows 登录跳过手动输入密码 # WINDOWS_SKIP_ALL_MANUAL_PASSWORD: False + +# 是否开启 Luna 水印 +# SECURITY_WATERMARK_ENABLED: False + +# 健康检查的token,默认是空 +# HEALTH_CHECK_TOKEN: '' + +# 浏览器关闭页面后,会话过期 +# SESSION_EXPIRE_AT_BROWSER_CLOSE_FORCE: False + +# 每次api请求,session续期 +# SESSION_SAVE_EVERY_REQUEST: True + +# 硬盘检查 +# DISK_CHECK_ENABLED: True + +# 仅允许用户从来源处登录 +# ONLY_ALLOW_AUTH_FROM_SOURCE: False + +# 仅允许已存在的用户登录,不允许第三方认证后,自动创建用户 +# ONLY_ALLOW_EXIST_USER_AUTH: False