Skip to main content

Runtime Auth Application

At runtime, Zerq injects credentials into outbound calls based on collection or workflow configuration.

Application order​

  1. Resolve credential reference on collection or node.
  2. Load and decrypt secret value.
  3. Transform into required auth shape (header, token, cert, DSN).
  4. 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 returns 502 Bad Gateway with the generic message Upstream 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 its error branch with status_code 0 and an error message, without sending the request.
  • Upstream transport errors (unreachable host, timeout) return 502 with upstream request failed or upstream 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 with key_in=query is 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_token is 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.