Skip to content

Getting Started

Overview

Britive Secrets Vault owns credential policy, versioning, rotation schedules, and access governance. Secret synchronization scripts push the current secret value to a downstream store whenever the broker executes a checkout. The Britive platform calls the broker script and injects the secret and configuration as environment variables; the script only writes to the destination — it never calls back to Britive. The downstream store always reflects the latest Britive-managed value.

What you’ll accomplish:

  • Choose a script variant (CLI, curl/REST, or PowerShell) for your destination
  • Wire the script as a broker checkout action
  • Verify the synced value lands in the external store

How It Works

    flowchart TD
    Vault["Britive Secrets Vault<br/>(source of truth: rotation, versions,<br/>access governance, lifecycle)"]
    Sync["sync-to-*.sh / .ps1<br/>(runs on the broker)"]
    AWS["AWS Secrets Manager"]
    Azure["Azure Key Vault"]
    Hashi["HashiCorp Vault (KV)"]
    GCP["GCP Secret Manager"]

    Vault -->|"checkout triggered — Britive injects SECRET_VALUE + config"| Sync
    Sync --> AWS
    Sync --> Azure
    Sync --> Hashi
    Sync --> GCP
  

Each destination ships three variants:

VariantToolsUse when
CLIprovider CLI (aws / az / vault / gcloud)the CLI is already on the broker host
curl / RESTcurl + jq (AWS also needs openssl+xxd)minimal container images, no CLI
PowerShellInvoke-RestMethodWindows or mixed-OS broker hosts

Before You Begin

  • The Access Broker is deployed and connected
  • A secret managed in the Britive Secrets Vault
  • Write access on the destination store, scoped to the specific secret being synced
  • The tools for your chosen variant installed on the broker host

Never log secret values. The scripts log destination names and status only. Scope the destination credentials tightly (write access to one secret), and prefer instance profiles, Workload Identity, and IRSA over long-lived static keys.

Common Variable

VariableDescription
SECRET_VALUEThe value to write — injected automatically by the Britive platform

Destination Configuration

Script: Secret synchronization/aws/sync-to-aws-secrets-manager.sh

VariableRequiredDescription
AWS_SECRET_NAMEYesName or ARN of the target secret
AWS_REGIONYese.g. us-east-1
AWS_PROFILENoNamed CLI profile (CLI variant)
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKENcurl variantStatic / STS credentials
export AWS_SECRET_NAME="my-app/database/password"
export AWS_REGION="us-east-1"
./sync-to-aws-secrets-manager.sh   # SECRET_VALUE injected by Britive

The CLI variant uses the standard AWS credential chain. The curl variant signs requests with AWS Signature V4 (needs openssl and xxd).


Configure in the Broker

Assign the script as the checkout action on the relevant broker resource profile and set the destination variables as broker parameters. SECRET_VALUE is injected automatically.

broker-config.yml
checkout:
  script: sync-to-aws-secrets-manager.sh
  env:
    AWS_SECRET_NAME: "my-app/database/password"
    AWS_REGION:      "us-east-1"

Verify

Trigger a checkout

Check out the profile that runs the sync script (or rotate the source secret in the Britive vault).

Read the destination value

aws secretsmanager get-secret-value \
  --secret-id "my-app/database/password" \
  --query SecretString --output text

The returned value matches the current Britive-managed secret.

Confirm no secret leaked to logs

Check the broker logs — they show destination and status, never the value of SECRET_VALUE.


Troubleshoot

SymptomCauseFix
AccessDenied writing the secretDestination credentials too narrow or wrongGrant write on the specific secret only; verify the role/principal
curl variant fails to sign (AWS)openssl/xxd missingInstall both, or switch to the CLI variant
Value written but app sees old valueApp caches the secretConfirm the app re-reads on rotation; check the store’s version history
Empty value writtenSECRET_VALUE not injectedConfirm the script runs as a Britive checkout action, not standalone

Next Steps

Last updated on