Credential Integration
APF governs credentials without handling them. A signed bundle declares which providers exist, which endpoints each provider’s credentials may reach, and how each credential is obtained and sent. OpenShell stores the credential values, mints or refreshes them, and injects them into approved requests. APF evaluates every request before that injection happens.
Where APF Stops and OpenShell Starts
APF Never Sees Credentials
OpenShell calls APF’s middleware at the PRE_CREDENTIALS hook. The hook fires after OpenShell’s own Layer 1 checks and before OpenShell injects provider credentials, so every request APF evaluates is credential-free. APF’s audit records never contain credential material, and header mutations cannot touch credential headers. A remove on authorization, cookie, or any x-openshell-credential* header is refused.
At the interceptor, OpenShell omits fields its protobuf schema marks as secret before it calls APF. APF therefore validates provider governance, not credential values.
Declaring Credentials
Each Provider document lists the credentials the provider uses.
The Provider JSON Schema rejects a credential whose style is missing its companion field, and an endpoint without a host or a port. apf-compile and the policy service do not check these, so validate providers against the schema before you sign.
Credential Sources
The source.kind selects how OpenShell obtains the value. APF projects each source into the provider profile’s refresh strategy or token grant block.
Refresh sources accept refreshBeforeSeconds, maxLifetimeSeconds, and, where applicable, scopes, material, and additionalOutputs. Refer to Policy Schemas for every field and to OpenShell provider profiles for how OpenShell runs each strategy.
Some source fields are not carried into the OpenShell provider profile in this release. The name of a host-env or external source is not projected, so OpenShell uses the credential’s envVars. The environment variable bindings in an oauth2 source’s parameters map are not projected either. Each parameter key becomes a required refresh material entry, marked secret when its name suggests a secret.
Binding Credentials to Endpoints
A SandboxPolicy network endpoint carries OpenShell’s credential controls.
Governing Providers at the Gateway
When APF governs an OpenShell gateway, the interceptor enforces the bundle’s provider catalog.
The content check applies to every caller, so a bundle-managed profile cannot be changed in OpenShell to differ from the bundle. APF’s own provider profile reconciler writes the bundle’s profiles, so its imports and updates pass. Refer to Gateway Interceptor for the reason codes.
Credential Issuance
APF does not issue, rotate, or revoke credentials. OpenShell mints, refreshes, and injects them after APF has decided, and your credential source revokes them, as the table above shows.
Next Steps
- To author provider documents, refer to Sandbox Policies.