v0.36.13
This commit is contained in:
1 parent
f8fc228af1
commit
ad0ff60632
13 files changed
+112
-27
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
# RustProxy source and documentation maintenance
|
# RustProxy source and documentation maintenance
|
||||||
|
|
||||||
Current source version: **0.36.12**. The Cargo package and binary are named `rust-proxy`.
|
Current source version: **0.36.13**. The Cargo package and binary are named `rust-proxy`.
|
||||||
|
|
||||||
Before editing, read [README.md](README.md), the relevant [documentation guide](docs/README.md) and the actual code and tests. Historical release experiments are not current specifications. Use the bundled `src/admin/openapi.json` for API routes and payloads; the source implementation is authoritative for runtime behavior.
|
Before editing, read [README.md](README.md), the relevant [documentation guide](docs/README.md) and the actual code and tests. Historical release experiments are not current specifications. Use the bundled `src/admin/openapi.json` for API routes and payloads; the source implementation is authoritative for runtime behavior.
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,12 @@ Release history focused on **features, settings, default behavior, compatibility
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## 0.36.13 — panel-style origin rejection page
|
||||||
|
|
||||||
|
- **Administration access error:** the generic inline "Could not open the panel" response is now a dedicated HTML template that uses the same RustProxy brand, login-card layout, typography, buttons and status styling as the administration panel.
|
||||||
|
- **Rejected-origin assets:** the shared panel stylesheet and favicon remain available for this static forbidden page even when the request origin itself is rejected, so proxy/public-URL mistakes still render a complete branded error screen without weakening access to panel data or scripts.
|
||||||
|
- **Upgrade notes:** interface-only release; no configuration or database migration is required.
|
||||||
|
|
||||||
## 0.36.12 — stable dialogs and consistent tab navigation
|
## 0.36.12 — stable dialogs and consistent tab navigation
|
||||||
|
|
||||||
- **Stable dialog position:** new **Settings → Appearance → Interface → Keep dialogs at a stable top position** preference keeps primary panel dialogs anchored near the top of the viewport, so switching between tabs with different content heights no longer makes the modal jump vertically. The account-scoped `stable_dialog_position` preference is **on by default**, including for existing preference documents that omit the field; disabling it restores the previous vertically centered behavior.
|
- **Stable dialog position:** new **Settings → Appearance → Interface → Keep dialogs at a stable top position** preference keeps primary panel dialogs anchored near the top of the viewport, so switching between tabs with different content heights no longer makes the modal jump vertically. The account-scoped `stable_dialog_position` preference is **on by default**, including for existing preference documents that omit the field; disabling it restores the previous vertically centered behavior.
|
||||||
|
|||||||
Generated
+1
-1
@@ -1943,7 +1943,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rust-proxy"
|
name = "rust-proxy"
|
||||||
version = "0.36.12"
|
version = "0.36.13"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rust-proxy"
|
name = "rust-proxy"
|
||||||
version = "0.36.12"
|
version = "0.36.13"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.99.1"
|
rust-version = "1.99.1"
|
||||||
description = "RustProxy - independent reverse proxy with local administration"
|
description = "RustProxy - independent reverse proxy with local administration"
|
||||||
|
|||||||
+15
-13
@@ -1,11 +1,11 @@
|
|||||||
61bf40a0572889dc8b0dda9eae4e93e44b0de9364b3c798106c85700ffb37c23 .dockerignore
|
61bf40a0572889dc8b0dda9eae4e93e44b0de9364b3c798106c85700ffb37c23 .dockerignore
|
||||||
4140a2956264b44f259e6a37fc00ba02097bbe68b09296e04d3d243c1287129b .env.example
|
4140a2956264b44f259e6a37fc00ba02097bbe68b09296e04d3d243c1287129b .env.example
|
||||||
e76e688874828e3743d03693b1d2872b9633b4db09909673786caf30f7cfe489 .gitignore
|
e76e688874828e3743d03693b1d2872b9633b4db09909673786caf30f7cfe489 .gitignore
|
||||||
de5b1152f03d4088c388708aae9915b7834fa566f8b400f04d1e1e74e3a8357e AGENTS.md
|
4429f22007079fd0e7281f2e9597c08c96ede00c1d64a398f733db111c26e175 AGENTS.md
|
||||||
98d4e7b587f97f74ad06bfe858f4c80c84c4ba570fcf4510e9406aa7e81400c8 CHANGELOG.md
|
4459e87c6776ea711c774338d3b44fdc4642a969ffc517b60366bbafdcaea546 CHANGELOG.md
|
||||||
617cf48a90bee48d92aab090a1be07780b1af5ba2ef7dcb13008b078e6e91259 Cargo.lock
|
c9be49deaf4a2e7b1408375b44dcd4058dfc221d08233e38104cddc0e788eadd Cargo.lock
|
||||||
4f8f91c8c1c6f79ad966041b031adc64ac626235fc861a7b595faf459815ddc7 Cargo.toml
|
f06306e77e64a757a318f2dae8627bbdec7eeb833fec8f219780b980d32cf7e4 Cargo.toml
|
||||||
25c7f3c8162cbf5cc156439774118a81dae9fdc52b611ec7e40c230fc99a772c Dockerfile
|
788745d4f70a0382c6280020afbd48844bb2af65e835a826852143f8132cdeca Dockerfile
|
||||||
0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0 LICENSE
|
0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0 LICENSE
|
||||||
82d1dee2fc68158f0ea73259151461e64c8b18d807cd1fecfb1ed99dc30cf5f4 README.md
|
82d1dee2fc68158f0ea73259151461e64c8b18d807cd1fecfb1ed99dc30cf5f4 README.md
|
||||||
da8311e3db945290666324a2f24bf4521b365272d7ac3f862ded1be993eea646 UPDATE_CHECK.toml
|
da8311e3db945290666324a2f24bf4521b365272d7ac3f862ded1be993eea646 UPDATE_CHECK.toml
|
||||||
@@ -28,7 +28,7 @@ e52b31d0abf65ae3034f6cb367cca113633014ce8d1d799ad4dd5624d2c7b8bb docker-agent/n
|
|||||||
634790f35ff4627df2a78cec2ed371f6e9ec9df00afb386075595fc7f3ed72eb docker-agent/rustproxy-docker-agent.service
|
634790f35ff4627df2a78cec2ed371f6e9ec9df00afb386075595fc7f3ed72eb docker-agent/rustproxy-docker-agent.service
|
||||||
5220d669171ec3ad65f50e0bc8de5178dadaa4904def8e1a4f61002aa9e9a55b docker-agent/server.go
|
5220d669171ec3ad65f50e0bc8de5178dadaa4904def8e1a4f61002aa9e9a55b docker-agent/server.go
|
||||||
60d108fd168064e4d6980ed7499f3219017f9878c743697e77f2efc592e4d629 docs/ACCESS.md
|
60d108fd168064e4d6980ed7499f3219017f9878c743697e77f2efc592e4d629 docs/ACCESS.md
|
||||||
667b0669513b01dd50f4e2e8c65edbcf7caa0c3d97a17092e60a6b1ed45bf2ff docs/API.md
|
e708fc937dba80ac311fb19e785deae4eed586923180bc2a6b1c1a21922b5c2f docs/API.md
|
||||||
728b15b9825f547f34c4121219784798dd046fbbdd72ece8906d0cd77e8efc64 docs/BACKUP.md
|
728b15b9825f547f34c4121219784798dd046fbbdd72ece8906d0cd77e8efc64 docs/BACKUP.md
|
||||||
4fb55a549535f37467f14536cbf0db7be027ca8a019c2919a384af4f23655300 docs/CACHE.md
|
4fb55a549535f37467f14536cbf0db7be027ca8a019c2919a384af4f23655300 docs/CACHE.md
|
||||||
5e7b6668be6bfec77755ae45b9d369aa14135fce7632de392c6b29a7b584245a docs/CERTIFICATES.md
|
5e7b6668be6bfec77755ae45b9d369aa14135fce7632de392c6b29a7b584245a docs/CERTIFICATES.md
|
||||||
@@ -86,10 +86,11 @@ ba753f69557bd9fa990e56beabebccf39f93b5f6fb7e66a2e241c8c461dfd763 integrations/o
|
|||||||
3a1f8c326618a4613bb35f9e83428f6d1cf668b9e37b4731e5d38c3081fc94d8 integrations/opnsense-acme/actions_rustproxy_cert.conf
|
3a1f8c326618a4613bb35f9e83428f6d1cf668b9e37b4731e5d38c3081fc94d8 integrations/opnsense-acme/actions_rustproxy_cert.conf
|
||||||
de6550ab8f48d556d752c252212c38ba65491fd224f972c10fbe552f91ed7520 integrations/opnsense-acme/opnsense-rustproxy-cert-deploy.sh
|
de6550ab8f48d556d752c252212c38ba65491fd224f972c10fbe552f91ed7520 integrations/opnsense-acme/opnsense-rustproxy-cert-deploy.sh
|
||||||
73784ac652708b04ca6c91aeed4524f51f50d63715bbeefe7f5590b353e78943 integrations/opnsense-acme/rustproxy-acme.conf.example
|
73784ac652708b04ca6c91aeed4524f51f50d63715bbeefe7f5590b353e78943 integrations/opnsense-acme/rustproxy-acme.conf.example
|
||||||
45be151cd85fc2ef2f1fdc3003ace63381af262e73af8a685ab48cb697cc0de1 integrations/routeros-oci-build/.env.routeros.example
|
0a86cb2a4ed689a5fa70534cac3402ca8bd3bb87c37e8ce2f3774bc2f48ab6c4 integrations/routeros-oci-build/.env.routeros.example
|
||||||
11aa102de1089ecc375f20c4bd5420fcfd3b2ef23fe0c8bdf04953fcfaf40ef0 integrations/routeros-oci-build/Dockerfile.routeros
|
e9cbb0224c4a3d23a6019ba557e0cd568c1ad5e1582ff1e335fb7d99b7a1055d integrations/routeros-oci-build/.gitignore
|
||||||
|
14025f0cad10e1b89f366977123e4cebb68ae59df892d4eed29b6171e63ae908 integrations/routeros-oci-build/Dockerfile.routeros
|
||||||
7c7a3e51f43b43e1c962a4b0bb591f99c1f06977bf77f23719f7f867dfe7eb8e integrations/routeros-oci-build/Dockerfile.routeros.dockerignore
|
7c7a3e51f43b43e1c962a4b0bb591f99c1f06977bf77f23719f7f867dfe7eb8e integrations/routeros-oci-build/Dockerfile.routeros.dockerignore
|
||||||
495e1e2a3a2e9e252f8a5b245bedb048eb55b848fc9ab04b8b9d5d49970391b8 integrations/routeros-oci-build/README.md
|
1f92e9cb9c8a5ff7eee33ea5b61755de19b0ec10a80e9ae47721293528a97f95 integrations/routeros-oci-build/README.md
|
||||||
3f092a9ab80221eddd67be4d1a776acbc6e04c1eb6011b588280c28e83b2582f integrations/routeros-oci-build/build-routeros-oci.sh
|
3f092a9ab80221eddd67be4d1a776acbc6e04c1eb6011b588280c28e83b2582f integrations/routeros-oci-build/build-routeros-oci.sh
|
||||||
3f267cafa16006e5456ade78ee2d5fae02cc7ce747839523068ffd8d7c98798a integrations/routeros-oci-build/docker-entrypoint.sh
|
3f267cafa16006e5456ade78ee2d5fae02cc7ce747839523068ffd8d7c98798a integrations/routeros-oci-build/docker-entrypoint.sh
|
||||||
13189fa546c3488dddd8efc80c47f6da5241e5fc28b79cbfe795414ea05c7a4f langs/README.md
|
13189fa546c3488dddd8efc80c47f6da5241e5fc28b79cbfe795414ea05c7a4f langs/README.md
|
||||||
@@ -166,7 +167,7 @@ d58a2ed83319176de4e66790ed292447c9497ae031464ec55cfe27174acb639a src/admin/file
|
|||||||
77b8c05645969834cc8a58e249a7b60a57d6c47ad1c5cd92ffa5e4a9b5a8e73c src/admin/file_logs_query.rs
|
77b8c05645969834cc8a58e249a7b60a57d6c47ad1c5cd92ffa5e4a9b5a8e73c src/admin/file_logs_query.rs
|
||||||
743bb7436f77e04015328a0e7e7d425e43ef8aa8d61467bde157e462c1dcdc2e src/admin/logging_api.rs
|
743bb7436f77e04015328a0e7e7d425e43ef8aa8d61467bde157e462c1dcdc2e src/admin/logging_api.rs
|
||||||
243f4a9c3fa99781e19c3952354d2632c0ce65e1dafac729567cbe3c177f94cb src/admin/mod.rs
|
243f4a9c3fa99781e19c3952354d2632c0ce65e1dafac729567cbe3c177f94cb src/admin/mod.rs
|
||||||
4129dfbc9571943ea6dc384ed124d100c1f20451e90b925edd8696f9b107992f src/admin/openapi.json
|
bab113f763d31d7247c8766f59b720d4120c8062f64475fa89bad8415be7f1e3 src/admin/openapi.json
|
||||||
f7a356109786635dd58cba590c71c796dbf36b47f25845190c75ee5c6a9fcb86 src/admin/operations.rs
|
f7a356109786635dd58cba590c71c796dbf36b47f25845190c75ee5c6a9fcb86 src/admin/operations.rs
|
||||||
257d93a29d0bda96462bcf695aba8d0ec0f9412c379e066ec46ae8ee034e3a53 src/admin/panel_assets.rs
|
257d93a29d0bda96462bcf695aba8d0ec0f9412c379e066ec46ae8ee034e3a53 src/admin/panel_assets.rs
|
||||||
f5127855c2994d052678865df36d703b74f4a0afc633daf7718b10da18d26e37 src/admin/panel_content.rs
|
f5127855c2994d052678865df36d703b74f4a0afc633daf7718b10da18d26e37 src/admin/panel_content.rs
|
||||||
@@ -177,14 +178,15 @@ f3635b624cf48598d68274a470d84d15ef9f6070d56e437a0031afa724471d5e src/admin/pref
|
|||||||
7a00e4ab943f74d2b1bdcbfab7f9cd3f584e9f59536b4aca6c4c31f5f5508d12 src/admin/public/tests.rs
|
7a00e4ab943f74d2b1bdcbfab7f9cd3f584e9f59536b4aca6c4c31f5f5508d12 src/admin/public/tests.rs
|
||||||
6930b4f4b45257772b321b20a9becdf9bc4610274852948ba38c2d0cdf02dfaf src/admin/refresh_preferences.rs
|
6930b4f4b45257772b321b20a9becdf9bc4610274852948ba38c2d0cdf02dfaf src/admin/refresh_preferences.rs
|
||||||
66eea4e8fd1c60a64090bd9e97b36903b10b1e2f7089c1a333e057d1d421bd6f src/admin/router.rs
|
66eea4e8fd1c60a64090bd9e97b36903b10b1e2f7089c1a333e057d1d421bd6f src/admin/router.rs
|
||||||
e135431cb078ddb483165581123c64af8f00ea67acb3a395ec3e53c85d0d0d45 src/admin/session.rs
|
fba52102e77ca8871a42f97c91be8f10a9aa4f997868652d550fff3fbd41b66e src/admin/session.rs
|
||||||
ee6e3a89a478e1092d2ed55686e216512b40d26963bc47fc6e30d4a75ac01b2f src/admin/status.rs
|
ee6e3a89a478e1092d2ed55686e216512b40d26963bc47fc6e30d4a75ac01b2f src/admin/status.rs
|
||||||
f7a696ae9924235790f4fdcb9bb77505fde364fbaf8d7fd94fc9fddf13d7a04b src/admin/status_live.rs
|
f7a696ae9924235790f4fdcb9bb77505fde364fbaf8d7fd94fc9fddf13d7a04b src/admin/status_live.rs
|
||||||
8315c856cd50f1072593ecb30c274d42d82f078b5fb93e7c68a8857cd81b0841 src/admin/status_system.rs
|
8315c856cd50f1072593ecb30c274d42d82f078b5fb93e7c68a8857cd81b0841 src/admin/status_system.rs
|
||||||
cadd7dca29b9aad8c77c7bc23dd249ea37a15adfa4d636a8ef00273a91ce35dc src/admin/tail.rs
|
cadd7dca29b9aad8c77c7bc23dd249ea37a15adfa4d636a8ef00273a91ce35dc src/admin/tail.rs
|
||||||
d63b36d10160b5e17d3e27f4b715954e50d4a5f39e0edf83eaad617badab58d1 src/admin/tests.rs
|
176173da61950866c61ab46b272a1ad95de3407dc6ef68a41c23a033b7d82b04 src/admin/tests.rs
|
||||||
c18c369124368f58524652565102817ed69fd25b222b0c5e737ef7632b45dcfb src/admin/web/acl-picker.js
|
c18c369124368f58524652565102817ed69fd25b222b0c5e737ef7632b45dcfb src/admin/web/acl-picker.js
|
||||||
48fcd818c522fe80f2c7b2e218f87de6a7772ffd0a24e93502780b03ec78e335 src/admin/web/acme.js
|
48fcd818c522fe80f2c7b2e218f87de6a7772ffd0a24e93502780b03ec78e335 src/admin/web/acme.js
|
||||||
|
b61a7d8fa850e191806a696c49a2e22786650e7a0d6408c1a7edd9144f5829b5 src/admin/web/admin_origin_rejected.html
|
||||||
86abf50f39862d821cd2e43ca425671aa85289272915132c5a9a5dd1fc4182e2 src/admin/web/api-tokens.js
|
86abf50f39862d821cd2e43ca425671aa85289272915132c5a9a5dd1fc4182e2 src/admin/web/api-tokens.js
|
||||||
faa9735c2a02746b2954bc4955eb609f94afebb685cd5521d2629640cea2777a src/admin/web/app/backend-dashboard.js
|
faa9735c2a02746b2954bc4955eb609f94afebb685cd5521d2629640cea2777a src/admin/web/app/backend-dashboard.js
|
||||||
aed3aea4eef0011c6b51d39736782e7d1ec52662e422f40e0c7b9ddfc19d0378 src/admin/web/app/certificate-inspection.js
|
aed3aea4eef0011c6b51d39736782e7d1ec52662e422f40e0c7b9ddfc19d0378 src/admin/web/app/certificate-inspection.js
|
||||||
@@ -565,7 +567,7 @@ f00743af2cf4a5952caef7a1dcf68e7817b5599a252a9973e1c22045517c0b0e tests/fixtures
|
|||||||
102b83171a6429b6375d8001d6c5294702385cd58ee55727cb657b1f3566e877 tests/panel_icons_browser.py
|
102b83171a6429b6375d8001d6c5294702385cd58ee55727cb657b1f3566e877 tests/panel_icons_browser.py
|
||||||
c4030b7d224553312012b1f25153dd3545e83de7bccff2894c0e8f7e0e84b721 tests/panel_icons_contract.js
|
c4030b7d224553312012b1f25153dd3545e83de7bccff2894c0e8f7e0e84b721 tests/panel_icons_contract.js
|
||||||
886c89e8517f34af5e2aef9672a8de559f94c536b028f1b9cadf2a2a7220d826 tests/panel_interface_contract.py
|
886c89e8517f34af5e2aef9672a8de559f94c536b028f1b9cadf2a2a7220d826 tests/panel_interface_contract.py
|
||||||
c5412e9e83d539ed64ca82c3ce6ac575d22212d48a7a3188ba99aa865a324d65 tests/panel_refresh_contract.js
|
b360e8dd2634976eb0e4fadd5d2afd9dc9b86c707e9c44e62978beb2f9f5bdb6 tests/panel_refresh_contract.js
|
||||||
e24a0f84f1bfc46964df865ac387d651f7b384d781cbc8f3a9a5b0b60f3d69ca tests/vhost_auth_selection.js
|
e24a0f84f1bfc46964df865ac387d651f7b384d781cbc8f3a9a5b0b60f3d69ca tests/vhost_auth_selection.js
|
||||||
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 third_party/swagger-ui-5.33.1/LICENSE
|
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 third_party/swagger-ui-5.33.1/LICENSE
|
||||||
0d20d1adef18aee3f40dd258172155521ce702ac445cb5f7b7d60ed32dad2fb2 third_party/swagger-ui-5.33.1/NOTICE
|
0d20d1adef18aee3f40dd258172155521ce702ac445cb5f7b7d60ed32dad2fb2 third_party/swagger-ui-5.33.1/NOTICE
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ The authenticated `/docs` page has two tabs: **Reader** with the guides embedded
|
|||||||
|
|
||||||
### Publishing the panel behind a reverse proxy
|
### Publishing the panel behind a reverse proxy
|
||||||
|
|
||||||
This is a special-risk topology. Configure a fixed HTTPS public origin, an allowed hostname and a trusted forwarding boundary. Ordinary public Vhosts never forward administration cookies to an upstream. Re-test CSRF/Origin validation and cookie security after any topology change.
|
This is a special-risk topology. Configure a fixed HTTPS public origin, an allowed hostname and a trusted forwarding boundary. Ordinary public Vhosts never forward administration cookies to an upstream. Re-test CSRF/Origin validation and cookie security after any topology change. If the browser origin does not match the administration origin, RustProxy returns a branded **Could not open the panel** page; verify the public URL plus the forwarded Host and protocol before retrying.
|
||||||
|
|
||||||
## Authentication and safe writes
|
## Authentication and safe writes
|
||||||
|
|
||||||
|
|||||||
@@ -77,10 +77,10 @@ ENV_FILE=integrations/routeros-oci-build/.env \
|
|||||||
bash integrations/routeros-oci-build/build-routeros-oci.sh push
|
bash integrations/routeros-oci-build/build-routeros-oci.sh push
|
||||||
```
|
```
|
||||||
|
|
||||||
For example, with RustProxy version `0.36.12` and the defaults this publishes:
|
For example, with RustProxy version `0.36.13` and the defaults this publishes:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
oci.example.net/network/rustproxy:0.36.12
|
oci.example.net/network/rustproxy:0.36.13
|
||||||
oci.example.net/network/rustproxy:latest
|
oci.example.net/network/rustproxy:latest
|
||||||
oci.example.net/network/rustproxy:routeros
|
oci.example.net/network/rustproxy:routeros
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"openapi": "3.0.3",
|
"openapi": "3.0.3",
|
||||||
"info": {
|
"info": {
|
||||||
"title": "RustProxy Administration API",
|
"title": "RustProxy Administration API",
|
||||||
"version": "0.36.12",
|
"version": "0.36.13",
|
||||||
"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."
|
"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": [
|
"servers": [
|
||||||
|
|||||||
+10
-4
@@ -103,10 +103,9 @@ fn invalid_admin_origin(
|
|||||||
.any(|entry| entry.trim_start().starts_with("text/html"))
|
.any(|entry| entry.trim_start().starts_with("text/html"))
|
||||||
});
|
});
|
||||||
if request.method() == Method::GET && panel_document_path(request.uri().path()) && wants_html {
|
if request.method() == Method::GET && panel_document_path(request.uri().path()) && wants_html {
|
||||||
return secure((
|
let html = include_str!("web/admin_origin_rejected.html")
|
||||||
StatusCode::FORBIDDEN,
|
.replace("__RUSTPROXY_ASSET_ID__", asset_build_id());
|
||||||
axum::response::Html("<!doctype html><html lang=\"en\"><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>RustProxy - Access blocked</title><h1>RustProxy - Could not open the panel</h1><p>The request origin was rejected. Check the proxy/URL and try again.</p><p><a href=\"\">Reload panel</a></p></html>"),
|
return secure((StatusCode::FORBIDDEN, axum::response::Html(html)).into_response());
|
||||||
).into_response());
|
|
||||||
}
|
}
|
||||||
secure(reject(StatusCode::FORBIDDEN, "auth.invalid_origin"))
|
secure(reject(StatusCode::FORBIDDEN, "auth.invalid_origin"))
|
||||||
}
|
}
|
||||||
@@ -122,6 +121,13 @@ async fn guard(State(state): State<Arc<App>>, mut request: Request, next: Next)
|
|||||||
Ok(value) => value,
|
Ok(value) => value,
|
||||||
Err(()) => return secure(reject(StatusCode::FORBIDDEN, "auth.invalid_host")),
|
Err(()) => return secure(reject(StatusCode::FORBIDDEN, "auth.invalid_host")),
|
||||||
};
|
};
|
||||||
|
let path = request.uri().path();
|
||||||
|
let presentation_asset = (request.method() == Method::GET || request.method() == Method::HEAD)
|
||||||
|
&& (path == "/favicon.svg"
|
||||||
|
|| fingerprinted_path(path, "/assets/").as_deref() == Some("/assets/style.css"));
|
||||||
|
if presentation_asset {
|
||||||
|
return secure(next.run(request).await);
|
||||||
|
}
|
||||||
let headers = request.headers();
|
let headers = request.headers();
|
||||||
let trusted_host = trusted_admin_proxy(&state, peer);
|
let trusted_host = trusted_admin_proxy(&state, peer);
|
||||||
let trusted_proto = trusted_admin_forwarded_proto(&state, peer);
|
let trusted_proto = trusted_admin_forwarded_proto(&state, peer);
|
||||||
|
|||||||
+29
-2
@@ -340,6 +340,7 @@ mod tests {
|
|||||||
async fn invalid_origin_on_document_is_visible_but_still_forbidden() {
|
async fn invalid_origin_on_document_is_visible_but_still_forbidden() {
|
||||||
let (router, store, _dir, _secret, _) = fixture().await;
|
let (router, store, _dir, _secret, _) = fixture().await;
|
||||||
let response = router
|
let response = router
|
||||||
|
.clone()
|
||||||
.oneshot(
|
.oneshot(
|
||||||
Request::builder()
|
Request::builder()
|
||||||
.uri("/overview")
|
.uri("/overview")
|
||||||
@@ -359,10 +360,36 @@ mod tests {
|
|||||||
.to_str()
|
.to_str()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.starts_with("text/html"));
|
.starts_with("text/html"));
|
||||||
let body = axum::body::to_bytes(response.into_body(), 4096)
|
let body = axum::body::to_bytes(response.into_body(), 16 * 1024)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
assert!(String::from_utf8_lossy(&body).contains("Could not open the panel"));
|
let body = String::from_utf8_lossy(&body);
|
||||||
|
assert!(body.contains("Could not open the panel"));
|
||||||
|
assert!(body.contains("class=\"auth-page\""));
|
||||||
|
assert!(body.contains("class=\"login-card\""));
|
||||||
|
assert!(body.contains(asset_build_id()));
|
||||||
|
|
||||||
|
let stylesheet = format!("/assets/style_{}.css", asset_build_id());
|
||||||
|
let style_response = router
|
||||||
|
.oneshot(
|
||||||
|
Request::builder()
|
||||||
|
.uri(stylesheet)
|
||||||
|
.header("host", "127.0.0.1:9090")
|
||||||
|
.header("origin", "null")
|
||||||
|
.header("sec-fetch-site", "cross-site")
|
||||||
|
.body(Body::empty())
|
||||||
|
.unwrap(),
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
.unwrap();
|
||||||
|
assert_eq!(style_response.status(), StatusCode::OK);
|
||||||
|
assert!(style_response
|
||||||
|
.headers()
|
||||||
|
.get(http::header::CONTENT_TYPE)
|
||||||
|
.unwrap()
|
||||||
|
.to_str()
|
||||||
|
.unwrap()
|
||||||
|
.starts_with("text/css"));
|
||||||
store.close().await;
|
store.close().await;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html data-theme="dark" lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>RustProxy / Access blocked</title>
|
||||||
|
<link rel="icon" href="/favicon.svg">
|
||||||
|
<link rel="stylesheet" href="/assets/style___RUSTPROXY_ASSET_ID__.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="auth-page">
|
||||||
|
<header class="auth-top">
|
||||||
|
<a class="brand" href="" aria-label="RustProxy">
|
||||||
|
<span class="brand-mark">r<span>/</span>p</span><span>RustProxy</span>
|
||||||
|
</a>
|
||||||
|
<span class="pill danger">403</span>
|
||||||
|
</header>
|
||||||
|
<main class="auth-main">
|
||||||
|
<section class="login-section">
|
||||||
|
<h1>Administration</h1>
|
||||||
|
<div class="login-card">
|
||||||
|
<div class="card-heading">
|
||||||
|
<h2>Could not open the panel</h2>
|
||||||
|
<span class="pill danger">Access blocked</span>
|
||||||
|
</div>
|
||||||
|
<div class="operation-message error" role="alert">
|
||||||
|
The request origin was rejected. Check the proxy/URL and try again.
|
||||||
|
</div>
|
||||||
|
<p class="fine">If you use a reverse proxy, verify the public administration URL and the forwarded Host
|
||||||
|
and protocol.</p>
|
||||||
|
<form action="" method="get">
|
||||||
|
<button class="primary" type="submit">Reload panel</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -375,18 +375,22 @@ main {
|
|||||||
padding: 18px
|
padding: 18px
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
html[data-corner-style=square] {
|
html[data-corner-style=square] {
|
||||||
--rp-docs-radius-surface: 0px;
|
--rp-docs-radius-surface: 0px;
|
||||||
--rp-docs-radius-control: 0px;
|
--rp-docs-radius-control: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
html[data-corner-style=subtle] {
|
html[data-corner-style=subtle] {
|
||||||
--rp-docs-radius-surface: 5px;
|
--rp-docs-radius-surface: 5px;
|
||||||
--rp-docs-radius-control: 4px;
|
--rp-docs-radius-control: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
html[data-corner-style=rounded] {
|
html[data-corner-style=rounded] {
|
||||||
--rp-docs-radius-surface: 12px;
|
--rp-docs-radius-surface: 12px;
|
||||||
--rp-docs-radius-control: 8px;
|
--rp-docs-radius-control: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
html[data-corner-style=extra] {
|
html[data-corner-style=extra] {
|
||||||
--rp-docs-radius-surface: 18px;
|
--rp-docs-radius-surface: 18px;
|
||||||
--rp-docs-radius-control: 12px;
|
--rp-docs-radius-control: 12px;
|
||||||
|
|||||||
@@ -51,5 +51,5 @@ const events = openapi.paths["/api/events"].get;
|
|||||||
const logsFlag = (events.parameters || []).find(parameter => parameter.name === "logs");
|
const logsFlag = (events.parameters || []).find(parameter => parameter.name === "logs");
|
||||||
assert.equal(logsFlag?.schema?.type, "boolean");
|
assert.equal(logsFlag?.schema?.type, "boolean");
|
||||||
assert.equal(logsFlag?.schema?.default, true);
|
assert.equal(logsFlag?.schema?.default, true);
|
||||||
assert.equal(openapi.info.version, "0.36.12");
|
assert.equal(openapi.info.version, "0.36.13");
|
||||||
console.log("Panel refresh/API contract checks: OK");
|
console.log("Panel refresh/API contract checks: OK");
|
||||||
Reference in new issue
Block a user