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

TaskApplication pathActual effect
Apply security policyAccess keys → strictClassification and routing rules apply to that key.
Exclude a key from screeningAccess keys → external_unrestrictedSends original traffic externally without Secure screening; authentication, quotas and billing remain. Use only for data approved for that transfer.
Change discovery for replacementRequest history → Router requests → IAM.Secure settingsChanges masking mode and minimum protection.
Block a data categoryPolicy → tenant ID → Load → EditChanges that tenant’s routing rules.
Disable notificationsAlert rules / Webhooks → disable rule/subscriptionStops notifications, not inspection or blocking.
Stop report refreshAuto-refresh → NoneStops page refresh, not request processing.
Avoid storing original textOperator content-storage configurationMetadata and decisions can remain without raw content.

Key modes

  1. Open Access keys → Create API key, or the mode selector for an existing key.
  2. Set label, tenant ID, expiry and mode. Store the once-shown raw key securely in the client.
  3. Send a synthetic request using that key; verify action and actual perimeter in Request history → Router requests.
ModePrivacy behaviorQualification
strictClassification and policy applyStarting mode for protected traffic.
external_unrestrictedSkips Secure screening and routes externallyAn explicit permission to transfer raw data, not monitoring-only mode.
external_maskedForces replacement before external deliverySupported 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 example: Label
Illustrative example: Label
Illustrative data. Available controls depend on your edition and permissions.
  1. Label
  2. Tenant ID
  3. Expiry
  4. Strict policy
  5. 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.

  1. GET /admin/keys: find the test key’s id and preserve its previous policy_mode. The secret/prefix is not its id.
  2. PATCH /admin/keys/<id> with Content-Type: application/json:
{"policy_mode": "external_masked"}
  1. Expect HTTP 200 and key metadata; re-read GET /admin/keys and confirm the mode. PATCH does not rotate the secret.
  2. Send the next synthetic inference request with that key. Check X-IAM-Key-Policy-Mode: external_masked and actual replacement in the external flow. Raw private values must not reach the provider; impossible replacement should fail closed.
  3. 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

  1. Open Request history → Router requests → IAM.Secure settings; the same panel is available in Routing Audit.
  2. Choose masking mode and minimum protection.
  3. Save, then Refresh to check the applied values. Save is enabled only after changes; refresh discards unsaved edits.
  4. Check a synthetic request’s X-IAM-Masking-Mode, decision, perimeter and replacement evidence in history.
Illustrative example: Mode
Illustrative example: Mode
Illustrative data. Available controls depend on your edition and permissions.
  1. Mode
  2. Protection floor
  3. Save
ParameterValues and meaningScope
modeauto rediscovers known private values; verdict_classes uses initial verdict classesRouter default.
floorauto prevents client downgrade; verdict_classes permits either modeMinimum for request overrides.
iam_masking.modePer-request modeCannot bypass floor.
X-IAM-Masking-ModeHeader overrideProcessed after JSON, then clamped to floor. Prefer one override method.
Auto-Mask / Auto-Discover headers and Secure aliasesCompatibility discovery flagsfalse/off means verdict_classes, not replacement disabled.
iam_masking.session_idStable KEY_N mapping within a conversationUse an opaque client-owned ID, not personal data.
TTL, backend, encryptionMapping lifetime/storage/encryptionRead-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.

FieldMeaning and configuration
nameHuman-readable label, not a selection condition.
tenant_idTarget tenant; * identifies the default policy. Top-bar tenant filtering does not select the edited document.
perimeter_rules[].when.sensitivityPUBLIC / INTERNAL / CONFIDENTIAL / RESTRICTED; empty means any. Put specific/private cases first.
when.content_typeList 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.
actionServer accepts route, mask_route, block. Some form versions offer reroute; it is not an alias for mask_route. Use JSON for exact values.
perimeterexternal / on_prem / local. Block does not call a provider.
Rule orderFirst matching rule wins. No match falls back to on-prem, not implicitly external.
cost_optimization.research_to_cheapestCheapest suitable research model within the authorized perimeter.
cost_optimization.prefercheapest_relevant / fastest / balanced; cost/speed preference cannot weaken privacy.
reasoning_effortnone / low / medium / high for supported models; client request value wins.
request_limits.max_output_tokens / Max outClamps max_tokens and supplies it if absent; 0 disables this cap.
request_limits.max_prompt_chars / Max promptPrompt-character ceiling; exceeding it returns 413 before a provider call. 0 disables this limit.
on_classifier_unavailableValidator 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_detectedblock / empty. UI flag may be rejected; use block when blocking is intended.
block_messageCustomer-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 example: mask_route
Illustrative example: mask_route
Illustrative data. Available controls depend on your edition and permissions.
  1. mask_route
  2. Save
  3. fail_closed
Illustrative example: Classifier unavailable
Illustrative example: Classifier unavailable
Illustrative data. Available controls depend on your edition and permissions.
  1. Classifier unavailable
  2. Injection detected
  3. 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

  1. Check strict key mode and a replaceable class.
  2. Change only the targeted rule to mask_route and the required perimeter; keep stricter rules above it.
  3. Test synthetic PII, secrets, semantic confidential text and injection. An overly broad rule must not silently allow the latter cases.
  4. 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.

  1. Verify settings on staging first, using synthetic data only: Паспорт РФ серия 4521 номер 123456. This is a fictional example, not customer data.
  2. 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.
  3. 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.
  4. 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.