Overview
Token encryption lets HTTP policyencrypt and decrypt actions seal sensitive values (for example OAuth tokens) when they leave the Formal Connector. Sealed values use the formalsealed:v1: envelope format.
The Connector wraps a per-process AES-256 data key with your cloud KMS key encryption key (KEK). This is separate from log encryption keys, which use asymmetric JWE for log fields.
Outcome: You can register a KMS KEK on a Connector and use policy encrypt/decrypt actions.
Prerequisites: A Connector, and a KMS key the Connector role can use.
Configuration via Terraform
Use theformal_connector_token_encryption_key resource. One key per Connector.
- AWS KMS
- GCP KMS
- Azure Key Vault
kms:Encrypt and kms:Decrypt on the CMK.encrypt / decrypt targets and confirm sealed values use the formalsealed:v1: prefix.
IAM requirements
Rotating the KEK
Changingkey_id (or key_provider) on a Connector is a breaking change for already-sealed values. Downstream clients that hold formalsealed:v1: tokens produced under the previous KEK will not be able to decrypt them after the Connector switches to the new KEK. Plan for client re-authentication (or re-issuance of sealed tokens) when you rotate the KEK.
Next Steps
Encrypt MCP OAuth Tokens
Seal Notion MCP OAuth tokens on the Endpoint or Connector
HTTP Policies
Write encrypt and decrypt actions
Log Encryption Keys
Encrypt sensitive fields in logs