View a markdown version of this page

Security considerations and shared responsibility for agent-ready WorkSpaces - Amazon WorkSpaces

Security considerations and shared responsibility for agent-ready WorkSpaces

Note

This feature is in public preview. Features and behavior are subject to change.

Security for agent-ready WorkSpaces is shared between AWS and you. AWS runs the WorkSpaces gateway and the Agentic Catalog, and applies your policies to the agent on each WorkSpace. You decide what the agent can reach, which rights your users have on their WorkSpaces, and how your network is set up.

An AI agent can be misled by content that it reads, such as a file, a web page, or a tool result. This is called prompt injection. The controls on this page assume that the agent might act against the user's intent, and they limit what the agent can reach when it does.

Shared responsibility

The following table lists what AWS is responsible for and what you are responsible for. For the general model, see Shared responsibility model on the AWS website and Security in Amazon WorkSpaces in the Amazon WorkSpaces Administration Guide.

AWS is responsible for You are responsible for
Running the WorkSpaces gateway that sends the agent's model and connector requests Choosing which models, connectors, and contexts each persona configuration offers
Keeping model credentials and connector sign-in tokens off the WorkSpace Your Amazon Bedrock access, the inference role, and your service control policies (SCPs)
Running the agent as its own restricted Windows account, and applying your OS policy to the agent and the programs that it starts Writing your policies: the agent's internet access, folder grants, denied folders, tools, and approvals
Blocking the agent from the instance metadata service, and denying common credential locations to the agent Adding your own credential and secret folders to the denied list
Keeping the agent from using the user's administrator rights Deciding whether your users are local administrators
Network isolation between WorkSpaces, and between WorkSpaces and your other resources Which projects, hooks, and Model Context Protocol (MCP) servers your users open, and other software that runs on the WorkSpace
Delivering a usage-log record for each model request Turning on usage-log delivery and reviewing the logs

How the agent is contained on the WorkSpace

Each user's WorkSpace is a separate virtual machine, and that is the boundary between users. On the WorkSpace, the agent runs as its own Windows account with fewer rights than the user, and Windows applies your OS policy to the agent and the programs that it starts. The agent and the user share the same Windows instance, so these controls limit a misled or faulty agent. They aren't designed to contain hostile code that a user runs on purpose.

Because Windows applies the OS policy, a script, interpreter, or build tool that the agent runs gets the same limits as the agent. The Agent Harness policy is a second layer that the agent applies to its own tools. It doesn't restrict programs that the agent starts. For how the two policies differ, see Security policies.

To work with code that you don't trust, use a separate WorkSpace that has no access to sensitive data or credentials.

What the agent can and can't access

Files

By default, the agent can do the following:

  • Read and change files in the user's workspace folder, where chat and terminal sessions start, and in its own folders.

  • Read, but not change, a default set of the user's folders: Documents, Desktop, Downloads, common source-code folders such as source and repos, and developer tool caches. No policy entry is needed for this.

  • Create files in folders where Windows lets every user create files, such as the root of the D: drive. This access doesn't come from your policy. It comes from the folder's own Windows permissions.

WorkSpaces blocks the agent from reading common credential locations, even inside the preceding folders. Examples are .ssh, .aws, cloud CLI credential folders, and browser profile and sign-in stores.

You change this access with your policies:

  • In the OS policy, writablePaths and readablePaths grant the agent write or read access to more folders. Folders in the workingDirectories setting of the Agent Harness policy are also writable.

  • deniedPaths blocks the agent, and programs that it starts, from reading or writing a folder. A denied folder wins over a grant. For cases where a denied folder doesn't block access, see Known limitations.

  • Grants that name the whole user profile, or a folder that contains it, aren't accepted.

Files that the agent creates are owned by the agent's account, not by the user.

In commands and tools that the agent runs, ~, %USERPROFILE%, and Documents point to the agent's own profile, not the user's. Give the agent full paths to the user's files. In policy paths, ~ and %USERPROFILE% mean the user's profile. For more information, see Security policies.

Network

By default, WorkSpaces blocks internet access for the agent and the programs that it starts. The disableInternetAccess setting in your OS policy defaults to true. To let the agent reach the internet, set it to false.

This setting applies only to the agent and the programs that it starts. The user and the user's own apps keep their normal network access, which your own network settings control.

Model requests and managed MCP connectors keep working while the agent's internet access is off, because they go through the WorkSpaces gateway.

WorkSpaces blocks the agent from reaching the instance metadata service. Your policies don't change this.

When you turn on internet access for the agent, the agent and the programs that it starts can download packages, tools, and other code and run it. That code runs as the agent's account, with the same limits as the agent.

Desktop and clipboard

The agent runs on a desktop of its own. Windows that the agent opens aren't visible to the user. WorkSpaces blocks the agent from capturing the user's screen, sending input to the user's windows, and using the user's clipboard.

The user's programs and administrator rights

Windows blocks the agent from controlling the user's programs or reading their memory, because the agent runs as its own account. The agent and the user share one Windows session, so some session-wide state is shared. For more information, see Known limitations.

Windows blocks the agent from using the user's administrator rights, even when the user is a local administrator. For example, it can't install a Windows service or a driver.

Programs that the agent starts end when its session ends.

Network identity

The agent has no domain identity, and Windows blocks it from using the user's domain sign-in. As a result, the agent doesn't have the user's access to network file shares or other domain services. Files on network shares, and profiles stored by roaming profiles or FSLogix, aren't available to the agent.

Credentials and secrets

Model credentials aren't stored on the WorkSpace. The gateway uses a short-term key that it creates from the inference role in your account. For more information, see Prerequisites for agent-ready WorkSpaces.

The service holds connector sign-in tokens. They aren't stored on the WorkSpace. The agent can do only what the user's account can do in the connected service. For more information, see MCP connectors.

The agent doesn't have access to the user's saved Git credentials. Users push code themselves, or give the agent a token scoped to the task.

Credential protection covers known locations. A copy of a secret in another folder that the agent can read is readable to the agent. Add your organization's credential and secret folders to deniedPaths, and keep secrets out of the folders that the agent reads by default.

Local administrator rights

Important

A user who is a local administrator on the WorkSpace can change or turn off the controls on the WorkSpace, including the agent's restrictions. This is how Windows administrator rights work, and other controls that run on the WorkSpace have the same limit. Model credentials still stay off the WorkSpace, and the gateway still applies your model and connector settings to the requests that go through it.

WorkSpaces gives users local administrator rights by default. To keep your users from overriding the agent's controls, make them standard users:

  • For directories managed through AWS Directory Service, turn off the local administrator setting for the directory. The change applies to new WorkSpaces and to WorkSpaces that you rebuild. For more information, see Manage local administrator permissions for WorkSpaces Personal in the Amazon WorkSpaces Administration Guide.

  • For AWS IAM Identity Center directories, use your device-management tool. For Microsoft Entra ID with Microsoft Intune, set User account type to Standard in the Windows Autopilot deployment profile. For more information, see Windows Autopilot profiles on the Microsoft Learn website.

Even when the user is a local administrator, Windows blocks the agent itself from using those rights.

Keep Windows Developer Mode off. With Developer Mode on, the agent can create symbolic links.

Don't use Group Policy to change permissions or firewall rules that WorkSpaces sets for the agent.

Network security

WorkSpaces in the same subnet or VPC can reach each other unless you restrict it. Use security groups, network ACLs, and route tables to isolate WorkSpaces from each other and from your other resources. While the agent's internet access is off, WorkSpaces also blocks the agent and the programs that it starts from connecting to other WorkSpaces. The user and the user's own apps still can.

Model requests leave the WorkSpace through an endpoint that WorkSpaces manages. Your VPC egress controls don't apply to this traffic. For more information, see AI models.

The agent's internet block doesn't stop DNS name resolution. To control which names can be looked up from the WorkSpace, use DNS controls in your VPC, such as Amazon Route 53 Resolver DNS Firewall.

For the network access that WorkSpaces needs, see Prerequisites for agent-ready WorkSpaces and Troubleshoot agent-ready WorkSpaces.

Hooks, MCP servers, and integrations

Hooks and MCP servers

Hooks and MCP servers from a user's settings or from a project's settings run automatically. MCP servers from a project's settings start without an approval request. They run as the agent's account, inside the limits of your OS policy. They don't go through the WorkSpaces gateway, and they aren't in the usage logs.

To allow only the MCP servers that you set up in the Agentic Catalog, set allowManagedMcpServersOnly to true in the Agent Harness policy. For more information, see Security policies.

Your policies don't block hooks from a user's or a project's settings.

Users should review a project's .claude folder and MCP configuration before they work in it. For more information, see Approve agent actions in the agent-ready WorkSpaces User Guide.

Git repositories that the agent creates

The user's Git refuses repositories that the agent created, with a dubious ownership error. This is on purpose, because a repository can carry hooks that run as the user. Before you trust such a repository with git config --global --add safe.directory, check its .git\hooks folder. Repositories that the user owns, in folders granted to the agent, work with no extra step.

Editors, SDKs, and ACP clients

Tools that start the agent get the agent's restrictions only when they start it through the agent-ready WorkSpaces wrapper, C:\Program Files\Amazon\AgenticWorkspaces\wrapper\claude.exe. Set the wrapper as the Claude Code executable in each tool:

Tool Setting
Claude Agent SDK for TypeScript pathToClaudeCodeExecutable
Claude Agent SDK for Python cli_path
ACP adapter for Claude Code, for Agent Client Protocol (ACP) clients CLAUDE_CODE_EXECUTABLE environment variable
Claude Code extension for Visual Studio Code claudeCode.claudeProcessWrapper
Important

A copy of Claude Code, or another agent, that a user installs or starts in another way runs as the user, without the agent's restrictions. This includes the copy that an SDK bundles.

Keep in mind:

  • When a tool starts the agent through the wrapper, the agent's approval requests go to that tool, and the tool's allow and deny decisions apply. A program built with an SDK can approve requests without asking the user.

  • An ACP client can set the permission mode for its sessions. If you want the agent to ask before it acts, set the mode in the client.

  • Some editors start a project's MCP servers as the user when a folder opens, outside the agent. For example, the built-in GitHub Copilot runtime in Visual Studio Code does this. Users should open only folders that they trust.

Monitoring and audit

  • AWS CloudTrail records administrative API calls for agent-ready WorkSpaces.

  • Usage logs record each model request: the WorkSpace, the user, the model, token counts, and how the request ended. They don't include prompts or responses. For more information, see Monitoring agent usage.

  • Usage logs don't include connector calls, hooks, local MCP servers, or commands that the agent runs on the WorkSpace.

  • To stop agents from using a model, remove it from the allowed models for your account. The model stops working on your WorkSpaces within about a minute. For more information, see AI models.

Data protection

  • Model and connector requests travel from the WorkSpace to the WorkSpaces gateway over TLS.

  • Model requests can be processed in other US Regions through cross-Region inference. For more information, see AI models.

  • The agent can send data wherever you allow it: to models, to connected services with the user's access, and to the internet if you turn on the agent's internet access. OS policies don't inspect content. Choose connectors, the agent's internet access, and approval settings with this in mind.

Known limitations

The following table lists limits of the controls, and what to do about each.

Limitation What to do
A file or subfolder inside a denied folder that doesn't inherit the folder's permissions keeps its own permissions. If those allow all users (such as Users, Everyone, or Authenticated Users), the agent can read it. Keep secrets in files that only the user can read. Inside denied folders, keep inheritance turned on, and fix files that allow all users.
A file moved into a denied folder from elsewhere on the same drive keeps its old permissions, and can stay readable to the agent. Copy the file instead of moving it, or run icacls file /reset after the move.
A denied folder created after the policy applies is open to the agent for up to about 30 seconds. Create denied folders before you apply the policy.
If a user runs git clean -fdx in a repository that contains a denied folder, Git deletes the folder as it does other untracked folders. The folder is denied again within about 30 seconds after it's re-created. Keep denied folders outside repositories.
Removing a write grant doesn't stop the agent from creating files where Windows lets every user create files, such as D:\. Add the folder to deniedPaths. A denied folder also blocks reads.
Removing a grant doesn't remove all of the agent's access. Files that the agent already has open stay open, and some folders that the agent created can stay open to it. Removing a grant on a folder inside the workspace folder doesn't change the agent's access, because the workspace folder stays writable. Start a new agent session after you remove a grant. Name only folders outside the workspace folder in workingDirectories and writablePaths.
The policy accepts folders that don't exist, with no warning, and the console shows the policy as in sync. Check each path before you apply the policy.
When you turn on internet access for the agent, the agent can download and run code, inside its limits. Keep the agent's internet access off, which is the default, unless the work needs it.
A copy of Claude Code that doesn't start through the wrapper, and MCP servers that an editor starts, run as the user. Point tools at the wrapper, and open only trusted folders. See Hooks, MCP servers, and integrations.
The agent shares the user's Windows session. A running agent can stop some of the user's tools from starting, for example Git Bash. End the agent's session. The tool starts again once the agent's process ends.
With Windows Developer Mode on, the agent can create symbolic links. Keep Developer Mode off.

Security best practices for agent-ready WorkSpaces

  • To keep users from overriding the agent's controls, make them standard users.

  • Start from the locked-down sample policy in Security policies, and open only what the work needs.

  • Keep disableInternetAccess at its default, true, unless the agent's work needs internet access.

  • Add your organization's credential and secret folders to deniedPaths, and create those folders before you apply the policy.

  • Name only the folders that need a grant in workingDirectories and writablePaths. Subfolders of the workspace folder are already writable.

  • Set allowManagedMcpServersOnly to true.

  • Use the default or plan permission mode for sensitive code.

  • Isolate WorkSpaces from each other with security groups.

  • Turn on usage-log delivery.

  • Keep Windows Developer Mode off.

  • Point editors, SDKs, and ACP clients at the wrapper.

  • Ask users to open only projects that they trust, and to read each approval request before they approve it. For more information, see Approve agent actions in the agent-ready WorkSpaces User Guide.