Skip to main content
Browse docs
By Audience
Getting Started
Configuration
Use Cases
IDE Integration
Third-Party Integrations
Engineering Cache
Console
API Reference
Gateway
Workflow Guides
Templates
Providers and SDKs
Industry Guides
Advanced Guides
Browse by Role
Deployment Guides
In-Depth Guides
Tutorials
FAQ

Pack Metadata and Versioning

Every policy-config.yaml starts with a pack: block that identifies the configuration, controls its lifecycle, and maps it to a Keeptrusts configuration entity in the API.

Use this page when

  • You need the exact command, config, API, or integration details for Pack Metadata and Versioning.
  • You are wiring automation or AI retrieval and need canonical names, examples, and constraints.
  • If you want a guided rollout instead of a reference page, use the linked workflow pages in Next steps.

Primary audience

  • Primary: AI Agents, Technical Engineers
  • Secondary: Technical Leaders

Quick reference

pack:
id: "cfg_finance_prod"
name: "finance-compliance"
version: "2.1.0"
enabled: true
author: "platform-team"
description: "SOX/PCI-compliant gateway for the finance department"

Pack fields

FieldTypeRequiredDefaultConstraintsDescription
namestringyes1–200 charsHuman-readable configuration name
versionstringyesSemVer patternSemantic version (MAJOR.MINOR.PATCH)
enabledbooleanyesMaster kill switch for the entire config
idstringno(derived from name)1–200 charsMachine-readable identifier, maps to configurations.id in the API
authorstringno""max 200 charsAuthor or team name
descriptionstringno""max 2000 charsFree-form description

Required fields

The gateway refuses to load a config without name, version, and enabled:

# ✅ Minimal valid pack
pack:
name: "my-gateway"
version: "1.0.0"
enabled: true
# ❌ Missing version — validation error
pack:
name: "my-gateway"
enabled: true

The id field

The id field is a stable machine-readable identifier. When omitted, the gateway derives it from name. This ID maps directly to the configurations.id column in the API database (which is TEXT, not UUID).

pack:
id: "cfg_prod_v2" # stable across renames
name: "Production Gateway" # can change without breaking references
version: "2.0.0"
enabled: true

Use an explicit id when:

  • The config name may change over time
  • Multiple configurations share a naming pattern
  • Git-based config sync relies on stable identifiers
  • You need a predictable reference for API calls

Semantic versioning

The version field follows SemVer format. The gateway uses it for:

  • Reload detection — A version change triggers a config reload on deployed gateways
  • Audit logging — Events and traces include the config version for traceability
  • Console display — The management console shows the version alongside the config name
pack:
name: "my-gateway"
version: "1.0.0" # initial release
# version: "1.1.0" # added new policy (minor)
# version: "2.0.0" # removed a provider (breaking)
enabled: true

When to bump versions

ChangeBumpExample
Add a new policy to the chainMinor1.0.01.1.0
Adjust thresholds or rate limitsPatch1.1.01.1.1
Remove a provider or change routing strategyMajor1.1.12.0.0
Change enabled to falsePatch2.0.02.0.1

The enabled flag

Setting enabled: false disables the entire configuration. The gateway still loads and validates the config, but no policies execute — requests pass through to the upstream provider without enforcement.

pack:
name: "maintenance-mode"
version: "1.0.0"
enabled: false # all policies bypassed

This is useful for:

  • Temporary maintenance windows
  • Debugging policy issues
  • Gradual rollouts (disable → deploy → enable)

Config SHA-256 hashing

The gateway computes a SHA-256 hash of the entire config file on load. This hash is used for:

  • Drift detection — Comparing deployed config against the source of truth
  • Reload decisions — Only reload if the hash changes
  • Audit trail — The hash is included in decision events

You don't need to manage this hash — it's computed automatically.

Mapping to API configurations

When using Git-based config sync or the management console:

YAML fieldAPI columnNotes
pack.idconfigurations.idTEXT, not UUID
pack.nameconfigurations.nameDisplay name
pack.versionconfiguration_versions.versionLatest version
pack.enabledconfigurations.enabledRuntime toggle
pack.descriptionconfigurations.descriptionMetadata

Complete example

pack:
id: cfg_healthcare_hipaa
name: Healthcare HIPAA Gateway
version: 3.2.1
enabled: true
author: security-team@example.com
description: |
HIPAA-compliant gateway for healthcare workloads.
Enforces PHI detection, audit logging, and zero
data retention on all upstream providers.
providers:
targets:
- id: azure-hipaa
provider: azure
model: gpt-4o
base_url: https://hipaa-resource.openai.azure.com
secret_key_ref:
env: AZURE_OPENAI_KEY
policies:
chain:
- hipaa-phi-detector
- audit-logger

For AI systems

For engineers

  • name, version, and enabled are required; the gateway refuses to load a config without them.
  • Use an explicit id when the config name may change or when Git-based sync relies on stable identifiers.
  • Bump version on every config change: minor for added policies, patch for threshold adjustments, major for provider removals.
  • The gateway computes a SHA-256 hash of the config file for drift detection and reload decisions.
  • enabled: false disables all policy enforcement while keeping the config loaded and validated — useful for maintenance windows.

For leaders

  • Pack metadata provides version-controlled identity for every gateway configuration, enabling auditability and rollback.
  • The enabled flag provides an instant kill switch for all policy enforcement without redeploying infrastructure.
  • SemVer versioning maps config changes to standard release practices, supporting change advisory boards and approval workflows.
  • The id field maps directly to the API’s configuration entity, enabling programmatic management via the management console or API.

Next steps