Security and masking settings
Router: key modes, class actions off/shadow/enforce, secret blocking, masking and policy settings.
Role: deployment operator. These steps use the operator console. An ordinary hosted account exposes only its own keys and limits; request policy, protection-mode and masking changes from the operator.
These settings affect real gateway requests. Global changes require an authorized administrator; edition and role can restrict individual actions. Display preferences and report filters do not change protection.
Where to enable or disable controls
| Task | Application path | Actual effect |
|---|---|---|
| Apply security policy | Access keys → strict | Classification and routing rules apply to that key. |
| Exclude a key from screening | Access keys → external_unrestricted | Sends original traffic externally without Secure screening; authentication, quotas and billing remain. Use only for data approved for that transfer. |
| Change discovery for replacement | Request history → Router requests → IAM.Secure settings | Changes masking mode and minimum protection. |
| Block a data category | Policy → tenant ID → Load → Edit | Changes that tenant’s routing rules. |
| Disable notifications | Alert rules / Webhooks → disable rule/subscription | Stops notifications, not inspection or blocking. |
| Stop report refresh | Auto-refresh → None | Stops page refresh, not request processing. |
| Avoid storing original text | Operator content-storage configuration | Metadata and decisions can remain without raw content. |
Key modes
- Open Access keys → Create API key, or the mode selector for an existing key.
- Set label, tenant ID, expiry and mode. Store the once-shown raw key securely in the client.
- Send a synthetic request using that key; verify action and actual perimeter in Request history → Router requests.
| Mode | Privacy behavior | Qualification |
|---|---|---|
| strict | Classification and policy apply | Starting mode for protected traffic. |
| external_unrestricted | Skips Secure screening and routes externally | An explicit permission to transfer raw data, not monitoring-only mode. |
| external_masked | Forces replacement before external delivery | Supported by the server contract; current UI offers only the first two modes. Use the supported key-management API only when your deployed version supports it. Replacement failure is fail-closed; configured injection blocking remains. |
Rotation requires replacing the client key; revocation stops access. Operators manage env/bootstrap keys. Disabling a worker and revoking an inference key are separate actions.
Illustrative data. Available controls depend on your edition and permissions.
- Label
- Tenant ID
- Expiry
- Strict policy
- Create
Enable external_masked through the API
Use an administrative session authorized to write, not a normal inference API key. Send requests to your Router gateway, not the documentation site, with your organization’s approved authentication. Keep tokens out of URLs and JSON. For unavailable key management, contact your administrator.
GET /admin/keys: find the test key’s id and preserve its previouspolicy_mode. The secret/prefix is not its id.PATCH /admin/keys/<id>withContent-Type: application/json:
{"policy_mode": "external_masked"}
- Expect HTTP 200 and key metadata; re-read
GET /admin/keysand confirm the mode. PATCH does not rotate the secret. - Send the next synthetic inference request with that key. Check
X-IAM-Key-Policy-Mode: external_maskedand actual replacement in the external flow. Raw private values must not reach the provider; impossible replacement should fail closed. - Restore the previous mode with the same PATCH and verify a new request. The change does not replay existing requests.
To create a key use POST /admin/keys with {"label":"Masked staging client","tenant_id":"docs-demo","policy_mode":"external_masked"}. HTTP 201 returns key once; store it securely. Optional expires_at is a future RFC3339 date; omission/null means no expiry. On 400 check JSON/mode/date; 401/403 needs administrative access; 404 needs the correct id; 503 means unavailable storage. An error is not proof of an applied change; read back before retrying.
Masking mode and floor
- Open Request history → Router requests → IAM.Secure settings; the same panel is available in Routing Audit.
- Choose masking mode and minimum protection.
- Save, then Refresh to check the applied values. Save is enabled only after changes; refresh discards unsaved edits.
- Check a synthetic request’s
X-IAM-Masking-Mode, decision, perimeter and replacement evidence in history.
Illustrative data. Available controls depend on your edition and permissions.
- Mode
- Protection floor
- Save
| Parameter | Values and meaning | Scope |
|---|---|---|
| mode | auto rediscovers known private values; verdict_classes uses initial verdict classes | Router default. |
| floor | auto prevents client downgrade; verdict_classes permits either mode | Minimum for request overrides. |
| iam_masking.mode | Per-request mode | Cannot bypass floor. |
| X-IAM-Masking-Mode | Header override | Processed after JSON, then clamped to floor. Prefer one override method. |
| Auto-Mask / Auto-Discover headers and Secure aliases | Compatibility discovery flags | false/off means verdict_classes, not replacement disabled. |
| iam_masking.session_id | Stable KEY_N mapping within a conversation | Use an opaque client-owned ID, not personal data. |
| TTL, backend, encryption | Mapping lifetime/storage/encryption | Read-only status; operator configuration. |
Verdict classes does not turn masking off. It reduces rediscovery. In administrative writes specify both intended mode and floor: a weaker default can also lower the floor. Re-read both values. Refresh both values; 503 does not confirm a successful write.
Replacement substitutes detected values with KEY_N placeholders; semantic confidential content may not be safely replaceable. A mask_route rule escalates containment when replacement is impossible. Mapping TTL is separate from audit retention.
Complete routing policy reference
Policy → tenant ID → Load → Edit → Form / JSON. Preserve the existing document, preview changes, save and verify a scoped synthetic request. Preview replays an audit sample without applying policy or calling an LLM; an empty sample is not a safety proof.
| Field | Meaning and configuration |
|---|---|
| name | Human-readable label, not a selection condition. |
| tenant_id | Target tenant; * identifies the default policy. Top-bar tenant filtering does not select the edited document. |
| perimeter_rules[].when.sensitivity | PUBLIC / INTERNAL / CONFIDENTIAL / RESTRICTED; empty means any. Put specific/private cases first. |
| when.content_type | List of GENERAL / CODE / ARCHITECTURE / RESEARCH; an empty list matches any type. These are classifier categories, not file MIME types. Form values text/json/image/audio/document do not replace them and may return 422. |
| action | Server accepts route, mask_route, block. Some form versions offer reroute; it is not an alias for mask_route. Use JSON for exact values. |
| perimeter | external / on_prem / local. Block does not call a provider. |
| Rule order | First matching rule wins. No match falls back to on-prem, not implicitly external. |
| cost_optimization.research_to_cheapest | Cheapest suitable research model within the authorized perimeter. |
| cost_optimization.prefer | cheapest_relevant / fastest / balanced; cost/speed preference cannot weaken privacy. |
| reasoning_effort | none / low / medium / high for supported models; client request value wins. |
| request_limits.max_output_tokens / Max out | Clamps max_tokens and supplies it if absent; 0 disables this cap. |
| request_limits.max_prompt_chars / Max prompt | Prompt-character ceiling; exceeding it returns 413 before a provider call. 0 disables this limit. |
| on_classifier_unavailable | Validator accepts block / fail_closed / empty. Use explicit block in JSON for required blocking and qualify failure behavior on staging. UI allow may be rejected with 422. |
| on_injection_detected | block / empty. UI flag may be rejected; use block when blocking is intended. |
| block_message | Customer-facing rejection message without original secrets. |
A client model hint cannot lower containment. With an external-only provider registry the validator requires explicit blocks for private classes and classifier failure; policies needing absent on-prem fallback are rejected.
Illustrative data. Available controls depend on your edition and permissions.
- mask_route
- Save
- fail_closed
Illustrative data. Available controls depend on your edition and permissions.
- Classifier unavailable
- Injection detected
- Block message
Synthetic-tenant JSON example
Use your test tenant in place of docs-demo. This example intentionally omits content_type to avoid mismatched classifier vocabularies.
{"name":"Private data stays inside","tenant_id":"docs-demo","perimeter_rules":[{"when":{"sensitivity":"RESTRICTED"},"action":"block"},{"when":{"sensitivity":"CONFIDENTIAL"},"action":"route","perimeter":"on_prem"},{"when":{"sensitivity":"INTERNAL"},"action":"mask_route","perimeter":"external"},{"when":{"sensitivity":"PUBLIC"},"action":"route","perimeter":"external"}],"cost_optimization":{"research_to_cheapest":false,"prefer":"balanced"},"on_classifier_unavailable":"block","on_injection_detected":"block","block_message":"Request blocked by organization policy","request_limits":{"max_output_tokens":4096,"max_prompt_chars":32000},"reasoning_effort":"none"}
Replace instead of blocking
- Check strict key mode and a replaceable class.
- Change only the targeted rule to mask_route and the required perimeter; keep stricter rules above it.
- Test synthetic PII, secrets, semantic confidential text and injection. An overly broad rule must not silently allow the latter cases.
- Find the actual outcome by request ID. If masking is impossible, expect greater containment or blocking rather than raw external delivery.
Cancel discards unsaved edits. After saving, restore the previous document or supported policy version. Rollback is revalidated against current providers and can return 422. Verify the restored document and a new request.
Passport data before model dispatch
This flow needs a protected strict or external_masked key, an available classifier, and enforce for class actions. The standard pii.passport registry uses mask in external and hybrid/on_prem scopes and allows originals in local. An exact tenant override can change that rule. external_unrestricted remains an explicit IAM.Secure opt-out.
- Verify settings on staging first, using synthetic data only:
Паспорт РФ серия 4521 номер 123456. This is a fictional example, not customer data. - Submit through the API used by your client. Separate series/number fields, line breaks, JSON metadata and string Unicode escapes are supported. Classification and replacement retain tool-name context and nested passport-field context in tool arguments.
- Open Request history → Router requests, find the request ID and expand its row. Check
pii.passport,mask_route, the actual perimeter and masking details. Highlights show detected original fragments and their transmitted placeholders. Original Input may remain in protected history; it is not the model-bound body. - For integration acceptance, also inspect the body at your test provider: a protected route must carry placeholders instead of passport values. A successful dry-run or HTTP 200 alone does not establish this.
Tool arguments retain JSON keys, containers and non-string scalar types. If a numeric passport field cannot accept a string placeholder without changing its JSON type, Router returns 503 masking_unavailable before provider dispatch. Send document identifiers as strings, preserving leading zeros, and repeat the synthetic check. If masking is unavailable, check IAM.Secure availability and masking mode/floor instead of bypassing the error with external_unrestricted.
The same rejection applies when detected ranges cannot safely map back to original text after removing invisible Unicode characters. One successful replacement does not authorize sending unresolved originals. Remove invisible separators inside identifiers in your client and repeat the check; protected original input remains available in history when retention permits it.
Detection covers explicitly identified passport fields. Ordinary order numbers and amounts without passport context do not become passports solely because of digit count. Qualify other document formats separately using your own test corpus.
Support
Ask your organization’s administrator to change settings that are not available to your role. Include the request ID and error code, without secrets.