# Zero-secret outbound relay & workload identity

> Inject upstream API credentials at Gregale’s outbound relay, exchange short-lived OIDC workload identity tokens, scan deployments for CVEs and leaked secrets, and reload secrets without dropping traffic.

Category: Zero-trust security · Maturity: GA & Beta · Plans: Free+ (secrets, OIDC, scans), Hobby+ (outbound integrations) · Updated 2026-11-26

Storing raw vendor API keys in container environment variables exposes credentials to application-level RCE, dependency supply-chain leaks, or stale snapshots. Gregale removes static secrets wherever possible and strictly controls every credential that remains.

## Keep vendor keys in Gregale’s outbound relay and rotate app secrets safely

```bash
# Seal a provider Authorization header in Gregale's outbound relay (never exposed in app env)
curl -X PUT https://api.gregale.dev/v1/outbound/integrations/$INTEGRATION_ID/credential \
  -H "Authorization: Bearer $GREGALE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"authorization": "Bearer re_live_..."}'

# Rotate an app secret cleanly with snapshot invalidation and rolling drain
gregale env rotate --app my-api DATABASE_URL="$NEW_DATABASE_URL" --restart
```

## Key capabilities

- **Credential-injecting outbound relay:** Register provider origin, allowed HTTP methods/paths, and daily limits on an outbound integration (per-account preview on paid plans). The relay attaches Authorization in transit — app code never reads the key.
- **Short-lived OIDC workload identity:** Authenticate workloads to external cloud providers with signed short-lived OIDC tokens instead of pasting static cloud access keys.
- **Automated CVE & secret scanning:** Every deployment can be scanned for known vulnerabilities and accidentally committed credentials alongside an outbound SSRF egress denylist covering RFC1918, loopback, and IMDS.
- **Snapshot-safe secret rotation:** Mutating a secret invalidates prior snapshots immediately; adding --restart queues a rolling replacement that drains old VMs without ever snapshotting old credentials.

## Typical PaaS vs. Gregale

| Capability | Typical PaaS | Gregale |
|---|---|---|
| Third-party API credentials in app runtime | Plain env vars readable by any compromised package | Outbound relay injects sealed headers outside the microVM |
| Cloud provider auth | Static IAM keys copied into env config | Short-lived OIDC workload identity tokens (Beta) |
| Snapshots after secret rotation | Risk of stale memory/env state in warm containers | Auto-invalidates snapshots + rolling --restart drain |

## Documentation

- [Outbound integrations](https://gregale.dev/docs/outbound-integrations.md)
- [Secrets management](https://gregale.dev/docs/secrets.md)
- [Security overview](https://gregale.dev/docs/security.md)
- [Egress denylist](https://gregale.dev/docs/egress-denylist.md)

## Related guides

- [zero-secret-outbound-api-relay](https://gregale.dev/articles/zero-secret-outbound-api-relay.md)
- [zero-restart-secret-rotation](https://gregale.dev/articles/zero-restart-secret-rotation.md)
- [pull-queue-workers-workload-identity](https://gregale.dev/articles/pull-queue-workers-workload-identity.md)
- [ssrf-protection-egress-denylist-paas](https://gregale.dev/articles/ssrf-protection-egress-denylist-paas.md)

## Runnable starters on GitHub

- [Remote MCP Server in Node.js](https://github.com/gregale-dev/mcp-server-node) (Node 22 · Streamable HTTP MCP): Stateless Streamable HTTP MCP server built on the official TypeScript SDK with external OAuth, per-tool scopes, SSE progress, and AGENTS.md.

Browse all starters: https://gregale.dev/templates.md

## Frequently asked questions

### Can my application code read a credential stored on an outbound integration?

No. The credential is sealed at rest and never exposed in the microVM environment or API responses (which only report credential_configured: true). Gregale injects it at the outbound relay after checking method, path, and rate policy.

### Are outbound integrations enabled by default on all accounts?

Outbound integrations are available on Hobby, Pro, and Scale plans as a per-account preview enabled through support. Sealed app secrets, OIDC workload identity, and egress SSRF protection are available independently.

### How does secret rotation interact with Firecracker snapshots?

Updating or rotating any secret automatically invalidates existing snapshots so no restored microVM can boot with old credentials. Passing --restart runs a rolling cold-boot replacement cleanly.

Canonical URL: https://gregale.dev/features/zero-secret-outbound
