Skip to main content
Prerequisites:
  • Create a Chef Connection
  • Ensure your network security policies allow incoming requests from Infisical to this certificate sync provider, if network restrictions apply.
The Chef Certificate Sync requires the following permissions to be set on the Chef user for Infisical to sync certificates to Chef: data bag read, data bag create, data bag update, data bag delete.Any role with these permissions would work such as a custom role with Data Bag permissions.
Certificates synced to Chef will be stored as data bag items within the specified data bag, preserving both the certificate and private key components as separate fields.
  • Infisical UI
  • API
  1. Navigate to Project > Integrations > Certificate Syncs and press Add Sync. Certificate Syncs Tab
  2. Select the Chef option. Select Chef
  3. Configure the Destination to where certificates should be deployed, then click Next. Configure Destination
    • Chef Connection: The Chef Connection to authenticate with.
    • Data Bag Name: The name of the Chef data bag where certificates will be stored.
  4. Configure the Sync Options to specify how certificates should be synced, then click Next. Configure Options
    • Enable Removal of Expired/Revoked Certificates: If enabled, Infisical will remove certificates from the destination if they are no longer active in Infisical.
    • Preserve Data Bag Item on Renewal: Only applies to certificate renewals. When a certificate is renewed in Infisical, this option controls how the renewed certificate is handled. If enabled, the renewed certificate will update the existing data bag item, preserving the same item name. If disabled, the renewed certificate will be created as a new data bag item with a new name.
    • Include Root CA: If enabled, the Root CA certificate will be included in the certificate chain when syncing to Chef data bags. If disabled, only intermediate certificates will be included.
    • Certificate Name Schema (Optional): Customize how certificate item names are generated in Chef data bags. Use {{certificateId}} as a placeholder for the certificate ID.
    • Auto-Sync Enabled: If enabled, certificates will automatically be synced when changes occur. Disable to enforce manual syncing only.
  5. Configure the Field Mappings to customize how certificate data is stored in Chef data bag items, then click Next. Configure Field Mappings
    • Certificate Field: The field name where the certificate will be stored in the data bag item (default: certificate)
    • Private Key Field: The field name where the private key will be stored in the data bag item (default: private_key)
    • Certificate Chain Field: The field name where the full certificate chain excluding the root CA certificate will be stored (default: certificate_chain)
    • CA Certificate Field: The field name where the root CA certificate will be stored (default: ca_certificate)
Chef Data Bag Item Structure: Certificates are stored in Chef data bags as items with the following structure (field names can be customized via field mappings):
{
  "id": "certificate-item-name",
  "certificate": "-----BEGIN CERTIFICATE-----\n...",
  "private_key": "-----BEGIN PRIVATE KEY-----\n...",
  "certificate_chain": "-----BEGIN CERTIFICATE-----\n...",
  "ca_certificate": "-----BEGIN CERTIFICATE-----\n..."
}
Example with Custom Field Mappings:
{
  "id": "certificate-item-name",
  "ssl_cert": "-----BEGIN CERTIFICATE-----\n...",
  "ssl_key": "-----BEGIN PRIVATE KEY-----\n...",
  "ssl_chain": "-----BEGIN CERTIFICATE-----\n...",
  "ssl_ca": "-----BEGIN CERTIFICATE-----\n..."
}
  1. Configure the Details of your Chef Certificate Sync, then click Next. Configure Details
    • Name: The name of your sync. Must be slug-friendly.
    • Description: An optional description for your sync.
  2. Select which certificates should be synced to Chef. Select Certificates
  3. Review your Chef Certificate Sync configuration, then click Create Sync. Confirm Configuration
  4. If enabled, your Chef Certificate Sync will begin syncing your certificates to the destination endpoint. Sync Certificates

Certificate Management

Your Chef Certificate Sync will:
  • Automatic Deployment: Deploy certificates in Infisical to Chef data bags with customizable field names
  • Certificate Updates: Update certificates in Chef data bags when renewals occur
  • Expiration Handling: Optionally remove expired certificates from Chef data bags (if enabled)
  • Format Preservation: Maintain certificate format during sync operations
  • Field Customization: Map certificate data to custom field names that match your Chef cookbook requirements
  • CA Certificate Support: Include CA certificates in data bag items for complete certificate chain management
Chef Certificate Syncs support both automatic and manual synchronization modes. When auto-sync is enabled, certificates are automatically deployed as they are issued or renewed.

Manual Certificate Sync

You can manually trigger certificate synchronization to Chef using the sync certificates functionality. This is useful for:
  • Initial setup when you have existing certificates to deploy
  • One-time sync of specific certificates
  • Testing certificate sync configurations
  • Force sync after making changes
To manually sync certificates, use the Sync Certificates API endpoint or the manual sync option in the Infisical UI.
Chef does not support importing certificates back into Infisical due to the nature of Chef data bags where certificates are stored as data rather than managed certificate objects.