Export audit evidence¶
Workspace context¶
Use export audit evidence in a scoped workspace and verify the result with tokens records. Select a workspace with representative test data and record the active revision before you start. A response from a different workspace can look valid even when it contains none of the expected records.
Start in a preview workspace with a dedicated service identity. Record its current permissions, run the example against a single resource, and confirm the result in the audit stream before changing the production configuration.
Read the baseline¶
Request the first page of tokens using the v2 endpoint. Supply the organization explicitly on every request. Load the key from your shell environment and keep the expanded command out of build logs.
curl --fail-with-body "https://api.boundarykit.com/v2/tokens" -H "X-API-Key: $BKIT_KEY" -H "X-Organization-Id: $BKIT_ORG"
const result = await fetch("https://api.boundarykit.com/v2/tokens", {headers: {"X-API-Key": process.env.BKIT_KEY!, "X-Organization-Id": process.env.BKIT_ORG!}});
if (!result.ok) throw Error(String(result.status));
console.log(await result.json());
import os, requests
response = requests.get("https://api.boundarykit.com/v2/tokens", headers={"X-API-Key": os.environ["BKIT_KEY"], "X-Organization-Id": os.environ["BKIT_ORG"]}, timeout=10)
response.raise_for_status()
print(response.json())
Compare the returned identifiers with the records you expect to see in this workspace. An empty result is a successful read. Verify the workspace selection before creating a replacement record or changing a policy.
Verify the result¶
Repeat the read with a credential scoped to a separate test organization. Check the response status before processing the body. Preserve the workspace identifier and response time alongside the revision so another operator can reproduce the observation.
| Response | Operator action |
|---|---|
| 200 | Inspect the returned tokens records. |
| 403 | Verify the organization and identity scope. |
| 503 | Retry the read after a bounded delay. |
Warning
Keep credentials out of the evidence bundle. Save a request identifier and a redacted response.
For a walkthrough of the service boundary, see Runtime architecture.
Acceptance check¶
Bound the export by workspace and time window. Run the check with a known input and save the observed result beside the configuration revision. Repeat after promotion using the same input and compare both records.