Configure project auth¶
You end up with an auth.xratu file in your project folder that says which
binding every use of a declared key gets, a CI check that fails when the file
falls out of date, and a deployed project that uses those bindings. Your
project.xratu and workflow files stay as they are.
Prerequisites¶
- The
owner,adminordeveloperrole in the workspace. - Every block, flow and agent the project uses is published.
- The bindings you want to use exist and are
Active, or you can create them. - Each integration those bindings use is
Activewith coverageReady.
1. Map the keys¶
xratu config set organization acme
xratu config set workspace payments
xratu secret configure project ./refunds
The command finds every place the project uses a declared key, including
inside the blocks, flows and agents it uses. Each place is a consumer in
auth.xratu. For each one it:
- keeps a mapping you made before, unchanged;
- asks about a new one: use an existing binding, give one binding to several consumers at once, create a binding, write a binding file for someone else to apply, or leave it for later;
- tells you about consumers that disappeared from the project, and removes them when you confirm.
Before writing anything it shows the plan:
consumers 3
mapped (kept) 1 charge-payment -> stripe-production
mapped (new) 2 customer-model -> customer-facing-model
internal-model -> internal-analysis-model
bindings created 1 internal-analysis-model
stale mappings removed 0
unresolved 0
When you confirm, it creates any new bindings and writes auth.xratu. A new
consumer is never mapped without your confirmation, even when it uses the same
block and key as one you already mapped.
The command checks the project and existing sidecar again after any remote
binding creation and immediately before replacing auth.xratu. If either
changed while the review was open, it refuses the local write; an immutable
binding already created remains unused and the next run recovers it normally.
Generated binding files use safe local filenames and keep the exact binding
name inside the document.
2. Check it, and add the check to CI¶
The check asks nothing and changes nothing. It lists every consumer and its binding, and exits non-zero on any problem in the table that follows. Run it in CI on every change to the project.
3. Deploy¶
Deployment runs the same checks and records which binding revision each consumer uses.
When it fails¶
| You see | Cause | Fix |
|---|---|---|
| Unresolved consumer | A new block, tool or include uses a key that is not mapped | Run configure project and map it |
| Stale or duplicate mapping | The file maps a consumer absent from the project, or maps one twice | Run configure project and confirm the clean-up |
| Project changed | The project changed after auth.xratu was written |
Run configure project again |
| Key meaning changed | A new block release changed what a key means | Map that consumer again |
Binding Disabled or Revoked |
The binding is retired for new deployments | Map to an Active binding |
| No ready integration | No integration that allows this workspace is Active with coverage Ready |
Ask an organization administrator; see Plan and activate a secret integration |
| Approval required | The credential is marked sensitive | See Resolve a secret use that requires approval |
| Unpublished artifact | Something the project uses is not published or pinned | Publish it and pin its version |
| Binding creation refused | Your role cannot create bindings | Let the command write the binding file and give it to someone who can apply it |
If the command stops halfway, run it again. A binding it created but never mapped gives no access to anything.
What changed¶
Your project folder has an auth.xratu file, any bindings you created exist
in the workspace, and the deployed project uses the bindings the file names.