Higress Console 用于管理 Higress 的配置规则及其他开箱即用的能力集成,首个可用版本考虑基于 kubernetes 部署环境,预期包含服务管理、路由管理、域名管理等基础能力。 后续规划逐步迭代可观测能力、插件能力、登录管理能力,感兴趣的小伙伴一起 Hi~ gress~
The console limits failed password authentication for both the form login endpoint and HTTP Basic authentication. The
defaults are 5 failures within 10 minutes for each budget, followed by a 15-minute lock. When a budget is exhausted the
API returns HTTP 429 with a Retry-After header, and the login page shows the remaining lock time.
| Environment variable | Spring property | Default | Description |
|---|---|---|---|
HIGRESS_CONSOLE_LOGIN_FAILURE_LIMIT |
higress-console.login.failure-limit |
5 |
Failures allowed within the window before the budget is locked. |
HIGRESS_CONSOLE_LOGIN_FAILURE_WINDOW_SECONDS |
higress-console.login.failure-window-seconds |
600 |
Length of the failure accounting window in seconds. |
HIGRESS_CONSOLE_LOGIN_LOCK_SECONDS |
higress-console.login.lock-seconds |
900 |
Lock duration in seconds after the failure limit is reached. |
All three values must be at least 1. 0 (and negative values) is invalid and is treated as 1.
Budgets are keyed by authentication source, account and client address, so the form login and Basic authentication
budgets are independent (form:<username>:<ip> and basic:<username>:<ip>). A script retrying old credentials over
Basic authentication cannot lock out a human using the form login for the same account and address, and vice versa. A
successful authentication resets only the budget of the source that authenticated. The lock check happens before
password verification, and only verified failures increment the failure count; correct credentials never consume the
budget. Writes prune expired states first. If the shared store is full, a new key evicts the oldest state without an
active lock; active locks are never evicted. If every entry is actively locked, the new key is not tracked and fails
open until capacity is available, while all existing locks remain enforced. This saturation behavior does not return
HTTP 503.
The client address is taken from the direct peer (HttpServletRequest.getRemoteAddr()). The console ships with
server.forward-headers-strategy=none, so forwarding headers do not create separate budgets. Behind a reverse proxy,
all requests can therefore appear to come from the proxy address and share one budget per account and source. If the
proxy is trusted, configure server.forward-headers-strategy (for example, via the SERVER_FORWARD_HEADERS_STRATEGY
environment variable) so that the real client address is used. Enable forwarded-header handling only when untrusted
clients cannot reach the console directly, because clients can otherwise spoof these headers.
If the client address is missing or blank, the console uses unknown, so those requests remain subject to a shared
budget per account and source.
此项目包含前端(NodeJS)、后端(Java)两个部分,前端(frontend)部分在构建完成后会随着后端代码(SpringBoot)一起部署。
注:建议 Node 版本选择长期稳定支持版本 16.18.1 及以上
cd frontend && npm installnpm startnpm run build
#打包生成文件 frontend/build注:建议 JDK 版本选择 17 及以上,Maven 版本选择 3.8.6 及以上(可直接使用项目内自带的 Maven Wrapper,即 mvnw)。
cd backend && sh build.sh
# 脚本中涉及docker命令,本地调试可注释sh start.sh --local主页,默认 8080 端口
http://localhost:8080可以通过以下方法开启 Swagger UI,并通过访问 Swagger 页面了解 API 情况。
方法 1:
方法 2:
Swagger UI URL:
http://localhost:8080/swagger-ui/index.html自该版本起,控制台对 LLM Provider 与 Consumer 的凭证采用只写(write-only)语义:
GET /v1/ai/providers、GET /v1/ai/providers/{name}、PUT /v1/ai/providers/{name}不再返回tokens,rawConfigs中的apiTokens、awsAccessKey、awsSecretKey、vertexAuthKey等凭证字段也会被移除;仅返回tokenCount、awsAccessKeyConfigured等脱敏元数据。GET /v1/consumers、GET /v1/consumers/{name}、PUT /v1/consumers/{name}不再返回 key-auth 凭证的values,仅返回credentialCount等元数据。POST /v1/ai/providers与POST /v1/consumers仅用于创建新资源,不再隐式更新同名资源。名称已存在时返回409 Conflict,且不会返回任何已存储的凭证。创建成功时会在响应中一次性返回本次提交的凭证(provider 的tokens以及rawConfigs中的凭证字段,consumer 的values)。之后无法通过 API 再次读取。- 继续使用
POST做“存在则更新”的外部脚本必须改为:创建使用POST,更新使用PUT /v1/ai/providers/{name}或PUT /v1/consumers/{name}。 - 如果外部脚本依赖读取后再写回(read-modify-write)凭证字段,需要改为在更新时省略凭证字段以保留原值、提交新值以替换、显式提交空值以清除,或直接保存创建响应中的凭证。
- 建议使用 IntelliJ IDEA 做为开发环境
- 请安装 Adapter for Eclipse Code Formatter,并s使用
backend/style/higress_formatter.xml做为项目的代码格式化模板
