Protocol and deployment notes · Deployment

Inbound SAML 2.0 encrypted attributes with CarriedKeyName

On this pageSupported profileStore the private keyConfigure through the standard provider APIRollover

Atlas supports a bounded inbound XML Encryption 1.1 profile for SAML 2.0 EncryptedAttribute values. It is intended for partner key rollover and clustered deployments where one response can carry the same data-encryption key for more than one recipient key. The implementation follows CarriedKeyName, Recipient, and ReferenceList/DataReference instead of trying every Atlas private key.

This profile does not change Atlas's zero-trust boundary. Atlas validates the SAML Response or Assertion signature first, binds the exact validated plaintext Assertion by its unique XML ID, and only then resolves a private key from operator-owned Vault custody. Decrypted attributes remain identity input; they do not create an authorization grant and still cross the configured account-link, JIT, group-sync, assurance, session, and policy controls.

Supported profile

Atlas accepts all of the following together:

  • one direct SAML 2.0 EncryptedAttribute under a signature-bound plaintext Assertion/AttributeStatement;
  • one EncryptedData with Type="...#Element" and a single ds:KeyName data key alias;
  • one through 16 sibling EncryptedKey candidates, with no more than 32 encrypted attributes in one assertion;
  • an exact CarriedKeyName match to the data key alias;
  • an exact Recipient match to the Atlas SAML SP entity ID;
  • an exact ReferenceList/DataReference to that EncryptedData ID;
  • a nested ds:KeyName that selects one configured Atlas key, optionally also bound to the configured certificate by SHA-256;
  • RSA-OAEP from XML Encryption 1.1 with SHA-256 and MGF1-SHA256; and
  • AES-256-CBC or AES-128-GCM for the attribute payload.

Atlas uses the first understood recipient key, allowing a retiring key to appear before the current key during rollover. RSA1_5, SHA-1, ambiguous or duplicate XML IDs, mismatched certificate/key pairs, unknown selectors, unbound references, malformed ciphertext, conflicting plaintext attributes, and unavailable Vault custody fail the authentication.

The profile deliberately excludes SAML 1.x, arbitrary XML Encryption transforms, trial decryption across all keys, caller-carried private-key references, and EncryptedAttribute nested inside a whole EncryptedAssertion. Existing whole-assertion processing remains a separate single-SP-key profile.

Store the private key

Write a matching PKCS#1 or PKCS#8 RSA private key to Vault KV. The key must be at least 2048 bits. The management API never accepts the private PEM and never returns the Vault reference.

vault kv put secret/federation/saml/partner-a/decryption \
  private_key=@partner-a-decryption-key.pem

The corresponding reference is:

vault://federation/saml/partner-a/decryption#private_key

Use an Atlas runtime Vault policy that grants read access only to the selected KV path. Do not grant list or wildcard access merely to simplify rollover.

Configure through the standard provider API

Create or update a SAML 2.0 provider with the public certificate and Vault reference. The example omits unrelated optional federation policy fields.

{
  "id": "partner-a",
  "protocol": "saml",
  "name": "Partner A",
  "entityId": "https://idp.partner-a.example/metadata",
  "metadataUrl": "https://idp.partner-a.example/metadata.xml",
  "encryptedAttributeDecryption": {
    "enabled": true,
    "keys": [
      {
        "keyName": "partner-a-decryption-2026",
        "certificatePem": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
        "privateKeyRef": "vault://federation/saml/partner-a/decryption#private_key"
      }
    ]
  }
}

Use the normal governed lifecycle:

  1. POST /api/v1/federation/providers creates a draft, or PUT /api/v1/federation/providers/{providerId} returns an existing provider to draft.
  2. POST /api/v1/federation/providers/{providerId}/validate fetches current IdP metadata and proves that every configured Vault key exists, is current, and matches its certificate.
  3. POST /api/v1/federation/providers/{providerId}/enable repeats validation and atomically builds the active runtime.

Provider reads return only this shape for the decryption profile:

{
  "enabled": true,
  "profile": "CARRIED_KEY_NAME_RSA_OAEP_SHA256_AES256CBC_OR_AES128GCM",
  "keyCount": 1,
  "keys": [
    {
      "keyName": "partner-a-decryption-2026",
      "certificateSha256": "...",
      "certificateSubject": "CN=Partner A",
      "certificateNotAfter": "2027-08-16T00:00:00Z",
      "privateKeyConfigured": true
    }
  ]
}

certificatePem, privateKeyRef, and private key material are never returned. On update, omitting privateKeyRef for an existing keyName preserves the current reference. A new key requires a reference.

Rollover

Add the new certificate and Vault reference while retaining the retiring key, validate, and enable the draft. After the identity provider has stopped emitting the retiring nested key selector, remove it through another update/validate/enable cycle. Atlas re-resolves and certificate-matches all configured material at validation, enablement, process reconstruction, and authentication time.

The retained acceptance receipt is under artifacts/saml-carried-key-name-docker-validation/. It proves the signed SAML flow, rollover selection, negative cryptographic cases, live Vault custody, redacted API output, mismatched-key denial, and key resolution after gateway reconstruction. It is not a named-vendor interoperability, HSM-certification, accreditation, or arbitrary XML Encryption claim.