mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 05:52:55 +00:00
## Problem Storage controller uses unencrypted HTTP requests for pageserver management API. Closes: https://github.com/neondatabase/cloud/issues/24283 ## Summary of changes - Implement `http_utils::server::Server` with TLS support. - Replace `hyper0::server::Server` with `http_utils::server::Server` in pageserver. - Add HTTPS handler for pageserver management API. - Generate local SSL certificates in neon local.
16 lines
608 B
Python
16 lines
608 B
Python
import requests
|
|
from fixtures.neon_fixtures import NeonEnvBuilder
|
|
|
|
|
|
def test_pageserver_https_api(neon_env_builder: NeonEnvBuilder):
|
|
"""
|
|
Test HTTPS pageserver management API.
|
|
If NeonEnv starts with use_https_pageserver_api with no errors, it's already a success.
|
|
Make /v1/status request to HTTPS API to ensure it's appropriately configured.
|
|
"""
|
|
neon_env_builder.use_https_pageserver_api = True
|
|
env = neon_env_builder.init_start()
|
|
|
|
addr = f"https://localhost:{env.pageserver.service_port.https}/v1/status"
|
|
requests.get(addr, verify=str(env.ssl_ca_file)).raise_for_status()
|