AWS agent-toolkit high security documentation change
Summary
Updated troubleshooting topics: replaced 'I am not authorized to perform an action' and 'iam:PassRole' sections with new topics focused on AccessDenied errors and policy changes for AWS MCP Server. Removed cross-account access guidance and added details about using condition context keys.
Security assessment
The change explicitly addresses a security impact: outdated Deny policies using aws-mcp actions that no longer block access. It provides new guidance requiring policy updates to use 'aws:ViaAWSMCPService' condition keys to maintain access control, preventing unintended access via MCP Server.
Diff
diff --git a/agent-toolkit/latest/userguide/security_iam_troubleshoot.md b/agent-toolkit/latest/userguide/security_iam_troubleshoot.md index 1032d1fcb..90aff3a5b 100644 --- a//agent-toolkit/latest/userguide/security_iam_troubleshoot.md +++ b//agent-toolkit/latest/userguide/security_iam_troubleshoot.md @@ -7 +7 @@ -I am not authorized to perform an action in AWS MCP ServerI am not authorized to perform iam:PassRoleI want to allow people outside of my AWS account to access my AWS MCP Server resources +I get an access denied error when using AWS MCP ServerMy Deny policy using aws-mcp actions no longer blocks access @@ -11 +11 @@ I am not authorized to perform an action in AWS MCP ServerI am not authorized to -Use the following information to help you diagnose and fix common issues that you might encounter when working with Agent Toolkit for AWS and IAM. +Use the following information to help you diagnose and fix common issues when working with AWS MCP Server and IAM. @@ -15 +15 @@ Use the following information to help you diagnose and fix common issues that yo - * I am not authorized to perform an action in AWS MCP Server + * I get an access denied error when using AWS MCP Server @@ -17 +17 @@ Use the following information to help you diagnose and fix common issues that yo - * I am not authorized to perform iam:PassRole + * My Deny policy using aws-mcp actions no longer blocks access @@ -19 +18,0 @@ Use the following information to help you diagnose and fix common issues that yo - * I want to allow people outside of my AWS account to access my AWS MCP Server resources @@ -22,0 +22 @@ Use the following information to help you diagnose and fix common issues that yo +## I get an access denied error when using AWS MCP Server @@ -24 +24 @@ Use the following information to help you diagnose and fix common issues that yo -## I am not authorized to perform an action in AWS MCP Server +If you receive an `AccessDenied` error when AWS MCP Server calls a downstream AWS service on your behalf, check the following: @@ -26 +26 @@ Use the following information to help you diagnose and fix common issues that yo -If you receive an error that you're not authorized to perform an action, your policies must be updated to allow you to perform the action. + * Verify that your IAM role or user has the required permissions for the target AWS service action. AWS MCP Server uses your credentials, so you need the same permissions as you would for a direct API call. @@ -28 +28 @@ If you receive an error that you're not authorized to perform an action, your po -The following example error occurs when the `mateojackson` IAM user tries to use the console to view details about a fictional ``my-example-widget`` resource but doesn't have the fictional `:`GetWidget`` permissions. + * Check whether any SCPs or permission boundaries include Deny statements that use `aws:ViaAWSMCPService` or `aws:CalledViaAWSMCP` conditions that block MCP server access. @@ -29,0 +30 @@ The following example error occurs when the `mateojackson` IAM user tries to use + * If you previously used `aws-mcp:InvokeMcp` in Allow statements, note that these actions no longer have any effect. Your permissions for the downstream service are what matter. @@ -31 +31,0 @@ The following example error occurs when the `mateojackson` IAM user tries to use - User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: :GetWidget on resource: my-example-widget @@ -33 +32,0 @@ The following example error occurs when the `mateojackson` IAM user tries to use -In this case, the policy for the `mateojackson` user must be updated to allow access to the ``my-example-widget`` resource by using the `:`GetWidget`` action. @@ -35 +33,0 @@ In this case, the policy for the `mateojackson` user must be updated to allow ac -If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. @@ -37,30 +35 @@ If you need help, contact your AWS administrator. Your administrator is the pers -## I am not authorized to perform iam:PassRole - -If you receive an error that you're not authorized to perform the `iam:PassRole` action, your policies must be updated to allow you to pass a role to Agent Toolkit for AWS. - -Some AWS services allow you to pass an existing role to that service instead of creating a new service role or service-linked role. To do this, you must have permissions to pass the role to the service. - -The following example error occurs when an IAM user named `marymajor` tries to use the console to perform an action in Agent Toolkit for AWS. However, the action requires the service to have permissions that are granted by a service role. Mary does not have permissions to pass the role to the service. - - - User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole - -In this case, Mary's policies must be updated to allow her to perform the `iam:PassRole` action. - -If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. - -## I want to allow people outside of my AWS account to access my AWS MCP Server resources - -You can create a role that users in other accounts or people outside of your organization can use to access your resources. You can specify who is trusted to assume the role. For services that support resource-based policies or access control lists (ACLs), you can use those policies to grant people access to your resources. - -To learn more, consult the following: - - * To learn whether Agent Toolkit for AWS supports these features, see [How AWS MCP Server works with IAM](./security_iam_service-with-iam.html). - - * To learn how to provide access to your resources across AWS accounts that you own, see [Providing access to an IAM user in another AWS account that you own](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_aws-accounts.html) in the _IAM User Guide_. - - * To learn how to provide access to your resources to third-party AWS accounts, see [Providing access to AWS accounts owned by third parties](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html) in the _IAM User Guide_. - - * To learn how to provide access through identity federation, see [Providing access to externally authenticated users (identity federation)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_federated-users.html) in the _IAM User Guide_. - - * To learn the difference between using roles and resource-based policies for cross-account access, see [Cross account resource access in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html) in the _IAM User Guide_. +## My Deny policy using aws-mcp actions no longer blocks access @@ -67,0 +37 @@ To learn more, consult the following: +If you previously used Deny statements with `aws-mcp:InvokeMcp`, `aws-mcp:CallReadOnlyTool`, or `aws-mcp:CallReadWriteTool` to block access to AWS MCP Server, these actions no longer have any effect. Update your policies to use the condition context keys instead: @@ -69,0 +40,10 @@ To learn more, consult the following: + { + "Effect": "Deny", + "Action": "*", + "Resource": "*", + "Condition": { + "Bool": { + "aws:ViaAWSMCPService": "true" + } + } + } @@ -77 +57 @@ To use the Amazon Web Services Documentation, Javascript must be enabled. Please -AWS managed policies +Identity-based policy examples