Secret Server
× Azure Key Vault
A complete technical walkthrough for hybrid organizations synchronizing External Secrets between Delinea Secret Server and Azure Key Vault. Covers External Vault connector setup, secret template mapping, bidirectional sync rules, conflict resolution, and the shared security model for cross-platform credential delivery.
Architecture Overview — External Vault Integration
In this integration model, Azure Key Vault functions as an External Vault — a secondary, cloud-native credential store that receives and, optionally, originates External Secrets synchronized from Secret Server. Secret Server remains the System of Record for privileged access governance: it owns rotation schedules, dependency tracking, access policies, and audit history.
The Azure Key Vault Sync Connector acts as a translation bridge — it handles field mapping between Secret Server's template model and Azure Key Vault's flat key-value secret format, manages sync state via version tokens, and enforces conflict resolution rules when both systems diverge between sync cycles.
System of Record
Policy Authority
OAuth 2.0
MSAL Token
Field Mapper
Conflict Resolver
Managed Identity
Key Vault RBAC
External Secrets
Cloud Native Delivery
Throughout this guide, External Vault refers to Azure Key Vault as configured in Secret Server's Remote Password Changing → External Vault Connectors panel. An External Secret is any individual secret whose value is stored in or synchronized with that External Vault, with Secret Server retaining the canonical metadata record.
Prerequisites
All prerequisites must be validated in both environments before configuring the External Vault connector. Incomplete setup is the primary cause of failed initial External Secret synchronization.
- Secret Server 11.2+ with Professional or Platinum edition
- Azure Key Vault Sync Connector add-on installed (v3.2+)
- Service account with
Administer External Vault Connectorsrole permission - Distributed Engine installed if Secret Server is hosted on-premises
- Audit logging enabled for External Secret access events
- TLS certificate valid (not self-signed) on all engine nodes
- Azure subscription with Key Vault resource provisioned in target region
- Azure AD App Registration created for the External Vault connector
- App Registration granted
Key Vault Secrets OfficerRBAC role on target vault - Client certificate or managed identity credential configured (not client secret)
- Azure Monitor diagnostic logs enabled and routed to Log Analytics Workspace
- Key Vault soft-delete and purge protection enabled (required for conflict recovery)
- Azure Policy preventing vault access policy model (enforce RBAC authorization model)
- Outbound HTTPS (443) from Distributed Engine to
<vault-name>.vault.azure.net - Outbound HTTPS (443) to
login.microsoftonline.comfor MSAL token acquisition - Outbound HTTPS (443) to
management.azure.comfor ARM operations - If using Private Endpoint: DNS override configured for vault FQDN to private IP
- Key Vault network firewall configured to allow engine subnet or Private Endpoint only
Configuring the Azure Key Vault Sync Connector
The External Vault connector is configured in three phases: Azure AD identity setup, Key Vault RBAC assignment, then connector registration within Secret Server's External Vault panel.
Phase 1 — Azure AD App Registration & Credential
Create the App Registration that the External Vault connector will use to authenticate to Azure Key Vault. Use a certificate credential — not a client secret — to avoid credential sprawl.
# Create the App Registration for the External Vault connector az ad app create \ --display-name "SecretServer-ExternalVault-Connector" \ --sign-in-audience "AzureADMyOrg" # Create a self-signed cert for connector auth (or use enterprise PKI) az ad app credential reset \ --id "<APP_OBJECT_ID>" \ --cert "@/path/to/connector.crt" \ --append # Create a service principal for the App Registration az ad sp create --id "<APP_CLIENT_ID>" # Assign Key Vault Secrets Officer at vault scope az role assignment create \ --role "Key Vault Secrets Officer" \ --assignee "<APP_CLIENT_ID>" \ --scope "/subscriptions/<SUB>/resourceGroups/<RG>/providers/Microsoft.KeyVault/vaults/<VAULT>"
Azure Key Vault access policies are a legacy authorization model. Always configure the vault to use Azure RBAC. Access policies cannot be scoped to individual secrets — any permitted identity can access all secrets in the vault, violating least-privilege for External Secret access.
Phase 2 — External Vault Registration in Secret Server
Admin → Configuration → External Vault Connectors → Add New. Select Azure Key Vault from the connector type list. Name the connector using a convention that reflects the vault environment, e.g. akv-prod-eastus.https://<vault-name>.vault.azure.net. For Distributed Engine deployments, select the engine pool that has network access to the vault.nextLink pagination for efficient incremental pulls.<prefix>-<ss-secret-id> in Key Vault. Enable Auto-Tag External Secrets to have the connector inject metadata tags (ss-managed, ss-template, ss-folder) onto every synced External Secret.GetSecret probe, and a tag write test. All must succeed. Click Activate. The connector enters Initial Sync state and begins pushing External Secrets.{
"connectorType": "AzureKeyVault",
"displayName": "akv-prod-eastus",
"tenantId": "<AZURE_TENANT_ID>",
"clientId": "<APP_CLIENT_ID>",
"keyVaultUrl": "https://<vault-name>.vault.azure.net",
"authMethod": "Certificate", // Certificate | ManagedIdentity
"syncMode": "Bidirectional", // Bidirectional | PushOnly | PullOnly
"syncIntervalSeconds": 300,
"deltaSync": true,
"externalSecretPrefix": "ss-prod",
"autoTagExternalSecrets": true,
"conflictResolution": "SecretServerWins", // SecretServerWins | AzureWins | Manual
"enginePoolId": 3
}
Mapping Secret Templates to External Vault Secret Types
Secret Server organizes credentials using typed Secret Templates with named fields. Azure Key Vault stores External Secrets as flat name/value pairs with optional JSON content types. The connector's External Vault Template Mapper serializes SS template fields into structured JSON for AKV, and deserializes them back during pull operations.
Built-In Template Mappings
username, password, domainusername, password, private_keyserver, database, username, passwordclientId, clientSecret, tenantIdurl, username, passwordDefining a Custom External Vault Template Mapping
# External Vault Template Mapping for Oracle Service Account external_vault_template_maps: - ss_template: "Oracle Service Account" external_vault: "akv-prod-eastus" "external_secret_prefix": "oracle" # results in "oracle-{ss-id}" sync_direction: bidirectional content_type: "application/json" field_map: - ss_field: "Username" akv_key: "username" sensitive: false - ss_field: "Password" akv_key: "password" sensitive: true # SS wins on conflict for sensitive fields - ss_field: "Server" akv_key: "host" sensitive: false # AKV wins on conflict for infra fields - ss_field: "Port" akv_key: "port" type_coerce: string # AKV stores all values as strings external_secret_tags: environment: "production" ss-managed: "true" # required for pull filter ss-template: "oracle-service-account"
Use <template-short>-<ss-secret-id> as the External Secret name in Azure Key Vault. Key Vault secret names must match ^[0-9a-zA-Z-]+$ — no underscores, spaces, or slashes. Avoid encoding folder hierarchy in the name; use tags instead. Example: oracle-4821, ad-svc-7703.
Bidirectional Synchronization Rules
The External Vault sync engine follows a deterministic rule set to decide the direction, timing, and content of each External Secret synchronization cycle. Understanding these rules is essential for predicting system behavior under concurrent modification scenarios.
External Secrets are pushed to Azure Key Vault when:
- A secret is created or field-edited in Secret Server (event-driven webhook)
- A Remote Password Change (RPC) rotation completes successfully in SS
- A secret is moved into a folder governed by an External Vault sync rule
- The scheduled full-sync interval fires and SS version is newer than AKV version
- An operator manually triggers sync from
Admin → External Vault → Force Sync
Only fields explicitly declared in the External Vault Template Map are pushed. Unmapped fields (e.g., notes, custom metadata, check-out history) are never written to the External Vault. External Secret tags are always pushed/updated on every sync cycle regardless of value changes.
External Secrets are pulled from Azure Key Vault into Secret Server when:
- An Azure Event Grid subscription delivers a
SecretNewVersionCreatedevent (near real-time) - Delta sync poll detects a version newer than the stored
ss-sync-versiontag value - Operator triggers a Pull from
Admin → External Vault → Import External Secrets
The connector pulls only External Secrets tagged with ss-managed: true. Any Azure Key Vault secret without this tag is invisible to the pull engine, preventing accidental import of non-SS-managed vault contents. Never remove this tag from External Secrets managed by the connector.
The connector tracks External Secret version state using a combination of Azure Key Vault's native version IDs and SS-managed tags written to each External Secret:
# Tags injected by connector onto every External Secret in AKV ss-managed: "true" ss-secret-id: "4821" ss-template: "oracle-service-account" ss-folder-path: "Production/Oracle/East" ss-sync-version: "83" # SS internal version counter ss-last-synced: "2026-04-02T14:33:09Z" ss-connector-id: "akv-prod-eastus"
The ss-sync-version tag is compared against Secret Server's internal version number on each poll. A mismatch triggers conflict detection logic before any write is performed.
# /etc/ss-engine/akv-throttle.ini [azure_key_vault] max_requests_per_10s = 2000 # AKV default service limit burst_capacity = 500 # token bucket burst retry_policy = "exponential" retry_max_attempts = 5 retry_base_delay_ms = 1000 [sync_batching] external_secrets_per_batch = 25 batch_interval_ms = 400 parallel_template_workers = 4 # concurrent template map workers delta_page_size = 25 # AKV list page size
Handling Sync Conflicts
A sync conflict occurs when an External Secret is modified in both Secret Server and Azure Key Vault between polling cycles. The connector detects conflicts by comparing the AKV secret's ss-sync-version tag against Secret Server's current version counter before committing any write.
Scenario: Secret Server completes a scheduled Remote Password Change (RPC) and pushes a new External Secret version to AKV. Simultaneously, an Azure automation runbook independently updates the same secret value in AKV via SetSecret.
Detection: On next poll, connector sees AKV version is newer than ss-sync-version tag AND Secret Server version is also newer than the last successful sync point — a true write-write conflict.
Default Resolution (SecretServerWins): The SS-rotated value is written to AKV as the current version. The AKV-originated value is preserved as a prior version in Key Vault's automatic version history (never deleted, retrievable via version-specific URI). An ss-conflict-overwritten tag is added to the superseded AKV version for audit purposes.
Any Azure workload that fetched the AKV-originated External Secret before conflict resolution may hold a stale credential until its cache TTL expires. Mandate short cache TTLs (≤ 60 seconds) for all consumers of External Secrets managed by this connector.
Scenario: An infrastructure team updates the host field in AKV (server migrated) while Secret Server rotates the password field. Both changes are legitimate and non-overlapping.
Detection: Field-level diff shows disjoint field modification sets — no single field was changed in both systems.
Resolution (Merge): The connector performs a smart merge. Fields marked sensitive: true in the template map (passwords, keys, tokens) are governed by SS. Fields marked sensitive: false (host, port, database, URL) are governed by AKV. The merged External Secret is written back to both systems.
conflict_resolution: default_authority: secret_server merge_enabled: true sensitive_field_winner: secret_server infra_field_winner: azure_key_vault unresolvable_action: quarantine_and_alert alert_channel: "azure-monitor-webhook"
Scenario: An Azure Key Vault External Secret is soft-deleted (by a cleanup script, policy, or operator error) while the corresponding secret remains active in Secret Server.
Detection: On next poll, connector receives a 404 Not Found or detects the secret in AKV's Deleted Secrets state.
Resolution: Secret Server's presence wins. The connector calls RecoverDeletedSecret via the AKV API and then overwrites the recovered External Secret with the current SS value. A SYNC_CONFLICT_RECOVERED event is logged and an Azure Monitor alert is triggered.
If soft-delete recovery fails (purge protection window exceeded), the connector creates a new External Secret with the same name prefix and current SS value, and an alert escalates to the External Vault admin queue.
Scenario: A secret is decommissioned and deleted from Secret Server. The corresponding External Secret still exists in Azure Key Vault.
Resolution: The connector does not automatically delete the External Secret from AKV. Instead, it tags the AKV secret with ss-decommissioned: true and ss-deleted-at: <timestamp>, then moves it to a configurable quarantine tag group. Operators must explicitly confirm AKV deletion via Admin → External Vault → Decommissioned Secrets. This prevents data loss from accidental SS deletions.
Scenario: An Azure governance team applies additional tags to External Secrets in AKV (e.g., data-classification: confidential, cost-center: eng-infra) for compliance or billing purposes.
Resolution: The connector preserves all tags whose keys do not begin with the ss- prefix. Non-SS tags are treated as Azure-owned metadata and are never overwritten during sync. This enables parallel governance — Secret Server controls ss-* tags; Azure teams control all other tags.
Security Model for Cross-Platform Credential Sharing
The integration's security architecture ensures that External Secret values never traverse the network in plaintext, access is governed by least-privilege identities on both platforms, and every operation produces a correlated, tamper-evident audit record across both systems.
Key Vault Secrets Officer, scoped to the specific Key Vault resource — not the subscription or resource group. It cannot create or delete vaults, access certificates or keys, or read secrets it did not create. Azure RBAC deny assignments can further restrict the connector's scope to only the ss-prod-* External Secret name prefix.ss-correlation-id is injected into the AKV request's x-ms-client-request-id header, enabling cross-platform query correlation for incident response.Shared Responsibility Boundary
┌────────────────────────────────┬──────────────────────┬──────────────────────┐ │ Domain │ Secret Server │ Azure Key Vault │ ├────────────────────────────────┼──────────────────────┼──────────────────────┤ │ Credential lifecycle / RPC │ ✓ Owner │ Replica │ │ Access policy & check-out │ ✓ Owner │ IAM complement │ │ Native cloud app delivery │ Via External Secret │ ✓ Owner │ │ Key / cert custody (HSM) │ AES-256 at-rest │ ✓ Owner (FIPS HSM) │ │ Rotation scheduling │ ✓ Owner (RPC) │ Triggered by push │ │ Audit trail — PAM events │ ✓ Owner │ Correlated │ │ Audit trail — API plane │ Correlated │ ✓ Owner (CloudTrail) │ │ Conflict resolution authority │ ✓ Configurable │ Field-level override │ └────────────────────────────────┴──────────────────────┴──────────────────────┘
Knowledge Check
Validate your understanding before deployment. Each question covers a key concept from this guide.
ss-sync-enabled: truess-secret-id: <id>ss-managed: truesync-direction: pullss-managed: true are visible to the pull engine. This prevents accidental import of unmanaged vault contents into Secret Server.host field (server migration); Secret Server rotated the password. Both fields are in the template map. What happens?host change is discardedpassword (sensitive field); AKV wins host (infra field)sensitive: true fields are owned by Secret Server; sensitive: false infrastructure fields can be updated by AKV. The merged value is written to both systems.RecoverDeletedSecret to restore the AKV secret, then overwrites it with the current SS valueSYNC_CONFLICT_RECOVERED alert is sent to the External Vault admin queue.Deployment Checklist
Check off every item before promoting the External Vault connector to production. This tracks completion within your current session.
Azure Infrastructure Hardening
- Key Vault configured with Azure RBAC authorization model (not access policies)
- Connector service principal has only
Key Vault Secrets Officer— no broader roles - Private Endpoint deployed; public network access disabled on the Key Vault
- Soft-delete enabled (90-day retention) and purge protection enabled on vault
- Azure Monitor diagnostic logs routed to Log Analytics Workspace
- Azure Policy in place to enforce
ss-managedtag on all connector-created secrets - Event Grid subscription configured for
SecretNewVersionCreatedevents (near-RT pull)
Secret Server Configuration
- External Vault connector connection test passes all three checks (MSAL, GetSecret, Tag write)
- External Vault Template Maps validated against all in-scope secret templates in non-production
- Conflict resolution policy set and reviewed by security team (
SecretServerWinsdefault) - External Secret prefix naming convention documented and applied to all template maps
- Pull filter (
ss-managedtag) verified to be injected on all connector-pushed External Secrets
Operational Readiness
- Runbook created for manual conflict resolution and quarantine queue management
- Azure Monitor alerts configured for: sync failures, conflict events, quota throttling
- Rollback procedure documented (disable connector, restore prior AKV version)
- Consumer application teams informed of max External Secret cache TTL (≤ 60s)
- Cross-platform audit log correlation query validated in Log Analytics
- Connector certificate rotation scheduled in Secret Server RPC (90-day cycle)