APIZDocs

APIZ guide

Limit An Agent To Specific Resources

Temporary Credentials identify the Client; a mandatory Binding Policy decides which normalized resources that Client may use. This is how one upstream connection can expose a smaller repo, bucket, prefix, page, database, account, zone, path, or method boundary to an agent.

Choose An Enforceable Field

Run apiz adapter explain <adapter-id> and use only declared actions and resource fields. Common examples include:

AdapterResource boundary
GitHubresource.owner, resource.repo, branch, issue, or pull request
S3resource.bucket, resource.prefix, object key
Cloudflareaccount or zone id
Notionpage, database, data source, or block id
General APInormalized path plus HTTP action

API Instance hint fields make intended scope reviewable, but are not a replacement for Policy unless the Adapter guide explicitly says routing enforces them.

Web Console

  1. Create a Structured Policy scoped to the adapter.
  2. Select only the required normalized actions.
  3. Add typed resource conditions. For GitHub repo acme/demo, require resource.owner equals acme and resource.repo equals demo.
  4. Set the matching branch to allow and the fallback to deny.
  5. Test the allowed resource, an adjacent resource, an unknown resource, and a dangerous action.
  6. Attach the passing Policy as mandatory to the intended Client Binding.

CLI Definition Example

{
  "type": "structured",
  "adapter_scope": "github",
  "when": {
    "actions": ["github:repo:read", "github:issue:read", "github:pull_request:read"],
    "conditions": [
      {"field": "resource.owner", "op": "equals", "value": "acme"},
      {"field": "resource.repo", "op": "equals", "value": "demo"}
    ]
  },
  "then": {"decision": "allow", "reason": "acme_demo_read_allowed"},
  "otherwise": {"decision": "deny", "reason": "resource_not_allowed"}
}

Publish it through the standard Policy Project lifecycle, run its fixture suite, and attach it with apiz client binding policy add.

Verify And Revoke

Send the same Temporary Credential to an allowed resource and a neighboring resource. Confirm that only the first reaches upstream. Access Logs should show the normalized fields that caused the decision without exposing credentials or protected payloads.

Revoke the Client's Credential Group to stop one runtime. Disable the Binding to stop every credential using that access view. Disable the API Instance only when every Client using the upstream connection must stop.