POLARIS FIELD GUIDE / 3 MIN READ
Tenant and task isolation in redaction and restoration
A restoration handle belongs to an authorized tenant and task. Preserve that ownership throughout queues, model calls and callbacks, then verify it before delivery. Polaris-Mist binds contexts to their tenant and rejects foreign, expired or tampered handles. Test the application's association logic with both successful and intentionally mismatched requests so references return only through the intended workflow.
Model ownership explicitly
Store a task record that identifies the application tenant, authorized caller, source selection and context handle. Keep that record under backend control. The backend selects the restoration context from the authorized task record.
This is especially important when a worker processes jobs from several customers. Verify both the returned text and its attachment to the correct job. Use explicit task ownership in queue messages and completion records so the association can be checked before any restored content is delivered.
Follow the context lifecycle
The Mist redaction response includes context_id and expires_at. Mist binds its encrypted mapping to tenant_id, caller and task_id and performs authorized restoration on CPU. Use those fields and associations as the integration contract.
Track the context lifecycle alongside the task state: created, awaiting model work, ready for restoration, delivered or expired. Route delayed callbacks through the state and context belonging to their original task.
Build a negative-test matrix
Use authorized test identities and fixtures to attempt the mismatches the application must handle. Test a context from another tenant, a wrong task association, an expired handle and a malformed placeholder. Record the response category and verify that the application withholds the affected result.
The Mist API reference identifies 404 for a cross-tenant handle, 410 for expiration, 422 for a malformed token and 401 for an invalid or revoked key. Verify the application's recovery behavior for each condition, keeping the original task's privacy requirements intact.
| Fixture | Application expectation |
|---|---|
| Correct tenant and task | Deliver the validated restored result |
| Foreign context | Reject association and withhold content |
| Expired context | Enter the defined recovery path |
| Malformed reference | Request correction or stop delivery |
Check callbacks and concurrent work
Run two distinct tasks for the same test user and complete them in reverse order. Then repeat across two test tenants. Verify that each final document contains only the values from its own source fixture. This reveals accidental reliance on a shared current-context variable.
Also test a repeated callback. Track each accepted result and its task revision in the delivery path. Define replay handling that preserves the latest accepted task revision and its corrected deliverable.
Keep observability aligned with isolation
Record safe request identifiers, task state transitions and error categories. Keep source values, context payloads and restored content within their authorized task storage. Include logs and support tools used to investigate failed jobs in the isolation review.
The release artifact is a matrix of test identities, task identifiers, expected access outcomes and observed results. Re-run it when queueing, authentication, callback routing or document delivery changes. This verifies tenant isolation across the complete application path.
QUESTIONS & ANSWERS
Details that matter.
How does the application select the restoration context?
Let the backend associate the context with the authorized task. Validate any client-supplied task reference before using the corresponding stored handle.
What is a useful concurrency test?
Create two distinct tasks, complete them in reverse order and verify that each restored output contains only its own fixture values. Repeat across test tenants.
How does Mist describe foreign-handle behavior?
The API reference specifies rejection of cross-tenant restoration and lists 404 for a foreign context handle.