ODOCK.AI
Security & GuardrailsTutorials

Verify Enforcement

Confirm which guardrail ran and why a request was allowed, limited, redacted, or blocked.

Verify Enforcement

After you configure guardrails, verify that they work from the caller's point of view and from Odock's records.

Send a normal request that should be allowed.

Use an API key with the correct model or MCP access grant.

Open the API key detail page and review Usage Records.

Confirm the request id, status, provider, model or MCP server, latency, token or byte usage, and cost are recorded.

Trigger one controlled block.

Examples:

ControlSafe test
Requests per minuteSet a very low API key RPM and send repeated requests.
Max tokensSet max tokens below the test request value.
Max request bytesSend a request body larger than the configured limit.
MCP blocked toolCall a tool listed in Blocked Tools.
Budget or quotaUse a test key with a very small budget or quota.

Read the caller-visible error.

The error tells you which class of guardrail blocked:

Error classLikely source
401 unauthorizedAPI key authentication failed, key expired, or key revoked.
403 model_not_allowedMissing model access grant.
403 mcp_not_allowedMissing MCP access grant.
rate-limit errorIP, payload, request rate, burst, concurrency, or token policy.
budget_exceededBudget boundary blocked the request.
quota_exceededQuota boundary blocked the request.
mcp_guardrail_blockMCP tool rule or semantic filter blocked.
safety gateway errorSecurity Engine module blocked.

Compare the result with the configured scope.

Check the broadest likely scope first:

  1. Organisation policy
  2. Team policy, if the key is team-scoped
  3. API key policy
  4. Model or MCP policy
  5. Budget or quota on the organisation, team, user, or API key
  6. MCP tool rules or SafetySec behavior

Review resource-specific usage.

For model traffic, open the model detail page and review Usage Records.

For MCP traffic, open the MCP server detail page and review MCP Usage.

Verification Flow

Why This Works

Guardrails are enforced before usage is recorded only when the request stops early. Successful upstream calls and many failed upstream calls produce usage records. Early authentication or policy blocks may be visible through gateway logs and caller errors rather than normal usage rows.

Use request ids when correlating an application error with Odock runtime evidence.

On this page