# Configure protected connection profiles

Reuse credential references, validate explicit read-only checks and reconcile uncertain OAuth refresh safely.

Canonical URL: https://opennodeflow.dev/wiki/connections/
JSON reference: https://opennodeflow.dev/wiki/connections/index.json
Source snapshot: 2026-10-23

A connection profile reuses protected credential references and nonsecret account configuration across nodes. Create it in Connections, then select it in a node inspector. The graph stores the profile reference under `config.$connection`; selecting a profile does not rewrite provider code or upgrade immutable pins.

## Secrets, aliases and defaults

Profiles reference encrypted Settings secrets; they do not store literal credentials in the graph. Add/rotate the underlying secrets in Settings. Supported forms include bearer token, API key, Basic credentials and an existing OAuth refresh grant.

Configuration defaults fill absent node keys, while explicit instance values win. Defaults cannot set execution policy keys or literal credential fields. Secret bindings map the names existing integration code expects to the profile's chosen credential keys. Verify custom secret-name overrides match the selected profile bindings.

Trusted TypeScript/JavaScript code can read the selected profile through `context.connections.get()`. Python has its corresponding helper and PowerShell receives `$context.connection`. These execution values are not exposed by ordinary profile readback.

## Configured is not authenticated

Configured means required secret references exist. It does not prove provider authentication or authority for every operation. A profile can fail before user code when missing, expired or refresh-blocked.

Choose an intentionally read-only GET endpoint for the explicit check action. ONF sends the configured authorization to that exact address, rejects redirects, discards the body and stores time/status/HTTP status. Normal check URLs use HTTPS without embedded credentials, query or fragment; loopback HTTP exists for isolated tests.

A successful check establishes that request's HTTP success. It does not obtain consent or prove a later write's permission. Rotating a referenced secret makes the prior check stale.

## OAuth refresh

The profile supports refreshing an existing grant; it does not run an OAuth consent flow or mint service-account credentials. Configure token endpoint, destination/refresh secret references, client ID and the supported authentication method. Avoid two token managers independently refreshing the same rotating grant.

Refresh makes one explicit attempt. Opt-in refresh before execution runs when known expiry is within 60 seconds. ONF persists a block before dispatch and serialises profiles sharing a refresh-secret reference. Failed, interrupted or malformed refresh retains the block across restart.

Reconcile the provider grant and stored credentials, then explicitly acknowledge that reconciliation to clear the block. ONF never automatically repeats an uncertain rotation. Access/refresh values from a successful rotation are persisted together.

## Worker admission and recovery

Execution resolves current credentials after worker admission, so queue waiting does not capture an expired token. Connection preparation uses the admitted slot and counts toward container deadlines. Preparation failure releases the slot and does not start user code.

Profile edits/checks/refresh/deletion use revision guards. Deletion keeps the underlying secrets and rejects active references, including retained waiting snapshots. Portable graph exports keep the profile ID but do not provision credentials on another host.

Use [backup/restore](/wiki/backup-restore/) for protected metadata and [integration setup](/wiki/integration-setup/) for actual provider scopes. Never test a profile by sending an unintended business mutation.

---

## Documentation provenance

- `docs/CONNECTIONS.md`
- `docs/RUNTIMES-AND-WORKERS.md`

This page describes maintained source, not a live inventory or an authorization to perform actions.
