v0.41.3_hotfix1
This commit is contained in:
1 parent
dd9ecc48f1
commit
0d0100acbc
35 files changed
+1007
-417
No files matched your search
+5
-3
@@ -7,7 +7,7 @@ RustProxy exposes an authenticated administration API on the **separate administ
|
||||
The current bundled `src/admin/openapi.json` declares these operations (among others):
|
||||
|
||||
| Method and path | Purpose |
|
||||
|---|---|
|
||||
| --- | --- |
|
||||
| `GET /healthz` | Minimal health response, without privileged state. |
|
||||
| `GET /api/auth/status` | Whether first-time administrator setup is required. |
|
||||
| `POST /api/auth/login` · `POST /api/auth/logout` | Start/end a browser admin session. |
|
||||
@@ -37,6 +37,8 @@ The current bundled `src/admin/openapi.json` declares these operations (among ot
|
||||
|
||||
Some paths have additional DELETE/PATCH operations, job-status resources, query parameters or restricted actions. Use OpenAPI for the **actual fields/methods**, not guesses based on a table. `GET /metrics` here is not a replacement for the separate Prometheus exporter.
|
||||
|
||||
The full and live status responses include `metrics.cache_request_outcomes` (`hits`, `misses`, `bypasses`, `other`) and `metrics.completed_success`. Full and live `GET /api/cache` include `request_outcomes`, using the same process counters. These are final client-request classifications; existing `cache` / Cache `metrics` fields remain technical operation counters. Domain outcomes count final requests, while diagnostic reasons can include separate refresh and collapse events.
|
||||
|
||||
For browser polling, `GET /api/cache?view=live`, `GET /api/transform?view=live` and `GET /api/traffic?view=live` omit static response members that do not need to be retransmitted on every interval. Their `revision` identifies the active configuration; Cache and Traffic additionally return `catalog_version` (a fingerprint of the effective Vhost list, including Docker publications). If either revision or this fingerprint changes, clients should fetch the corresponding endpoint without `view=live` and refresh their cached static fields. Requests without `view=live` remain the complete compatibility form. Cache live responses contain metrics/dashboard/bans, Transform live responses contain resources/metrics, and Traffic live responses retain current settings/GeoIP/analytics while omitting the static Vhost list. Full Cache and Traffic responses provide readable `vhosts[].label` and `vhosts[].docker` together with the stable `id`; Docker-generated IDs are valid cache purge/invalidation and analytics scopes. Unknown `view` values are rejected.
|
||||
|
||||
Certificate inspection accepts `{ "cert_file": "filename.pem" }` for a managed file or an absolute external path and returns `{ "cert_file": "...", "covered_hosts": ["example.com"] }`. It applies the existing certificate-file trust and size checks and reads no private key. It makes no configuration or permission changes. This POST requires the signed-in administrator's normal Origin, request-marker and CSRF checks; general RO/RW API tokens and certificate-only credentials cannot call it.
|
||||
@@ -46,7 +48,7 @@ Certificate inspection accepts `{ "cert_file": "filename.pem" }` for a managed f
|
||||
The administration listener is HTTP on loopback (`127.0.0.1:9090`) by default and is separate from the public Vhost listeners. No administrator password is bundled: complete first-time setup with the local CLI (`admin setup-token` or `admin init`). For remote access prefer an SSH tunnel; for direct access enable administration HTTPS with a trusted certificate and restrict the network before binding outside loopback.
|
||||
|
||||
| Credential | Scope |
|
||||
|---|---|
|
||||
| --- | --- |
|
||||
| Browser session | Full administration. HttpOnly, SameSite=Strict cookie (Secure on HTTPS), absolute lifetime 7–30 days. Writes require matching Origin, `X-CSRF-Token` and `X-RustProxy-Request: 1`. |
|
||||
| General API token (`ro` / `rw`) | Created in **Settings → Security → API tokens** (see [API tokens in the panel](#api-tokens-in-the-panel)). Displayed once, stored as a hash, bound to a mandatory IP/CIDR allowlist. Sent as `Authorization: Bearer <token>`. `ro` reads resources and sections; `rw` also writes configuration sections and selected operations. Cannot manage authentication, backups, tokens or certificate credentials. |
|
||||
| Certificate API key | Key ID + Bearer token limited to specific certificate IDs and actions (reload by default, deploy opt-in). |
|
||||
@@ -83,7 +85,7 @@ This is a special-risk topology. Configure a fixed HTTPS public origin, an allow
|
||||
The section name in the URL and its corresponding JSON member in a full configuration are:
|
||||
|
||||
| Section path (`/api/config/…`) | JSON member(s) in `config` |
|
||||
|---|---|
|
||||
| --- | --- |
|
||||
| `listeners` | `listeners` |
|
||||
| `docker-agents` | `docker_agents` |
|
||||
| `http2` | `http2` |
|
||||
|
||||
Reference in new issue
Block a user