refactor(auth): replace dashboard sessions with stateless tokens and session control (#6329)
* refactor(auth): replace dashboard sessions with stateless tokens * feat(auth): harden session issuance and distributed enforcement * fix(proxy): preserve trusted proxy compatibility defaults * refactor: address dashboard auth review feedback * refactor: remove classic frontend and flatten web app
This commit is contained in:
+20
-1
@@ -64,14 +64,33 @@
|
||||
# TLS / HTTP 跳过验证设置
|
||||
# TLS_INSECURE_SKIP_VERIFY=false
|
||||
|
||||
# Gin 可信反向代理(逗号分隔的 IP/CIDR)
|
||||
# 未配置/留空:默认信任 127.0.0.0/8、::1、RFC1918 私网和 fc00::/7,并打印启动告警。
|
||||
# none:严格模式,不信任任何代理且必须单独使用;显式列表完全替代默认值,应填写代理自身地址。
|
||||
# TRUSTED_PROXIES=none
|
||||
# TRUSTED_PROXIES=127.0.0.1,172.20.0.0/16
|
||||
|
||||
# Gemini 识别图片 最大图片数量
|
||||
# GEMINI_VISION_MAX_IMAGE_NUM=16
|
||||
|
||||
# 会话密钥
|
||||
# SESSION_SECRET=random_string
|
||||
# 启用 Secure session cookie,必须同时配置可信 HTTPS 入口地址;多个地址用英文逗号分隔
|
||||
# false/未配置:本地 HTTP 模式,关闭 refresh/logout OriginGuard,且不得设置 TRUSTED_URL;兼容本地开发代理。
|
||||
# true:启用 Secure Refresh Cookie 和严格 OriginGuard,必须同时列出全部可信 HTTPS Origin。
|
||||
# SESSION_COOKIE_TRUSTED_URL 多项用英文逗号分隔;不支持通配符、路径或域名后缀匹配。
|
||||
# 这些设置不修改 relay CORS。
|
||||
# SESSION_COOKIE_SECURE=false
|
||||
# SESSION_COOKIE_TRUSTED_URL=https://example.com,https://admin.example.com
|
||||
# 每用户最多保留的活跃登录 Session
|
||||
# USER_SESSION_ACTIVE_LIMIT=50
|
||||
# 单用户在签发窗口内允许创建的 Session 总数(包含已撤销)
|
||||
# USER_SESSION_ISSUANCE_LIMIT=100
|
||||
# Session 签发计数窗口(秒);不得大于 revoked 保留期,超出时会自动钳制
|
||||
# USER_SESSION_ISSUANCE_WINDOW_SECONDS=86400
|
||||
# revoked Session 审计保留天数
|
||||
# USER_SESSION_REVOKED_RETENTION_DAYS=7
|
||||
# 最近一小时全局 Session 签发量超过此值时记录告警,不会拒绝登录
|
||||
# USER_SESSION_HOURLY_ALERT_THRESHOLD=5000
|
||||
|
||||
# 其他配置
|
||||
# 生成默认token
|
||||
|
||||
Reference in New Issue
Block a user