Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions services/api/api/iron-proxy.base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ transforms:
- "api-access-key"
- "api-signature"
- "api-timestamp"
- "project-access-token"
- "fx-access-key"
- "fx-access-sign"
- "fx-access-timestamp"
Expand Down
14 changes: 13 additions & 1 deletion services/api/tests/test_proxy_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,15 @@ def test_render_emits_header_and_gcp_auth_transforms(
assert entry["rules"] == [{"host": "api.openai.com"}]


def test_render_allows_project_access_token_header() -> None:
cfg = yaml.safe_load(render_proxy_yaml([]))
header_allowlist = next(
t for t in cfg["transforms"] if t["name"] == "header_allowlist"
)

assert "project-access-token" in header_allowlist["config"]["headers"]


def test_render_replace_secret_emits_query_and_path_locations(
monkeypatch: pytest.MonkeyPatch,
) -> None:
Expand Down Expand Up @@ -1494,7 +1503,10 @@ def test_render_emits_postgres_listeners_with_env_refs(
]
cfg = yaml.safe_load(render_proxy_yaml(secrets))
listeners = cfg["postgres"]
assert [l["name"] for l in listeners] == ["analytics_pg", "database_url"]
assert [listener["name"] for listener in listeners] == [
"analytics_pg",
"database_url",
]
assert listeners[0]["listen"] == "0.0.0.0:5432"
assert listeners[1]["listen"] == "0.0.0.0:5433"
# upstream.dsn uses the secret_ref directly so iron-proxy can resolve it
Expand Down
1 change: 1 addition & 0 deletions services/iron-proxy/iron-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ transforms:
- "api-access-key"
- "api-signature"
- "api-timestamp"
- "project-access-token"
- "fx-access-key"
- "fx-access-sign"
- "fx-access-timestamp"
Expand Down