v0.37.1
This commit is contained in:
1 parent
78dbb31487
commit
f48843e934
83 files changed
+7304
-1203
No files matched your search
+9
-2
@@ -21,6 +21,7 @@ The current bundled `src/admin/openapi.json` declares these operations (among ot
|
||||
| `GET /api/config/history` · `POST /api/config/history/restore` | Review/restore retained configuration snapshots. |
|
||||
| `GET /api/status` · `GET /api/backends` | Operational status and backend observations. |
|
||||
| `GET /api/cache` · `POST /api/cache/purge` · `POST /api/cache/invalidate` | Cache observations and authenticated invalidation. `GET` supports the lightweight `view=live` polling view. |
|
||||
| `GET /api/cache/rules/stats` · `POST /api/cache/rules/test` · `POST /api/cache/rules/import-vcl` | Cache rule match counters, simulation of saved or draft rules for a test request/response, and conversion of a VCL subset into rules (nothing is saved). See [Cache rules](CACHE.md#cache-rules-vcl-style). |
|
||||
| `GET /api/transform` | Transform observations and resource usage. Supports the lightweight `view=live` polling view. |
|
||||
| `GET /api/logs` · `GET /api/live-logs` | Recent and streaming request logs. |
|
||||
| `GET /api/file-logs` · `GET /api/file-logs/query` | Stored-log exploration. |
|
||||
@@ -47,12 +48,16 @@ The administration listener is HTTP on loopback (`127.0.0.1:9090`) by default an
|
||||
| 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**. 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. |
|
||||
| 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). |
|
||||
| Prometheus token | Scrape-only credential for the separate exporter; see [Monitoring](MONITORING.md). |
|
||||
|
||||
IP checks use the transport peer, never forwarded headers. Outside loopback, Bearer credentials require administration HTTPS.
|
||||
|
||||
### API tokens in the panel
|
||||
|
||||
**Settings → Security → API tokens** lists the tokens first (ID, RO/RW badge, description, allowed addresses, created / last used, **Revoke token**). **New token** opens an editor with a description, the permission as two choices (*Read only* / *Read and write*) and **Allowed source addresses** entered as chips: type an IP or CIDR and press Enter; a single address becomes `/32` or `/128`, invalid entries are rejected before saving (at most 32). The token is shown once in a highlighted box with **Copy**; RustProxy stores only its hash. Tokens cannot be edited — revoke and create a new one to change the permission or addresses.
|
||||
|
||||
### `/docs` Reader and Swagger
|
||||
|
||||
The authenticated `/docs` page has two tabs: **Reader** with the guides embedded at build time, and **API** with the bundled OpenAPI schema rendered by Swagger UI. All assets are served locally; no CDN is used. Swagger uses the current session, executes read calls directly and asks for confirmation before any write.
|
||||
@@ -145,7 +150,9 @@ Run CLI commands as an authorized local operator with the correct private data d
|
||||
|
||||
## Restricted Certificate API credentials
|
||||
|
||||
**Settings → Certificate API** can create credentials containing a **Key ID + Bearer token** with explicit certificate-ID grants. New keys default to reload-only; deploy permission is separate. The clear token is displayed at creation/rotation and is not a general admin API token.
|
||||
For the panel workflow (permissions, certificate picker, legacy `*` keys) see [Certificates → Restricted certificate API](CERTIFICATES.md#restricted-certificate-api); for an OPNsense example see the [OPNsense ACME client integration](../integrations/opnsense-acme/README.md).
|
||||
|
||||
**Settings → Certificate API** can create credentials containing a **Key ID + Bearer token** with explicit certificate-ID grants. New keys default to reload-only; deploy permission is separate. The clear token is displayed at creation/rotation and is not a general admin API token. In the panel, **New key** opens an editor with *Reload only* or *Deploy and reload* and a searchable certificate picker; for deploy keys a not yet stored certificate ID can be typed in, and the first deploy creates it. `*` (all certificates) cannot be saved; keys migrated with `*` keep working until edited, and the editor then asks for explicit certificates.
|
||||
|
||||
An authorized client sends:
|
||||
|
||||
|
||||
Reference in new issue
Block a user