v0,28,2
This commit is contained in:
1 parent
d940f9995f
commit
65e082b9d1
61 files changed
+1225
-581
No files matched your search
@@ -24,7 +24,7 @@ def read_docker_agent_source() -> str:
|
||||
|
||||
preflight(root)
|
||||
manifest = tomllib.loads((root / "Cargo.toml").read_text())
|
||||
assert manifest["package"]["version"] == "0.28.1"
|
||||
assert manifest["package"]["version"] == "0.28.2"
|
||||
assert manifest["dependencies"]["quinn"]["version"] == "0.11.12"
|
||||
h3dep = manifest["dependencies"]["h3"]
|
||||
assert h3dep["package"] == "hpx-h3" and h3dep["version"] == "=2.5.19" and "quinn" in h3dep["features"]
|
||||
@@ -32,14 +32,14 @@ assert "h3-quinn" not in manifest["dependencies"]
|
||||
lock_path = root / "Cargo.lock"
|
||||
if lock_path.exists():
|
||||
lock = lock_path.read_text()
|
||||
assert 'name = "rust-proxy"\nversion = "0.28.1"' in lock
|
||||
assert 'name = "rust-proxy"\nversion = "0.28.2"' in lock
|
||||
assert 'name = "systemstat"' in lock and 'name = "metrics-process"' in lock and 'name = "sysinfo"' in lock, "Cargo.lock must be resolver-generated after adding cross-platform statistics libraries"
|
||||
for release_doc, marker in {
|
||||
"README.md": "# RustProxy 0.28.1",
|
||||
"CHANGELOG.md": "## 0.28.1",
|
||||
"ROADMAP.md": "## 0.28.1",
|
||||
"AGENTS.md": "Current source version: 0.28.1.",
|
||||
"docs/TEST_REPORT.md": "# Verification report - RustProxy 0.28.1",
|
||||
"README.md": "# RustProxy 0.28.2",
|
||||
"CHANGELOG.md": "## 0.28.2",
|
||||
"ROADMAP.md": "## 0.28.2",
|
||||
"AGENTS.md": "Current source version: 0.28.2.",
|
||||
"docs/TEST_REPORT.md": "# Verification report - RustProxy 0.28.2",
|
||||
}.items():
|
||||
assert marker in (root / release_doc).read_text(), f"stale release identity in {release_doc}"
|
||||
assert tomllib.loads((root / "rust-toolchain.toml").read_text())["toolchain"]["channel"] == "stable"
|
||||
@@ -124,6 +124,7 @@ assert 'cargo generate-lockfile' in dev and r'version = "0\.9\.0"' not in dev
|
||||
assert dev.count('cargo generate-lockfile') == 1, "dev.sh must only create Cargo.lock when it is missing"
|
||||
unit = (root / "deploy/rustproxy.service").read_text()
|
||||
assert "LogsDirectory=rustproxy" in unit and "/var/log/rustproxy" in unit
|
||||
assert "ReadOnlyPaths=-/etc/letsencrypt -/etc/ssl" in unit
|
||||
assert "Environment=MALLOC_ARENA_MAX=2" in unit
|
||||
assert "Environment=MALLOC_ARENA_MAX=2" in read_deploy_source()
|
||||
assert not re.search(r"\b20\d{2}[-/]\d{1,2}[-/]\d{1,2}\b", (root / "CHANGELOG.md").read_text()), "changelog contains a release date"
|
||||
@@ -284,7 +285,7 @@ assert 'Opt-in health decisions based on ordinary user traffic. Defaults to disa
|
||||
assert '"force_ssl"' in openapi and '"forward_client_ip"' in openapi
|
||||
assert '"backend_header"' in openapi and '"backend_timing_header"' in openapi
|
||||
assert '"StreamMetrics"' in openapi and '"streams"' in openapi
|
||||
for marker in ['"version": "0.28.1"', '"/api/traffic"', '"capture_user_agent"', '"capture_country"', '"hot_auto_trim_enabled"', '"hot_auto_trim_after_seconds"', '"hot_auto_trim_target_percent"', '"/api/config/{section}"', '"ConfigSectionUpdate"', '"cold_on_idle"', '"cold_on_age"', '"cold_max_hot_seconds"', '"cold_on_lru"', '"cold_on_shutdown"', '"cold_gc_interval_seconds"', '"cold_gc_max_delete"', '"collapse_enabled"', '"collapse_wait_timeout_ms"', '"collapse_timeout_fallback"', '"stale_if_error_timeout"', '"stale_if_error_connection"', '"stale_if_error_dns"', '"stale_if_error_tls"', '"stale_if_error_statuses"', '"proactive_refresh_enabled"', '"proactive_refresh_before_expiry_seconds"', '"proactive_refresh_percent"', '"proactive_refresh_max_inflight"', '"TransformSettings"', '"TransformOverrides"', '"/api/cache/cold/cleanup"', '"/api/cache/invalidate"', '"/api/cache/bans"', '"/api/cache/bans/{id}"', '"CacheInvalidationRequest"', '"CacheInvalidationResponse"', '"ColdCleanupJob"', '"match_type"', '"regex_insensitive"', '"rewrite"', '"response"', '"covered_hosts"', '"default": true']:
|
||||
for marker in ['"version": "0.28.2"', '"/api/traffic"', '"capture_user_agent"', '"capture_country"', '"hot_auto_trim_enabled"', '"hot_auto_trim_after_seconds"', '"hot_auto_trim_target_percent"', '"/api/config/{section}"', '"ConfigSectionUpdate"', '"cold_on_idle"', '"cold_on_age"', '"cold_max_hot_seconds"', '"cold_on_lru"', '"cold_on_shutdown"', '"cold_gc_interval_seconds"', '"cold_gc_max_delete"', '"collapse_enabled"', '"collapse_wait_timeout_ms"', '"collapse_timeout_fallback"', '"stale_if_error_timeout"', '"stale_if_error_connection"', '"stale_if_error_dns"', '"stale_if_error_tls"', '"stale_if_error_statuses"', '"proactive_refresh_enabled"', '"proactive_refresh_before_expiry_seconds"', '"proactive_refresh_percent"', '"proactive_refresh_max_inflight"', '"TransformSettings"', '"TransformOverrides"', '"/api/cache/cold/cleanup"', '"/api/cache/invalidate"', '"/api/cache/bans"', '"/api/cache/bans/{id}"', '"CacheInvalidationRequest"', '"CacheInvalidationResponse"', '"ColdCleanupJob"', '"match_type"', '"regex_insensitive"', '"rewrite"', '"response"', '"covered_hosts"', '"default": true']:
|
||||
assert marker in openapi, marker
|
||||
for marker in ['"NotFoundHost"', '"not_found_hosts"', '"PrometheusSettings"', '"allow_trusted_network_without_token"', '"include_docker_vhosts"', '"include_streams"', '"include_logging"']:
|
||||
assert marker in openapi, marker
|
||||
@@ -678,7 +679,7 @@ assert 'Ok(line) if command_tx.send(line).is_ok()' not in main_source, 'do not m
|
||||
assert 'Ok(line) => {' in main_source and 'command_tx.send(line).is_err()' in main_source
|
||||
for marker in ['LIVE_STREAM_CAPACITY', 'broadcast::Sender<LogEntry>', 'pub fn subscribe']:
|
||||
assert marker in logging_source, marker
|
||||
assert 'SCHEMA_VERSION: i64 = 8' in db_source and 'certificate_renewals' in db_source and '0004_admin_preferences.sql' in db_source and '0005_certificate_api.sql' in db_source and '0006_certificate_api_credentials.sql' in db_source and '0007_secret_store.sql' in db_source and '0008_config_history.sql' in db_source
|
||||
assert 'SCHEMA_VERSION: i64 = 9' in db_source and 'certificate_renewals' in db_source and '0004_admin_preferences.sql' in db_source and '0005_certificate_api.sql' in db_source and '0006_certificate_api_credentials.sql' in db_source and '0007_secret_store.sql' in db_source and '0008_config_history.sql' in db_source and '0009_certificate_api_grants.sql' in db_source
|
||||
for marker in ['replace_as_restore', 'config.restore', 'source_revision']:
|
||||
assert marker in db_source, marker
|
||||
for marker in ['restore_config_history', '/api/config/history/restore', 'expected_revision']:
|
||||
@@ -1300,12 +1301,13 @@ connection.executescript((root / "migrations/0005_certificate_api.sql").read_tex
|
||||
connection.executescript((root / "migrations/0006_certificate_api_credentials.sql").read_text())
|
||||
connection.executescript((root / "migrations/0007_secret_store.sql").read_text())
|
||||
connection.executescript((root / "migrations/0008_config_history.sql").read_text())
|
||||
connection.execute("PRAGMA user_version = 8")
|
||||
connection.executescript((root / "migrations/0009_certificate_api_grants.sql").read_text())
|
||||
connection.execute("PRAGMA user_version = 9")
|
||||
assert connection.execute("PRAGMA quick_check").fetchone()[0] == "ok"
|
||||
assert connection.execute("SELECT COUNT(*) FROM auth_throttle WHERE id=1").fetchone()[0] == 1
|
||||
assert connection.execute("SELECT COUNT(*) FROM certificate_renewals").fetchone()[0] == 0
|
||||
assert connection.execute("SELECT COUNT(*) FROM admin_preferences").fetchone()[0] == 0
|
||||
assert connection.execute("PRAGMA user_version").fetchone()[0] == 8
|
||||
assert connection.execute("PRAGMA user_version").fetchone()[0] == 9
|
||||
connection.close()
|
||||
for marker_0223 in [
|
||||
'"/api/certificates/reload"', 'certificate_reload',
|
||||
@@ -1394,7 +1396,7 @@ assert '"error_log" => {' not in admin_0241 and 'request("/api/config/error_log"
|
||||
assert '"error_log"' in openapi and 'logging, error_log, forwarding' not in openapi
|
||||
assert 'logging_section_persists_error_log_settings_atomically' in admin_0241 and 'error_log_is_not_a_standalone_configuration_section' in admin_0241
|
||||
assert 'location.pathname === "/logging"' in settings_js_0241
|
||||
assert '"RuntimeInformation"' in openapi and '"version": "0.28.1"' in openapi
|
||||
assert '"RuntimeInformation"' in openapi and '"version": "0.28.2"' in openapi
|
||||
|
||||
# 0.24.1 compiler and hostname-cardinality regressions.
|
||||
tls_0241 = rust_source(root, "src/tls.rs")
|
||||
@@ -1516,33 +1518,65 @@ assert 'listener-active-item' in runtime_web_0280 and 'listener-active-feature'
|
||||
assert 'cache-via-enabled' in cache_web_0280 and 'via_header:' in cache_web_0280
|
||||
assert 'location-header-direction location-header-editor' in vhost_core_0280
|
||||
|
||||
# 0.28.1 external certificate paths and certificate-source UX.
|
||||
tls_types_0281 = (root / "src/tls/types.rs").read_text()
|
||||
tls_server_0281 = (root / "src/tls/server_config.rs").read_text()
|
||||
tls_tests_0281 = (root / "src/tls/tests.rs").read_text()
|
||||
backup_snapshot_0281 = (root / "src/backup/snapshot.rs").read_text()
|
||||
certificate_admin_0281 = (root / "src/admin/certificates.rs").read_text()
|
||||
for marker_0281 in [
|
||||
# 0.28.2 external-certificate ACL/path hardening and least-privilege Certificate API.
|
||||
tls_types_0282 = (root / "src/tls/types.rs").read_text()
|
||||
tls_external_0282 = (root / "src/tls/external_paths.rs").read_text()
|
||||
tls_server_0282 = (root / "src/tls/server_config.rs").read_text()
|
||||
tls_tests_0282 = (root / "src/tls/tests.rs").read_text() + (root / "src/tls/tests/external_paths.rs").read_text()
|
||||
backup_snapshot_0282 = (root / "src/backup/snapshot.rs").read_text()
|
||||
certificate_admin_0282 = (root / "src/admin/certificates.rs").read_text()
|
||||
certificate_api_db_0282 = (root / "src/db/certificate_api.rs").read_text()
|
||||
certificate_session_0282 = (root / "src/admin/session.rs").read_text()
|
||||
deploy_core_0282 = (root / "scripts/deploy/deploy_core.py").read_text()
|
||||
for marker_0282 in [
|
||||
'pub fn certificate_files_are_external',
|
||||
'cert_external == key_external',
|
||||
'fs::canonicalize(value)',
|
||||
'Certbot\'s live/ entries are symlinks',
|
||||
'read_configured_pem',
|
||||
'external private key may be owner/group-readable',
|
||||
]:
|
||||
assert marker_0281 in tls_types_0281, marker_0281
|
||||
assert 'certificate_files_are_external(cert, key)?;' in tls_server_0281
|
||||
assert 'external_absolute_paths_follow_certbot_style_symlinks_on_each_reload' in tls_tests_0281
|
||||
assert 'certificate_files_are_external(' in backup_snapshot_0281 and 'External certificate material is intentionally outside' in backup_snapshot_0281
|
||||
assert 'uses external file paths; renew those files in place and call the certificate reload endpoint instead of deploy' in certificate_admin_0281
|
||||
for marker_0281 in [
|
||||
assert marker_0282 in tls_external_0282, marker_0282
|
||||
for marker_0282 in [
|
||||
'validate_external_parent_chain',
|
||||
'fs::canonicalize(configured)',
|
||||
'libc::O_NOFOLLOW',
|
||||
'mode & 0o022 == 0',
|
||||
'mode & 0o004 == 0',
|
||||
'POSIX ACL masks are reflected',
|
||||
]:
|
||||
assert marker_0282 in tls_external_0282, marker_0282
|
||||
assert 'certificate_files_are_external(cert, key)?;' in tls_server_0282
|
||||
for marker_0282 in [
|
||||
'external_absolute_paths_follow_certbot_style_symlinks_on_each_reload',
|
||||
'external_key_permissions_accept_acl_style_group_mask_but_reject_unsafe_write_or_world_read',
|
||||
'external_paths_reject_writable_non_sticky_parent_directories',
|
||||
]:
|
||||
assert marker_0282 in tls_tests_0282, marker_0282
|
||||
assert 'certificate_files_are_external(' in backup_snapshot_0282 and 'External certificate material is intentionally outside' in backup_snapshot_0282
|
||||
assert 'uses external file paths; renew those files in place and call the certificate reload endpoint instead of deploy' in certificate_admin_0282
|
||||
for marker_0282 in [
|
||||
'certificate_api_grants',
|
||||
'allow_deploy',
|
||||
'certificate_ids',
|
||||
'value != "*"',
|
||||
]:
|
||||
assert marker_0282 in certificate_api_db_0282, marker_0282
|
||||
for marker_0282 in [
|
||||
'certificate_api.target_required',
|
||||
'certificate_api.certificate_forbidden',
|
||||
'certificate_api.deploy_forbidden',
|
||||
]:
|
||||
assert marker_0282 in certificate_session_0282, marker_0282
|
||||
assert 'ReadOnlyPaths=-/etc/letsencrypt -/etc/ssl' in deploy_core_0282
|
||||
for marker_0282 in [
|
||||
'id="certificate-file-source"',
|
||||
'certificateSourceManaged',
|
||||
'certificateSourceExternal',
|
||||
'/etc/letsencrypt/live/example.com/fullchain.pem',
|
||||
'certificate-external-acl-example',
|
||||
'certificate-api-certificate-ids',
|
||||
'certificate-api-allow-deploy',
|
||||
]:
|
||||
assert marker_0281 in html or marker_0281 in runtime_web_0280 or marker_0281 in (root / 'langs/en_US.json').read_text(), marker_0281
|
||||
assert marker_0282 in html or marker_0282 in runtime_web_0280 or marker_0282 in (root / 'langs/en_US.json').read_text(), marker_0282
|
||||
assert 'Zewnętrzne ścieżki plików' in (root / 'langs/pl_pl.json').read_text()
|
||||
assert 'setfacl -m u:rustproxy:--x /etc/ssl/' in (root / 'docs/V0.28.2_IMPLEMENTATION.md').read_text()
|
||||
|
||||
print("PASS: 0.28.1 manifest/package, shared system-statistics/runtime metadata, Settings logging, retained H2, external-packaging/Grafana/Prometheus/404-host/custom-location/path/cache/dashboard/Nagios UI/source contracts, stopped legacy-renewal removal, session/admin/transport contracts, deterministic package source and embedded SQLite schema-v8 migrations.")
|
||||
print("PASS: 0.28.2 manifest/package, shared system-statistics/runtime metadata, Settings logging, retained H2, external-packaging/Grafana/Prometheus/404-host/custom-location/path/cache/dashboard/Nagios UI/source contracts, stopped legacy-renewal removal, session/admin/transport contracts, deterministic package source and embedded SQLite schema-v9 migrations.")
|
||||
print("NOT VERIFIED: Rust parsing, types, compilation, linking or runtime behavior. Run ./dev.sh test.")
|
||||
Reference in new issue
Block a user