mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 01:12:56 +00:00
python based regression test setup for auth_broker. This uses a http mock for cplane as well as the JWKs url. complications: 1. We cannot just use local_proxy binary, as that requires the pg_session_jwt extension which we don't have available in the current test suite 2. We cannot use just any old http mock for local_proxy, as auth_broker requires http2 to local_proxy as such, I used the h2 library to implement an echo server - copied from the examples in the h2 docs.
26 lines
831 B
Python
26 lines
831 B
Python
from typing import NamedTuple
|
|
|
|
from _typeshed import Incomplete
|
|
|
|
from .exceptions import FlowControlError as FlowControlError
|
|
from .exceptions import ProtocolError as ProtocolError
|
|
|
|
UPPER_RE: Incomplete
|
|
CONNECTION_HEADERS: Incomplete
|
|
|
|
def extract_method_header(headers): ...
|
|
def is_informational_response(headers): ...
|
|
def guard_increment_window(current, increment): ...
|
|
def authority_from_headers(headers): ...
|
|
|
|
class HeaderValidationFlags(NamedTuple):
|
|
is_client: Incomplete
|
|
is_trailer: Incomplete
|
|
is_response_header: Incomplete
|
|
is_push_promise: Incomplete
|
|
|
|
def validate_headers(headers, hdr_validation_flags): ...
|
|
def normalize_outbound_headers(headers, hdr_validation_flags): ...
|
|
def normalize_inbound_headers(headers, hdr_validation_flags): ...
|
|
def validate_outbound_headers(headers, hdr_validation_flags): ...
|