Files
gateway/tests/fixtures/specs/param_forwarding_4.json
zooqueenandHanzo Dev 25262baa1d keys: sk- is the server-side credential; hk- is retired
Every hk- in the docs, the widget refusal messages and the fixture tokens
named a shape that authenticates nothing. Cloud accepts pk- and sk- and
nothing else, IAM mints sk-, and no generator in the fleet still produces
hk- — so a reader who copied one of these examples got a 401 and no way to
see why.

The predicate keeps it. authz.IsAPIKey still matches hk-, and should: those
keys are still in circulation and have to reach the backend that refuses
them rather than be parsed here as a JWT. TestIsAPIKey pins that row, and
the two comments annotating the predicate now mark the shape retired rather
than list it alongside the current ones.

Where the hk- row sat in the forged-header and widget-key tables, pk- takes
its place. sk- was already covered in both, and pk- — the shape that ships
in a browser bundle — is the one neither table had ever exercised.

Verified: make test, 489 pass / 0 fail, including all four param_forwarding
fixtures whose bearer changed.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-13 18:06:33 -07:00

37 lines
815 B
JSON

{
"in": {
"method": "POST",
"url": "http://localhost:8080/param_forwarding/some/foo/bar?a=1&b=2",
"header": {
"autHoriZatiOn": "bearer sk-test-fixture-token",
"x-y-Z": "true",
"a-b-c": "ignore"
},
"body": {"foo":"bar"}
},
"out": {
"status_code": 200,
"body": {
"body": "{\"foo\":\"bar\"}",
"foo":42,
"headers":{
"Accept-Encoding":["gzip"],
"Authorization":["bearer sk-test-fixture-token"],
"User-Agent":["hanzoai/gateway Version 2.13.0"],
"X-Forwarded-Host":["localhost:8080"],
"X-Y-Z":["true"]
},
"path":"/param_forwarding/bar",
"query":{
"dump_body":["1"],
"foo":["foo"]
}
},
"header": {
"content-type": ["application/json; charset=utf-8"],
"Cache-Control": ["public, max-age=3600"],
"X-Gateway-Completed": ["true"]
}
}
}