Runtime Auth Application
At runtime, Zerq injects credentials into outbound calls based on collection or workflow configuration.
Application order
- Resolve credential reference on collection or node.
- Load and decrypt secret value.
- Transform into required auth shape (header, token, cert, DSN).
- Send outbound request to backend target.
Failure behavior
Credential application fails closed: if a proxy, collection or http_request_node references a credential that cannot be used, the request is never sent upstream without it.
- Gateway proxies: if the referenced credential cannot be found, loaded or decrypted (including an unset environment variable for an env-var-backed secret), its mTLS client cannot be built, its client certificate has expired, or the OAuth2 token endpoint fails or returns no
access_token, the gateway returns502 Bad Gatewaywith the generic messageUpstream credentials could not be applied. The cause is logged server-side and recorded in the request log Error field; it is never returned to the API caller. - Workflow
http_request_node: the same failures route the node to itserrorbranch withstatus_code0and an error message, without sending the request. - Upstream transport errors (unreachable host, timeout) return
502withupstream request failedorupstream request timed out. The full upstream URL is never returned to the caller; logs and node error messages keep only scheme, host and path (query string and user info are removed, so an API key injected withkey_in=queryis not exposed). - Credentials the backend rejects still surface as the backend's own
401/403. - OAuth2 tokens are cached and refreshed before expiry; a token response without an
access_tokenis treated as a failure and is not cached.
Practical checks
- Verify attachment scope: collection-wide vs node-specific.
- Confirm logs expose status and request ID, not secret values.
- Test rotation to ensure no stale cached credentials remain.