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.
2026-10-15 · Actual staging application. Synthetic client, public definitions or aggregate test-stand metrics only; not customer statistics or a benchmark. Original pixels are unmodified; personal profile and private data excluded. Unsaved example; no new credential was created.
- 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. Key management requires PostgreSQL.
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.
2026-10-15 · Actual staging application. Non-personal settings or aggregate test-stand metrics, not real customer statistics or a benchmark. Operator profile and other tenant lists excluded. Protection settings were not changed.
- 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. Router shares settings through its store across replicas; 503 does not prove a write applied.
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.
2026-10-15 · Actual staging and an existing operator SSO session. Synthetic tenant/group only; the capture excludes credentials and the operator profile. The form does not establish application on every replica.
- mask_route
- Save
- fail_closed
2026-10-15 · Actual staging and an existing operator SSO session. Synthetic tenant/group only; the capture excludes credentials and the operator profile. The form does not establish application on every replica.
- mask_route
- Save
- fail_closed
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.
Operator-only service parameters
These are source defaults, not verified values for your deployment. Hosted customers request changes through their administrator; self-hosted operators qualify configuration on staging.
| Parameter | Source default / unit | Effect |
|---|---|---|
| IAM_GW_MASKING_MODE / IAM_GW_MASKING_FLOOR | auto / auto | Default discovery and minimum protection. |
| IAM_GW_CLASSIFIER_TIMEOUT_MS | 1500 ms | Inspector wait limit. |
| IAM_GW_CLASSIFIER_MAX_TIER | 3 | Maximum cascade depth. |
| IAM_GW_CLASSIFIER_OPTIONAL | false | Inspector obligation; not a universal customer toggle. |
| IAM_GW_CLASSIFIER_BREAKER_THRESHOLD | 5 failures | Breaker opening threshold. |
| IAM_GW_CLASSIFIER_BREAKER_COOLDOWN_MS | 30000 ms | Wait before another attempt. |
| IAM_GW_PRIVATE_MASK_TTL_HOURS | 12 h | Mapping lifetime, separate from audit. |
| IAM_GW_DATA_CLASSES | Registry path | Class detector configuration. |
| IAM_GW_DATA_CLASS_ACTIONS | off | Class-action enforcement; off does not disable classification or policy replacement. |
| IAM_GW_AUDIT_RING | 500 records | Volatile short history. |
| IAM_GW_AUDIT_STORE_TEXT | false | Raw-content capture, independent of metadata. |
| IAM_GW_AUDIT_CONTENT_RETENTION_DAYS | 30 days | Raw-content retention. |
| PostgreSQL / Redis / encryption key | Operator configuration and secrets | Durable history, shared settings and protected mappings; secret values are never published. |
All sections · Traffic analysis · FAQ
Class actions: off, shadow and enforce
2026-10-15 · Actual staging application. Synthetic client, public definitions or aggregate test-stand metrics only; not customer statistics or a benchmark. Original pixels are unmodified; personal profile and private data excluded. screenshot@example.invalid was tested. This is a registry regex check, not a model-transport test.
- Sample text
- Test
- Masked text
The deployment operator sets IAM_GW_DATA_CLASS_ACTIONS, or Helm gateway.dataClassActions. Classification, policy-based masking and registry actions are separate controls. off leaves registry actions as metadata. shadow calculates tightening without changing dispatch. enforce applies class actions in the effective perimeter. Check Data classes or GET /admin/data-classes → action_enforcement; the value depends on the deployment.
Use strict or external_masked for protected traffic. Under enforce, Tier0 retains detected code.secret even behind a confidentiality marker. The standard registry blocks it in external and hybrid/on_prem scopes and allows local processing; exact tenant overrides take precedence. external_masked applies actions in its final external scope and cannot convert block or local_only into external model delivery. For critical data whose verdict does not permit masking, a requested mask is not treated as successful: external dispatch is blocked.
Before enabling on a working deployment, qualify staging with a synthetic credential without real permissions, ordinary public text, supported PII masking, marker-only text, tenant overrides and an unavailable inspector. Verify action block, Request ID and absence of provider calls; RESTRICTED or a green badge alone is insufficient. A policy block may return HTTP 200 with a synthetic Router response, which is not model generation. Clients cannot opt out using a JSON field: the mode comes from authenticated API-key metadata.
external_unrestricted deliberately skips Secure screening and these class actions while retaining authentication and quotas. Do not use it to verify protection guarantees. Reverting to off disables enforcement for subsequent requests; this changes protection, not just the display. Previous requests are not replayed.