Create and revise secret bindings¶
You end up with an Active workspace SecretBinding that names one external
secret through an organization integration, ready for projects to map their
consumers to. Revising it later creates a new revision that new project
applies pick up, while running releases keep the revision they pinned.
Prerequisites¶
- Effective
flow.createin the workspace:owner,adminordeveloper. - An
Activeintegration that admits the workspace and the location of the secret. - The secret's reference from your platform team, or an opaque handle that your manager-side enterprise broker maps.
1. Write the binding¶
Example, for a Vault secret:
apiVersion: xratu.io/v1
kind: SecretBinding
metadata:
name: customer-facing-model
spec:
integration: corp-vault-production
adapterProfile: vault_openbao
source:
remoteRef:
mount: kv
path: payments/openai
property: api_key
versionPolicy:
mode: currentAtFirstResolution
allowedProfiles: [material]
allowedPurposes: [runtime_auth]
Use externalBinding: payments-primary-model in place of remoteRef when the
organization keeps paths and ARNs out of Xratu. Keep binding files out of
command-line flags and shell history; apply them from a file.
2. Apply and activate¶
xratu config set organization acme
xratu config set workspace payments
xratu secret apply binding ./customer-facing-model.yaml
Example output:
3. Verify¶
Example output:
name customer-facing-model
active revision 1
integration corp-vault-production
source kind remoteRef
allowed profiles material
state Active
The reference itself is redacted from ordinary output.
4. Revise the binding¶
Edit the file, for example to point at a new path, and apply it again. The
binding gets revision 2 in Draft; activate it:
xratu secret apply binding ./customer-facing-model.yaml
xratu secret activate binding customer-facing-model 2
Running project releases keep revision 1 until the project is applied again. Re-applying unchanged content returns the existing revision.
When it fails¶
| Symptom | Cause | Fix |
|---|---|---|
| Refused: outside the integration's scope | The workspace, locator or operation is not admitted by the integration | Ask an organization administrator to revise the integration, or use an admitted location |
| Refused: wildcard, relative segment or interpolation | The reference is not one exact location | Give the exact reference |
| Refused: material | A value was supplied where a reference belongs | Put the value in your manager and reference it |
Refused: integration not Active |
The integration revision is Draft, Disabled or Revoked |
Bind to the integration's active revision |
| Refused: wrong kind | The file holds an integration or project document | Apply each kind with its own command |
What changed¶
The workspace has an Active binding revision. Releases created after the
activation pin it; earlier releases keep the revision they pinned.