Compare commits

..

No commits in common. "5961810a43a44589c18bc80795e1c23081e537f6" and "9986d99ab3e7a5502b14769bb5490a53db97a2d4" have entirely different histories.

3 changed files with 13 additions and 31 deletions

View File

@ -1,8 +1,7 @@
# assets-ai 环境变量(本地开发)
DATABASE_PATH=./data/assets.db DATABASE_PATH=./data/assets.db
JWT_SECRET=dev-jwt-secret-local JWT_SECRET=your-secret-key-change-in-production
COOKIE_DOMAIN=
NODE_ENV=development NODE_ENV=development
# ⚠️ 仅限本地开发环境(自签名证书),生产环境禁止设置此变量
NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_TLS_REJECT_UNAUTHORIZED=0
# LDAP 配置 # LDAP 配置
@ -10,12 +9,15 @@ LDAP_URL=ldap://localhost:3890
LDAP_BASE_DN=dc=tlyq,dc=ai LDAP_BASE_DN=dc=tlyq,dc=ai
LDAP_ADMIN_DN=uid=admin,ou=people,dc=tlyq,dc=ai LDAP_ADMIN_DN=uid=admin,ou=people,dc=tlyq,dc=ai
# OIDC 配置 # issue-ai API 配置(用于故障历史功能)
AUTHELIA_URL=http://127.0.0.1:6180 # NEXT_PUBLIC_ 前缀:构建时内嵌到客户端 JS云上必须通过 deploy-ai.sh 设置
OIDC_CLIENT_ID=assets-oidc # 本地开发http://localhost:6176/tickets
OIDC_CLIENT_SECRET=<见 Authelia 配置> # 云上生产https://issue.tlyq.ai/tickets
OIDC_REDIRECT_URI=http://127.0.0.1:6177/api/auth/callback
# 跨服务调用
ISSUE_API_URL=http://localhost:6176/api
NEXT_PUBLIC_ISSUE_URL=http://localhost:6176/tickets NEXT_PUBLIC_ISSUE_URL=http://localhost:6176/tickets
ISSUE_API_URL=http://localhost:6176/api
# OIDC 配置SSO 统一认证)
AUTHELIA_URL=https://sso.tlyq.ai
OIDC_CLIENT_ID=assets-oidc
OIDC_CLIENT_SECRET=change-me-to-hashed-secret
OIDC_REDIRECT_URI=http://localhost:6177/api/auth/callback

View File

@ -1,15 +0,0 @@
# assets-ai 生产环境配置(模板)
DATABASE_PATH=/app/data/assets.db
JWT_SECRET=__JWT_SECRET__
COOKIE_DOMAIN=.tlyq.ai
NODE_ENV=production
NODE_TLS_REJECT_UNAUTHORIZED=0
LDAP_URL=ldap://lldap:3890
LDAP_BASE_DN=dc=tlyq,dc=ai
LDAP_ADMIN_DN=uid=admin,ou=people,dc=tlyq,dc=ai
AUTHELIA_URL=https://sso.tlyq.ai
OIDC_CLIENT_ID=assets-oidc
OIDC_CLIENT_SECRET=__OIDC_CLIENT_SECRET__
OIDC_REDIRECT_URI=https://assets.tlyq.ai/api/auth/callback
ISSUE_API_URL=http://issue-ai:3000/api
NEXT_PUBLIC_ISSUE_URL=https://issue.tlyq.ai/tickets

View File

@ -38,11 +38,6 @@ export function LoginForm() {
</button> </button>
<p className="text-center text-xs text-slate-400 mb-3"> SSO </p> <p className="text-center text-xs text-slate-400 mb-3"> SSO </p>
<p className="text-center mb-2">
<button onClick={() => { window.location.href = '/api/auth/login/oidc?switch=1' }} className="text-xs text-slate-400 hover:text-slate-600 underline">
使
</button>
</p>
<p className="text-center"> <p className="text-center">
<button onClick={() => setShowLdapForm(true)} className="text-xs text-slate-400 hover:text-slate-600 underline"> <button onClick={() => setShowLdapForm(true)} className="text-xs text-slate-400 hover:text-slate-600 underline">
使 LDAP 使 LDAP