Supported Win32 mechanism for authorization revocation and plaintext release

AIPilotDeveloper 0 Reputation points
2026-11-12T06:36:54.8566667+00:00

I am developing a Windows local AI application with a trusted broker and an untrusted client process.

The broker holds protected source data and controls authorization. The client must never receive unrestricted source handles, keys, or other capabilities that bypass the broker.

I need clarification about a supported Windows mechanism that can reliably order authorization revocation against plaintext becoming accessible to the untrusted client.

Required security properties:

  1. If revocation commits before plaintext becomes accessible, all still-preventable disclosure must be blocked.

If plaintext has already become irreversibly accessible, the system must record that exposure rather than claim the data was recovered.

Concurrent revocation and release must have a verifiable ordering boundary.

Pending I/O, partial delivery, and crashes must not be mistaken for successful cancellation.

Revocation cannot be delayed indefinitely because an I/O operation remains pending.

I understand that changing ACLs does not revoke already-open handles, CancelIoEx does not prove zero delivery, and a successful Write or ACK does not establish exact client-side visibility.

My questions:

Does Windows provide a documented and supported mechanism that establishes a reliable ordering boundary between revocation and plaintext release to an isolated untrusted process?

Can such a mechanism guarantee bounded and verifiable outcomes when release, cancellation, and process failure occur concurrently?

If Windows does not provide such a general-purpose mechanism, which documented platform limitations should inform the application architecture?

Please include links to relevant Microsoft API documentation, applicable Windows versions, and important limitations.

I am requesting platform-level technical guidance, not certification of an existing implementation. No production data or private source code is included.I am developing a Windows local AI application with a trusted broker and an untrusted client process.

The broker holds protected source data and controls authorization. The client must never receive unrestricted source handles, keys, or other capabilities that bypass the broker.

I need clarification about a supported Windows mechanism that can reliably order authorization revocation against plaintext becoming accessible to the untrusted client.

Required security properties:

If revocation commits before plaintext becomes accessible, all still-preventable disclosure must be blocked.

If plaintext has already become irreversibly accessible, the system must record that exposure rather than claim the data was recovered.

Concurrent revocation and release must have a verifiable ordering boundary.

Pending I/O, partial delivery, and crashes must not be mistaken for successful cancellation.

Revocation cannot be delayed indefinitely because an I/O operation remains pending.

I understand that changing ACLs does not revoke already-open handles, CancelIoEx does not prove zero delivery, and a successful Write or ACK does not establish exact client-side visibility.

My questions:

Does Windows provide a documented and supported mechanism that establishes a reliable ordering boundary between revocation and plaintext release to an isolated untrusted process?

Can such a mechanism guarantee bounded and verifiable outcomes when release, cancellation, and process failure occur concurrently?

If Windows does not provide such a general-purpose mechanism, which documented platform limitations should inform the application architecture?

Please include links to relevant Microsoft API documentation, applicable Windows versions, and important limitations.

I am requesting platform-level technical guidance, not certification of an existing implementation. No production data or private source code is included.

Windows development | Windows API - Win32
0 comments No comments

2 answers

Sort by: Oldest
  1. AI answer

    2026-11-12T06:39:04.0366667+00:00

    Windows does not document a general-purpose Win32 mechanism that atomically orders authorization revocation against plaintext becoming visible inside an already-running untrusted process; the broker must instead define a conservative broker-owned commit boundary and treat uncertain delivery as potentially exposed.

    Required architecture

    Keep protected files, mappings, decryption keys, and unrestricted handles exclusively in the broker. AppContainer can restrict the client to explicitly granted resources, but it does not retract data already supplied to that client. AppContainer was introduced in Windows 8; Win32 app isolation, which builds on AppContainer and brokered access, requires Windows 11 version 24H2 or later.^1^^2^

    Use a broker state machine with two independent dimensions:

    • Authorization: AUTHORIZED, RELEASE_RESERVED, REVOKED
    • Transport result: NOT_SUBMITTED, PENDING, COMPLETED, CANCELED, FAILED
    • Disclosure result: NOT_RELEASED, POTENTIALLY_EXPOSED, INDETERMINATE

    A safe ordering protocol is:

    1. Under a short broker lock, serialize release against revocation and allocate a monotonically increasing operation ID.
    2. Persist RELEASE_RESERVED or RELEASE_COMMITTED before submitting plaintext I/O. If persistence fails, do not submit it.
    3. Release the lock before performing potentially blocking persistence follow-up, IPC, cancellation, or waits. The commit point orders broker decisions only; it does not prove kernel transfer or client visibility.
    4. Handle every submission result:
      • Immediate success: record transport completion and conservatively mark potentially exposed.
      • ERROR_IO_PENDING: retain the buffer and unique OVERLAPPED until actual completion.
      • Immediate failure before pending: record failed/not submitted as applicable.
    5. On revocation, prevent new reservations immediately, request cancellation of pending operations, and wait only to a policy deadline.
    6. At the deadline, produce a bounded broker decision such as INDETERMINATE; continue ownership of the buffer and OVERLAPPED in a cleanup/reaper path until the real completion arrives.
    7. During crash recovery, classify any committed release without a final result as INDETERMINATE or conservatively exposed—not recovered.

    Illustrative logic:

    lock(policy);
    if (revoked || !authorized) { unlock(policy); return DENIED; }
    id = ReserveRelease();              // broker ordering point
    unlock(policy);
    
    if (!PersistReleaseCommitted(id))   // durable before plaintext submission
        return NOT_SUBMITTED;
    
    SubmitResult r = SubmitOverlapped(id);
    if (r == ImmediateSuccess)
        Record(id, COMPLETED, POTENTIALLY_EXPOSED);
    else if (r == Pending)
        TrackUntilActualCompletion(id); // buffer + OVERLAPPED remain valid
    else
        Record(id, FAILED, NOT_RELEASED);
    

    Why cancellation is not the boundary

    CancelIoEx only requests cancellation of outstanding I/O in the calling process. It does not wait, does not change the handle state, and can race with normal completion. The final operation can complete normally, complete with ERROR_OPERATION_ABORTED, or fail for another reason. Its minimum supported versions are Windows Vista and Windows Server 2008.^3^

    Therefore:

    • CancelIoEx success means cancellation was requested, not that zero bytes were disclosed.
    • Final ERROR_OPERATION_ABORTED means the kernel I/O operation was canceled; it is not general proof that the peer never observed data.
    • Do not interpret a zero or unavailable byte count on a failed completion as proof of zero delivery unless the specific transport explicitly documents that meaning.
    • Do not free or reuse the buffer or OVERLAPPED until actual completion.

    GetOverlappedResultEx supplies a finite wait and reports actual transferred bytes for completed read/write operations. A timeout returns WAIT_TIMEOUT; a zero-duration check of an unfinished operation returns ERROR_IO_INCOMPLETE. It is supported on Windows 8/Windows Server 2012 and later.^4^ A timeout bounds the broker’s wait and audit decision—not kernel cancellation or peer visibility.

    IPC and memory limitations

    For named pipes, WriteFile may return because the asynchronous write was initiated, because bytes were written, because buffer space became available, or because an error occurred.^5^ FlushFileBuffers on the server end waits until the client has read buffered pipe data, but “read” is still not an exact application-level visibility or processing boundary.^6^ DisconnectNamedPipe discards unread pipe data, but cannot retract bytes already read by the client.^7^

    Avoid plaintext shared mappings: UnmapViewOfFile unmaps only the calling process’s view, while shared pages remain until other processes unmap or terminate.^8^

    ACL changes govern access checks used to obtain handles; a returned handle already carries granted rights.^9^ Consequently, ACL mutation should block future opens, not serve as revocation of existing capabilities.

    Process termination fallback

    Termination can contain future execution but cannot prove that earlier plaintext disappeared. TerminateProcess is asynchronous, requests cancellation of pending I/O, and the process cannot finish termination until pending I/O completes or is canceled.^10^

    A job object can terminate the client and its descendants, but TerminateJobObject requires JOB_OBJECT_TERMINATE on the job handle and, as documented, PROCESS_TERMINATE rights for associated processes.^11^ Treat termination timeouts or crashes as INDETERMINATE, never as proof of non-exposure.


    References

    1. Launch an AppContainer
    2. Windows apps: packaging, deployment, and process
    3. CancelIoEx function (ioapiset.h)
    4. GetOverlappedResultEx function (ioapiset.h)
    5. WriteFile function (fileapi.h)
    6. FlushFileBuffers function (fileapi.h)
    7. DisconnectNamedPipe function (namedpipeapi.h)
    8. UnmapViewOfFile function (memoryapi.h)
    9. Requesting Access Rights to an Object
    10. TerminateProcess function (processthreadsapi.h)
    11. TerminateJobObject function (jobapi2.h)
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

  2. Gatlin Le (WICLOUD CORPORATION) 1,475 Reputation points Microsoft External Staff Moderator
    2026-11-12T07:51:13.8466667+00:00

    Hi @AIPilotDeveloper ,

    On your first question, I could not find a documented and supported Windows mechanism that establishes an ordering boundary between revocation and plaintext release to an isolated untrusted process. This is based on the Microsoft documentation I reviewed for process isolation, handle management, I/O cancellation, and IPC. The documentation also does not state that such a mechanism is absent, so this reflects what is documented rather than a confirmed platform limitation. The ordering point that can be established is one the broker controls itself.

    That applies directly to your follow-up. I could not find a documented Windows primitive that closes the gap between reservation and submission on its own, but the gap comes from the broker's own sequence, so the broker can close it. In the existing example, the lock is released after reservation, so a revocation that commits before submission does not stop the submission. Making the revocation check and the transition into a submitting state one atomic step, performed immediately before the call that hands plaintext to the transport, removes that window. If revocation wins, nothing is submitted. If submission wins, revocation applies only to later releases. With asynchronous RPC, this step maps onto a documented server decision: RpcAsyncCompleteCall is final for the server, while RpcAsyncAbortCall aborts the call without marshaling output arguments (both Windows 2000 and later).

    As for bounded and verifiable outcomes, the prevention guarantee you describe can be established up to the submit call, but not beyond it. Before the submit call, a broker crash leaves the plaintext only in the broker's memory, and the outcome can be verified on the broker side as long as the release record is durable before the atomic check. File Caching explains that writes are cached by default and file metadata is always cached, so the record should be flushed with FlushFileBuffers or written through a handle opened with FILE_FLAG_WRITE_THROUGH. Once the submit call has started, including while the I/O is still pending, I could not find a documented primitive that still guarantees prevention. For named pipes, DisconnectNamedPipe (Windows 2000 and later) discards data the client has not yet read, but the documentation gives the broker no way to learn how much was already read. I also found no documentation on what happens to buffered pipe data when the broker process terminates. Those outcomes remain indeterminate, so splitting a release into small chunks, each passing the same atomic check, limits what any single submit call can expose.

    For the architecture, the main documented constraint is that plaintext delivered to the client cannot be retracted, so the client should hold nothing that lets it bypass the broker. PROC_THREAD_ATTRIBUTE_HANDLE_LIST in UpdateProcThreadAttribute (Windows Vista and later) limits which handles the client inherits at launch. Process Security and Access Rights warns that a handle with PROCESS_DUP_HANDLE can be used to obtain maximum access to the target process, so the client should never hold one to the broker. Plaintext can also outlive the client process, since Collecting User-Mode Dumps (Windows Vista SP1 and later) describes how crashing processes can be dumped to disk when an administrator enables it. If you plan to rely on Win32 app isolation, it requires Windows 11, version 24H2 or later and is still marked as preview.

    I understand that the lack of a single platform mechanism is not the answer you were hoping for, though your framing of exposure versus recovery already fits the constraints these pages describe. This covers what I can confirm from Microsoft's public documentation on this forum. If you need Microsoft to confirm a guarantee beyond what these pages document, that would need to go through Windows developer support.

    I hope this helps clarify the available documentation. If you found my explanation above was truly helpful or informative to you, I would greatly appreciate it if you could follow this guidance so others with the same issue could benefit as well.

    Thank you.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.