Windows 11 Pro: How to securely isolate authorization keys from a local Python AI assistant using built-in Windows security?

אסף מנגוני 0 Reputation points
2026-11-16T11:02:18.3333333+00:00

We are designing a local AI assistant (ALFRED) on Windows 11 Pro, using a Python-based authorization and execution core called NEVO.

We want to use existing, officially supported Windows security mechanisms rather than develop a new security framework.

Our requirements:

  1. ALFRED must be able to perform ordinary authorized computer tasks, including file management, document processing, and approved application operations.

ALFRED must not modify Python source code, execute arbitrary Python scripts, change protected Windows files or settings, or obtain administrator privileges.

Only a separately authorized development identity (Codex) may modify application code, with explicit, narrowly scoped, temporary owner approval.

ALFRED must not be able to read, copy, modify, or use NEVO's authorization keys, approval records, or protected security state.

NEVO currently uses symmetric HMAC signatures. We understand that a process possessing an HMAC verification secret may also be capable of generating valid signatures.

The solution must work on Windows 11 Pro, with a local Python runtime and local AI model, without requiring a cloud service.

Our questions for Microsoft Windows security engineers:

Can Windows 11 Pro enforce these boundaries using separate standard-user identities, Windows service identities, NTFS ACLs, and process isolation?

What is the simplest supported way to ensure that ALFRED cannot access NEVO's authorization keys or protected files, even if ALFRED's process is compromised?

Must NEVO's trusted authorization component run under a different Windows security identity and in a separate process?

Can Windows protect HMAC signing and verification secrets from ALFRED while allowing a trusted NEVO component to verify approvals? What security limitations would remain?

Which built-in Windows mechanisms can restrict ALFRED from launching arbitrary Python, PowerShell, CMD commands, or other executables while still allowing explicitly approved operations?

Can a separate developer identity receive temporary, narrowly scoped permissions to update NEVO code without granting those permissions to ALFRED?

Which protections remain effective if ALFRED is compromised? Which protections would fail if the trusted NEVO component itself were compromised?

What is the minimum recommended architecture using built-in Windows 11 Pro capabilities, without developing a new privileged broker or custom security framework?

Please identify the relevant Windows features, their limitations on Windows 11 Pro, and provide links to official Microsoft documentation.

We are requesting security architecture guidance only. No installation, code execution, or configuration changes are authorized at this stage.We are designing a local AI assistant (ALFRED) on Windows 11 Pro, using a Python-based authorization and execution core called NEVO.

We want to use existing, officially supported Windows security mechanisms rather than develop a new security framework.

Our requirements:

ALFRED must be able to perform ordinary authorized computer tasks, including file management, document processing, and approved application operations.

ALFRED must not modify Python source code, execute arbitrary Python scripts, change protected Windows files or settings, or obtain administrator privileges.

Only a separately authorized development identity (Codex) may modify application code, with explicit, narrowly scoped, temporary owner approval.

ALFRED must not be able to read, copy, modify, or use NEVO's authorization keys, approval records, or protected security state.

NEVO currently uses symmetric HMAC signatures. We understand that a process possessing an HMAC verification secret may also be capable of generating valid signatures.

The solution must work on Windows 11 Pro, with a local Python runtime and local AI model, without requiring a cloud service.

Our questions for Microsoft Windows security engineers:

Can Windows 11 Pro enforce these boundaries using separate standard-user identities, Windows service identities, NTFS ACLs, and process isolation?

What is the simplest supported way to ensure that ALFRED cannot access NEVO's authorization keys or protected files, even if ALFRED's process is compromised?

Must NEVO's trusted authorization component run under a different Windows security identity and in a separate process?

Can Windows protect HMAC signing and verification secrets from ALFRED while allowing a trusted NEVO component to verify approvals? What security limitations would remain?

Which built-in Windows mechanisms can restrict ALFRED from launching arbitrary Python, PowerShell, CMD commands, or other executables while still allowing explicitly approved operations?

Can a separate developer identity receive temporary, narrowly scoped permissions to update NEVO code without granting those permissions to ALFRED?

Which protections remain effective if ALFRED is compromised? Which protections would fail if the trusted NEVO component itself were compromised?

What is the minimum recommended architecture using built-in Windows 11 Pro capabilities, without developing a new privileged broker or custom security framework?

Please identify the relevant Windows features, their limitations on Windows 11 Pro, and provide links to official Microsoft documentation.

We are requesting security architecture guidance only. No installation, code execution, or configuration changes are authorized at this stage.

Windows development | Windows API - Win32
0 comments No comments

2 answers

Sort by: Newest
  1. Tony Thach (WICLOUD CORPORATION) 1,445 Reputation points Microsoft External Staff Moderator
    2026-11-16T11:36:34.6066667+00:00

    Hi @אסף מנגוני ,

    Thank you for the clear description of the design and its requirements.

    As you asked, I have kept this at design level only, with no commands or configuration steps. Everything below is based on the public Microsoft documentation, and I point out where that documentation sets a limit.

    In short

    Yes. Windows 11 Pro can enforce this separation with built-in features, provided that ALFRED, the NEVO authorization component and Codex each run under their own local account and none of them is an administrator. Nothing below needs a domain, MDM or a cloud service. Two of your requirements cannot be enforced by Windows itself:

    • "Approved Python scripts only". Once an account may start a Python interpreter, Windows application control does not decide which scripts it runs (see 5).
    • "Temporary" permissions. NTFS permissions do not expire on their own (see 6).

    1. Can separate identities, NTFS ACLs and process isolation enforce these boundaries?

    Yes, for access to files, keys and processes.

    • The Microsoft Security Servicing Criteria for Windows list the user, process and session boundaries as security boundaries that Microsoft intends to service. They also list "Windows Resource Access Control" as a serviced security feature: an identity cannot access a file or named pipe unless explicitly authorized. None of this is edition-specific.
    • A standard account cannot change protected Windows files or system-wide settings, and it needs administrator credentials to elevate.
    • The same criteria list "Administrator to Kernel" as a non-boundary and UAC as defense-in-depth only. So these guarantees hold only while all three identities are standard accounts and the administrator credentials stay out of ALFRED's reach.
    • Windows decides which identity may open which object. What counts as an "approved operation" remains NEVO's decision.

    2. Simplest supported way to keep ALFRED away from NEVO's keys and protected files

    Run ALFRED under its own standard local account. Keep NEVO's keys, approval records and state in one folder whose permissions grant access only to NEVO's account, SYSTEM and Administrators, with inheritance from the parent folder disabled.

    • No Deny entries are needed. Access that is not explicitly allowed is implicitly denied, and new files inherit the folder's permissions.
    • ALFRED's account must not own the folder, because an owner implicitly has WRITE_DAC. It also must not get access through a broad group such as Users or Everyone.
    • ALFRED's account must not hold privileges that bypass permissions, such as SeDebugPrivilege, SeBackupPrivilege or SeTakeOwnershipPrivilege. A standard account does not have them by default.

    Windows makes this check against the account's access token, not inside ALFRED's code. The result is the same when ALFRED's process is compromised.

    3. Must the NEVO authorization component use a different identity and a separate process?

    Yes, both.

    • Access is evaluated per access token, and every process of an account carries a copy of that account's token. Code inside one process shares one token and one address space, so there is no boundary between Python modules.
    • A separate process under the same account is not enough. Both processes reach the same files and the same DPAPI scope, and a process's default security descriptor comes from its creator's token.
    • Keep ALFRED off the owner's interactive desktop as well. Window messages and hooks work between processes on the same desktop. Run ALFRED as a scheduled task or service, or in its own sign-in session.

    4. Can Windows protect the HMAC secret from ALFRED while NEVO verifies approvals?

    Yes. Make the secret readable by NEVO's account only: a file in the protected folder, or CryptProtectData in user scope under NEVO's account. Do not use CRYPTPROTECT_LOCAL_MACHINE, because then any user on the computer can decrypt the data.

    Limitations that remain:

    • Windows cannot separate "verify" from "sign" for HMAC. As you noted, whatever can verify can also sign. HMAC fits where NEVO protects its own records. For an owner approval that NEVO should check but never create, use an asymmetric signature and give NEVO only the public key.
    • CNG key storage does not cover an HMAC secret. The Microsoft Software Key Storage Provider lists asymmetric algorithms only, so the secret is in NEVO's memory while it is used. An asymmetric private key can stay outside the application process, or in the TPM through the Microsoft Platform Crypto Provider.
    • A non-exportable key cannot be copied, but code that runs as its owner can still use it. NEVO should not offer any function that signs data supplied by ALFRED.
    • Administrators and SYSTEM can still reach the secret. BitLocker, which Pro supports, covers the offline case.

    5. Restricting what ALFRED can start

    So I would design on the assumption that arbitrary Python can run as ALFRED. What protects you is that this code only has ALFRED's token, and that NEVO never runs code, module paths or commands supplied by ALFRED.

    6. Temporary, narrowly scoped rights for Codex

    Narrow scope: yes. Make Codex a third standard account and grant it Modify only on the code folder that the approval covers. Permission entries are per identity, so nothing carries over to ALFRED.

    Temporary: only by procedure. On a standalone PC, NTFS permission entries and local group memberships have no built-in expiry. The options:

    • The owner adds the entry with an administrator account and removes it afterwards. That step is also the explicit approval.
    • The Codex account stays disabled, or gets an expiry date, outside approved windows.
    • Codex writes only to a staging folder, and the owner copies reviewed changes into the live folder. Then only the owner's administrator account ever writes live code. This is the option I would choose.

    Removing a permission does not close handles that are already open, and a signed-in session keeps its group memberships, so end Codex's session when the window closes. Also give NEVO's own account Read & Execute only on its code, so that a compromised NEVO cannot rewrite itself.

    7. What still holds after a compromise

    If ALFRED is compromised, the attacker has ALFRED's token and nothing more.

    • Still effective: the permissions on keys, records and code, the absence of administrator rights, the separation from NEVO's process and, as defense-in-depth, the AppLocker rules.
    • Not protected: every file ALFRED's account may read or change, and any request it can send to NEVO. NEVO has to treat every request as untrusted input.

    If the NEVO authorization component is compromised, everything that depends on its decisions fails. The HMAC secret is exposed, approvals can be forged or skipped, and records can be rewritten.

    • What remains are the limits of NEVO's own account. That is the reason to run it as a non-administrator account, not as LocalSystem.
    • An owner approval signed with a private key that NEVO does not hold still cannot be forged. That helps for audit, but it does not stop a compromised NEVO from acting.

    If an administrator account is compromised, none of these protections can be relied on.

    8. Minimum architecture

    1. Four local accounts: an owner administrator account used only for administration and approvals, ALFRED (standard), the NEVO authorization component (its own standard account) and Codex (standard, no write access by default).
    2. Three storage areas: code and the Python runtime (administrators write, the others read and execute), NEVO's secrets and records (NEVO only), and ALFRED's working folders (explicit grants only). Nothing NEVO loads may be writable by ALFRED or Codex.
    3. NEVO runs as a service or scheduled task under its own account. ALFRED runs in a separate process under its account, away from the owner's desktop.
    4. One channel between them: a named pipe with an explicit security descriptor that lets only ALFRED's account connect. The default descriptor also gives Everyone read access. NEVO can identify the caller with ImpersonateNamedPipeClient. It can also carry out file operations requested by ALFRED under ALFRED's identity, so that Windows checks ALFRED's permissions and not NEVO's.
    5. AppLocker rules for ALFRED's account.
    6. The HMAC secret only in NEVO's store, and owner approvals as asymmetric signatures.
    7. BitLocker enabled and Windows kept up to date.

    About "no new privileged broker": in this design the NEVO authorization component is the broker, and it must be a separate process for a boundary to exist. It does not have to be privileged, and it needs no security mechanism of its own. Windows does the enforcement. NEVO decides, and acts with its own limited account. The more of your policy you express as plain folder permissions for ALFRED, the less NEVO has to broker.

    Features and their limits on Windows 11 Pro

    Feature Limit to keep in mind
    Standard local accounts No protection from administrators. UAC is not a security boundary.
    NTFS permissions The owner can change them. Some privileges bypass them.
    Windows services Services started by the Service Control Manager receive the "Impersonate a client after authentication" right by default. If ALFRED is hosted as a service, declare its required privileges so that this right is removed, or use a scheduled task. NEVO needs the right only if it impersonates ALFRED. The service accounts article describes virtual accounts (NT SERVICE\<name>) for Windows Server only, so I would use dedicated local accounts on Pro.
    DPAPI User scope only. No protection while the secret is in memory, or from administrators.
    CNG key storage, TPM The Microsoft Software KSP stores asymmetric keys only.
    AppLocker Listed as defense-in-depth in the servicing criteria, with no servicing commitment. Cannot control Python scripts.
    App Control for Business Device-wide only. Cannot control Python scripts.
    BitLocker Supported on Pro. Protects data only while the device is off.
    Win32 app isolation (AppContainer), Hyper-V Optional stronger isolation for ALFRED. Win32 app isolation is still documented as preview. Hyper-V is available on Pro.
    Agent workspace Uses the same model (a separate standard account and session per agent), but it is documented as experimental. I mention it as a reference only.

    Please note that this is design guidance based on public documentation, not a security review of your implementation.

    I hope this helps. If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide so others with the same issue can find it.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-11-16T11:03:50.6166667+00:00

    A separate, least-privileged NEVO service identity and process must exclusively hold the authorization state; ALFRED should run as an unrelated standard user and communicate with NEVO only through a narrowly permissioned, request-specific interface.

    Minimum supported architecture

    1. ALFRED identity
      • Run ALFRED under a dedicated local standard-user account.
      • Do not add that account to Administrators or grant service-management, ownership, backup, restore, or debug rights.
      • Processes inherit their user’s access token, so this identity becomes the primary ACL boundary.^1^
      • Keep UAC enabled. A standard user cannot elevate without administrator credentials and approval.^2^
    2. NEVO identity and process
      • Run the trusted NEVO component as a Windows service under a unique virtual service account, service SID, or dedicated local standard account—not LocalSystem.
      • Enable a service SID and grant that SID access only to NEVO’s keys, approval database, logs, and required IPC object. Service isolation exists specifically to secure files and registry keys to one service without using a highly privileged account.^3^
      • Remove ALFRED, Users, and Authenticated Users from those objects’ ACLs. NTFS supports per-identity read, write, and modify permissions; SACLs can audit attempted access.^4^
      • Protect the service object itself. ALFRED must not receive SERVICE_CHANGE_CONFIG, SERVICE_STOP, or similar rights, because those can permit service interference or code execution under its identity.^5^
    3. Communication boundary
      • Expose only fixed operations such as MoveApprovedFile, OpenApprovedDocument, or LaunchApprovedApplication; do not expose “run command,” “run Python,” or arbitrary path/argument execution.
      • A named pipe can have a DACL that permits ALFRED to connect while excluding other identities. Windows performs an access check against the client token when it connects.^6^
      • The pipe ACL authenticates who may connect; NEVO must still validate every operation, target, argument, approval, freshness value, and replay identifier.

    This does constitute a trusted broker boundary. If NEVO must perform actions that ALFRED is not allowed to perform directly, no combination of ACLs and application allowlisting can eliminate that mediator. The existing NEVO component can fill the role, but its request parser and operation handlers become security-critical.

    Keys and approval signatures

    Prefer asymmetric signatures instead of HMAC for owner/developer approvals. Keep the private signing key outside ALFRED and give NEVO only the public verification key. CNG verification uses the public key, while signing requires the private key.^7^

    With HMAC, verification and generation use the same secret. Therefore:

    • ALFRED must never verify HMAC approvals locally.
    • Only the NEVO service may decrypt or use the HMAC key.
    • Protect the stored secret with user-scoped DPAPI under NEVO’s service identity and an NTFS ACL for that identity. By default, DPAPI data can normally be decrypted only by the same user on the same computer.^8^
    • Do not use CRYPTPROTECT_LOCAL_MACHINE: any user on that computer can then decrypt the data.
    • DPAPI protects the secret at rest, not after NEVO decrypts it into memory. Compromise of NEVO allows an attacker to use the HMAC key and forge approvals.

    For asymmetric private keys, CNG key-storage providers offer stronger isolation. The Microsoft Platform Crypto Provider uses the TPM for hardware-backed key storage and prevents extraction of private keys.^9^ This improves key extraction resistance, but a compromised process authorized to invoke signing operations may still misuse the key.

    Restricting interpreters and executables

    Use App Control for Business as the device-wide executable/code-integrity layer and, where per-user differences are required, use AppLocker for ALFRED-specific restrictions. Both are available on supported Windows 11 editions, including Pro; App Control is the stronger security feature, while AppLocker provides per-user/group rules.^10^

    Important limitation: allowing python.exe generally permits Python to execute arbitrary scripts. App Control does not directly control scripts interpreted by unenlightened third-party hosts; allowing such a Python host implicitly allows its scripts.^11^

    Consequently, a robust design cannot simultaneously:

    • run ALFRED as unrestricted Python under one identity, and
    • rely on application control to prevent that compromised process from loading different Python source.

    Practical choices are:

    • Package ALFRED using Win32 app isolation/AppContainer and grant only declared capabilities. AppContainer is a security boundary operating at low integrity.^12^
    • Place the untrusted model/runtime in Windows Sandbox or a Hyper-V VM and expose only the NEVO interface. Windows Sandbox is available on Pro and provides a separate kernel, but it is disposable and networking is enabled by default.^13^
    • Remove Python from ALFRED’s allowed execution environment and deploy a fixed packaged executable whose writable data directories are separate from its protected code.

    AppLocker can additionally deny ALFRED access to PowerShell, CMD, script hosts, installers, and unapproved executables. Its script collection covers .ps1, .bat, .cmd, .vbs, and .js, but AppLocker is defense in depth rather than a defensible security boundary.^14^ Never allow execution by path from a directory ALFRED can write.

    Developer access

    Give Codex a separate, normally standard identity. Keep NEVO code owned by an administrative maintenance identity and grant Codex Modify only on the code tree during an approved maintenance window; never grant that permission to ALFRED. Remove the ACE afterward and restart NEVO from reviewed code.

    Windows 11 Pro provides ACL and group-membership mechanisms for this delegation, but the supplied documentation does not establish a built-in local just-in-time approval workflow. Automating expiration and approval would require management tooling or a trusted maintenance procedure. Existing processes retain their current access token, so identity/group changes may require a new logon or service restart.

    Compromise boundaries

    If ALFRED is compromised, separate identities and correctly configured ACLs continue to protect NEVO files, service configuration, and process memory. Without debug privilege, ALFRED cannot bypass another process’s DACL to read or write its memory.^15^ Application control and sandbox boundaries also remain applicable.

    If NEVO is compromised, its readable files, decrypted HMAC key, approval authority, permitted operations, and writable logs must be considered compromised. NTFS, DPAPI, and a separate process do not protect resources from the identity explicitly authorized to use them. TPM-backed non-exportable keys may resist extraction, but not unauthorized use through capabilities available to the compromised NEVO process. An administrator or kernel compromise is also outside the protection offered by ordinary service identities and NTFS ACLs.


    References

    1. Access tokens
    2. User Account Control overview
    3. Service Changes for Windows Vista
    4. Advanced credential protection
    5. Service Security and Access Rights
    6. Named Pipe Security and Access Rights
    7. Signing Data with CNG
    8. CryptProtectData function (dpapi.h)
    9. CNG Key Storage Providers
    10. App Control for Business and AppLocker Overview
    11. Script enforcement with App Control for Business
    12. Application isolation
    13. Windows Sandbox
    14. AppLocker
    15. Process Security and Access Rights
    AI-generated content may be incorrect. Read our transparency notes for more information.

    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.