Skip to content

Commit 53b8eec

Browse files
authored
fix(providers): harden static credential placement (#4886)
* fix(providers): enforce static credential request placement Signed-off-by: John Myers <[email protected]> * fix(providers): enforce placement using existing credential metadata Signed-off-by: John Myers <[email protected]> * fix(providers): default static credentials to Authorization placement Signed-off-by: John Myers <[email protected]> * chore(proto): preserve frozen Go SDK bindings Signed-off-by: John Myers <[email protected]> * fix(providers): ignore placement fields unused by auth style Signed-off-by: John Myers <[email protected]> --------- Signed-off-by: John Myers <[email protected]>
1 parent ef83ee2 commit 53b8eec

24 files changed

Lines changed: 2610 additions & 155 deletions

File tree

‎crates/openshell-core/README.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,25 @@ router agree on provider defaults. Profiles define:
5858
Do not duplicate provider-specific inference behavior in callers. Add shared
5959
behavior here, then consume it from the gateway, sandbox, and router.
6060

61+
## Static Credential Resolution
62+
63+
Static credential bindings retain endpoint authorization. The gateway includes
64+
static `ProviderProfileCredential` auth metadata in the existing runtime
65+
credential map under `static-env:<ENV_KEY>`. Provider state extracts those entries
66+
before storing dynamic token grants and compiles placement locally alongside the
67+
matching static binding. Missing metadata defaults to the `Authorization` header;
68+
malformed reserved metadata or an invalid selected placement fails closed
69+
atomically. The same header default applies to request rewriting with standalone
70+
resolver snapshots.
71+
The credential's `auth_style` selects the placement; unused fields for other
72+
styles are ignored and do not authorize additional locations.
73+
74+
Request rewriting supplies the actual header name, query key, or path slot.
75+
Header authorization is independent of authentication scheme, including Basic.
76+
Explicit body/WebSocket rewrite policies and trusted signing retain their
77+
existing permissions. Existing placeholder and stable-handle derivation remain
78+
unchanged. Protobuf message shapes and service interfaces remain unchanged.
79+
6180
## Middleware Contracts
6281

6382
Built-in supervisor middleware identifiers, host-selector matching, and pure

0 commit comments

Comments
 (0)