Skip to main content

Review and restore a binding change

Task

Access Bindings and Runtime Bindings are live. When you edit one, the change applies at once to every Blueprint and workload that uses it, including workloads in Enforce. AIControls shows you where the binding is used and what changes, you confirm, and the change is recorded in the audit log and in the binding's history. You can restore any earlier revision.

Self-managed installations only

Workload Trust is available only in private, self-managed AIControls installations, on premises or in a cloud cluster that you run. It needs a dedicated cluster that you run, with Kyverno, Kyverno Runtime, and cluster OIDC and RBAC access in place. Nirmata-hosted (SaaS) workspaces don't include it. See Feature availability.

Before you begin​

  • You need an administrator session.
  • Know which binding you're changing. The Used by text on a binding, and on the Blueprint editor's Access and Runtime sections, shows how many Blueprints and workloads use it.

Edit a binding​

  1. Open the binding. For an Access Binding, go to Setup → Settings → Access Bindings, open the row's actions menu, and select Edit. You can also select Edit binding in a Blueprint's Access section. For a Runtime Binding, go to Settings → Workloads, select the binding in the Runtime Bindings card, or select Edit binding in a Blueprint's Runtime section.
  2. Make your change. The Name is read-only, because a binding's name is fixed after you create it.
  3. Select Preview impact. A dialog shows what the impact preview shows.
  4. Select Confirm and save. AIControls applies the change to every workload that uses the binding and appends a revision to the binding's history.

If the binding, or the workloads that use it, change after you preview, the dialog shows The impact changed since you previewed it and the refreshed preview. Review it and select Confirm and save again.

What the impact preview shows​

The preview starts with the number of Blueprints and workloads that use the binding, for example "Used by 2 Blueprints, 5 workloads." Sentences below it sum up the change, for example "Gives 3 Enforce workloads new access" or "Changes runtime rules on 2 enforced workloads." The preview also lists the Blueprints and counts the people who are subjects of the binding. A preview warns when an edit leaves Enforce workloads with no grant, so all of their calls are blocked. It then lists each workload the change reaches:

ColumnWhat it shows
Workload and BlueprintThe workload, and the Blueprint through which it uses the binding.
ModeAudit or Enforce.
Runtime enforcedWhether runtime enforcement is enabled for the workload.
GrantsThe grants the change adds and removes for the workload, and the gate outcomes it changes.
Runtime rule diffThe compiled network, file, and exec rules before and after, computed against the workload's running pods now.
RisksFor example, kubectl exec allowed, Unrestricted egress, or a granted MCP tool classified above the data classification ceiling.

The preview doesn't ask for an acknowledgment, and it doesn't block a save. It's the record of what you confirmed. Read the Risks and Runtime rule diff columns before you confirm a change that widens access or turns on Allow kubectl exec.

View a binding's history​

Every create, edit, and restore appends a revision to the binding's history. The history is a record: no workload is tied to an old revision.

  1. Open the row's actions menu and select History. For the environment defaults, select History on the Environment defaults card. The drawer lists each revision with its Change type (Edit, Restore, Seed, or Migration), who made it, and when.
  2. Expand a revision to see what restoring it would change, as a diff against the current binding.

Blueprints don't have a history. Use the configuration audit to review Blueprint changes.

Restore an earlier revision​

  1. Open the history and find the revision to return to.
  2. Select Restore. AIControls previews the impact of changing the current binding to that revision, the same preview as an edit. A restore doesn't change the binding's name.
  3. Review the preview and select Confirm and restore.

The restore appends a new revision with the source rollback. It doesn't rewrite or delete the revisions in between.

Delete a binding​

You can't delete a binding that a Blueprint selects. AIControls refuses the delete with 409 binding_in_use and lists the Blueprints. Select a different binding in each of those Blueprints, and then delete the binding.

When workload overrides reference an Access Binding that no Blueprint selects, deleting it removes those workloads' grants. AIControls answers 409 binding_has_dependents with the dependents and a confirm value. Send the delete again with ?confirm=<value> to accept it.

Use the API​

RouteWhat it does
POST /api/v1/access-bindings/{id}/previewPreviews an edit with {"binding": {...}}, or a restore with {"restoreRevision": N}.
PUT /api/v1/access-bindings/{id}Saves an edit. Send the binding and the previewHash.
GET /api/v1/access-bindings/{id}/history and .../history/{rev}Lists revisions and reads one.
POST /api/v1/access-bindings/{id}/history/{rev}/restoreRestores a revision. Send expectedRevision (the current revision) and the previewHash.
DELETE /api/v1/access-bindings/{id}Deletes a binding that no Blueprint selects.
GET and POST /api/v1/workload-runtime-bindingsLists and creates Runtime Bindings.
GET, PUT, and DELETE /api/v1/workload-runtime-bindings/{id}Reads, edits, and deletes a Runtime Binding. A PUT sends expectedVersion, levels, optional description and environment, and the previewHash. A DELETE sends ?expectedVersion=.
POST /api/v1/workload-runtime-bindings/{id}/previewPreviews an edit, or a restore with {"restoreRevision": N}.
GET /api/v1/workload-runtime-bindings/{id}/history and .../history/{rev}Lists revisions and reads one.
POST /api/v1/workload-runtime-bindings/{id}/history/{rev}/restoreRestores a revision. Send expectedVersion and the previewHash.
GET and PUT /api/v1/workload-runtime-environmentReads and edits the cluster's environment defaults. A PUT sends environment, expectedRevision, and the previewHash.
POST /api/v1/workload-runtime-environment/previewPreviews an edit with {"environment": {...}}, or a restore with {"restoreRevision": N}.
GET /api/v1/workload-runtime-environment/historyLists the environment defaults' revisions.
POST /api/v1/workload-runtime-environment/history/{rev}/restoreRestores a revision. Send expectedRevision and the previewHash.

A write needs the previewHash from the matching preview when a Blueprint or a workload uses what the write changes. An Access Binding that only people use, with no Blueprint and no registration, needs no previewHash. The preview still counts the people.

A 409 response from an impact write carries code and, for impact_unconfirmed and impact_changed, the current preview in preview:

codeCause
impact_unconfirmedThe write has no previewHash, and a Blueprint or a workload uses what it changes. Preview the change, review it, and send the hash.
impact_changedThe previewHash is stale: the binding, or the workloads that use it, changed after the preview. The response carries the current preview. When a change lands while the write runs, the response has no preview. Preview again.
conflictThe expectedVersion or expectedRevision is stale. Read the current value and retry.
binding_name_takenA binding with that name exists.
binding_in_useA Blueprint selects the binding, so it can't be deleted. The response lists the Blueprints.
binding_has_dependentsWorkload overrides reference the Access Binding. Send the delete again with ?confirm= and the response's confirm value.
owned_bindingA workload owns the Access Binding. Change it by promoting a recommendation on the workload.
recommendation_mismatchA Runtime Binding PUT with fromRecommendation names a workload that doesn't use that binding.

A 400 response uses these codes:

codeCause
binding_name_immutableAn Access Binding PUT changes the binding's name. Names are fixed after creation.
invalid_runtime_bindingThe Runtime Binding's levels, description, or environment values are invalid.
invalid_environmentThe environment defaults are invalid.

AIControls records access_binding.updated, access_binding.restored, runtime_binding.created, runtime_binding.updated, runtime_binding.restored, runtime_binding.deleted, and workload_runtime_environment.updated in the configuration audit, with the impact counts. See Review the configuration audit.