v0.34.10
This commit is contained in:
1 parent
66ff9dfaa2
commit
ee54aa6875
30 files changed
+939
-68
No files matched your search
+176
-1
@@ -2,7 +2,7 @@
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "RustProxy Administration API",
|
||||
"version": "0.34.9",
|
||||
"version": "0.34.10",
|
||||
"description": "Administration API for the active panel origin. Sign in through the panel; the same-origin HttpOnly cookie authenticates all private operations. Mutations also require the exact Origin, X-RustProxy-Request: 1 and a session-bound X-CSRF-Token. Loopback HTTP is the default; Settings can enable HTTPS before using a non-loopback administration bind. This document contains no live configuration or credentials. Object schemas marked extensible are summaries: full configuration validation is authoritative in Rust. The API also permits explicitly scoped GeneralApiBearer tokens on a narrow route allowlist, with RO/RW and source CIDR checks; API-token management and Prometheus-token management are browser-session-only."
|
||||
},
|
||||
"servers": [
|
||||
@@ -2405,6 +2405,41 @@
|
||||
"key_file"
|
||||
]
|
||||
},
|
||||
"CertificateInspection": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"cert_file"
|
||||
],
|
||||
"properties": {
|
||||
"cert_file": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 4096,
|
||||
"description": "Simple managed filename (up to 96 ASCII bytes) or absolute external certificate path (up to 4096 bytes). Reads only the public certificate; external paths retain root/service ownership, parent trust and file permission checks."
|
||||
}
|
||||
}
|
||||
},
|
||||
"CertificateInspectionResult": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"cert_file",
|
||||
"covered_hosts"
|
||||
],
|
||||
"properties": {
|
||||
"cert_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"covered_hosts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Normalized, sorted, unique DNS SubjectAltName values from the leaf certificate. No Common Name fallback. Empty when the leaf has no DNS SAN names."
|
||||
}
|
||||
}
|
||||
},
|
||||
"CertificateUploadResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -8834,6 +8869,146 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/certificates/inspect": {
|
||||
"post": {
|
||||
"summary": "Read DNS names from a certificate file",
|
||||
"tags": [
|
||||
"Certificates"
|
||||
],
|
||||
"operationId": "post_api_certificates_inspect",
|
||||
"description": "Browser-session-only read-only inspection for the manual certificate editor. Maximum request body 32 KiB; public PEM reads are limited to 128 KiB on a bounded blocking worker. Existing managed filenames or absolute external certificate paths are accepted with the same trust, owner, symlink and permissions checks as certificate inventory. Returns DNS SAN coverage without reading a private key, staging files, changing permissions or updating configuration. General API and certificate-scoped tokens cannot use this endpoint.",
|
||||
"security": [
|
||||
{
|
||||
"AdminSession": [],
|
||||
"CsrfToken": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Origin",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Exact browser origin accepted by the panel origin policy."
|
||||
},
|
||||
{
|
||||
"name": "X-RustProxy-Request",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"1"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CertificateInspection"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Public leaf certificate DNS names",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CertificateInspectionResult"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request JSON",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Administrator session required or revoked",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Host, origin or CSRF rejected; API token scope is not supported",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "Certificate storage is not configured",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"413": {
|
||||
"description": "Request exceeds the 32 KiB body limit",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Invalid certificate path, PEM, file size, trust/permission policy or request fields",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"429": {
|
||||
"description": "Bounded certificate worker capacity exhausted",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Certificate inspection worker failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/certificates/upload": {
|
||||
"post": {
|
||||
"summary": "Validate and stage a PEM pair",
|
||||
|
||||
Reference in new issue
Block a user