AWS AWSEC2: Document EC2 shared tags (ec2:SharedTag/) and ABAC implications
Summary
Adds a new 'Sharing tags' section explaining the ec2:SharedTag/ prefix for AMI tags visible to accounts the image is shared with, plus rules and access-management/ABAC guidance.
Security assessment
Documents a new tag-sharing mechanism and warns that shared tags are visible to all accounts the image is shared with and can affect ABAC policies, which is security-relevant access-control guidance.
Evidence
When you use shared tags (tags with the `ec2:SharedTag/` prefix), be aware of the access-management implications.
Diff
diff --git a/AWSEC2/latest/UserGuide/Using_Tags.md b/AWSEC2/latest/UserGuide/Using_Tags.md index 338ddbe..9d4d771 100644 --- a//AWSEC2/latest/UserGuide/Using_Tags.md +++ b//AWSEC2/latest/UserGuide/Using_Tags.md @@ -7 +7 @@ -Tag basicsTag your resourcesTag restrictionsTags and access managementTag your resources for billing +Tag basicsTag your resourcesTag restrictionsSharing tagsTags and access managementTag your resources for billing @@ -24,0 +25,2 @@ Tag keys and their values are returned by many different API calls. Denying acce + * Sharing tags + @@ -53,0 +56,2 @@ Tags don't have any semantic meaning to Amazon EC2 and are interpreted strictly +For AMIs, you can share tags with other AWS accounts by using the `ec2:SharedTag/` prefix. For more information, see Sharing tags. + @@ -97 +101,20 @@ You can't terminate, stop, or delete a resource based solely on its tags; you mu -When you tag public or shared resources, the tags you assign are available only to your AWS account; no other AWS account will have access to those tags. For tag-based access control to shared resources, each AWS account must assign its own set of tags to control access to the resource. +When you tag public or shared resources, the tags you assign are available only to your AWS account; no other AWS account will have access to those tags. For tag-based access control to shared resources, each AWS account must assign its own set of tags to control access to the resource. For an exception to this rule, see Sharing tags. + +## Sharing tags + +By default, user-defined tags are private to the AWS account that creates them. However, for image resources, you can use the `ec2:SharedTag/` prefix to create tags that are visible to all AWS accounts with which you share the image. + +The following rules apply to shared tags: + + * Amazon EC2 supports shared tags only for image resources. You cannot use the `ec2:SharedTag/` prefix on other EC2 resource types. + + * Only the resource owner can create, modify, or delete tags with the `ec2:SharedTag/` prefix. Accounts with which you share the image can view these tags but cannot change them. + + * Shared tags count against the resource owner's tags-per-resource quota (50 tags per resource). They do not count against the quota of accounts with which you share the image. + + * When you copy an image that has shared tags, Amazon EC2 copies the shared tags to the new image. + + * Shared tags can affect access management. Before you share tags, review Tags and access management. + + + @@ -104,0 +128,2 @@ You can also use resource tags to implement attribute-based control (ABAC). You +When you use shared tags (tags with the `ec2:SharedTag/` prefix), be aware of the access-management implications. Unlike other user-defined tags, shared tags are visible to every AWS account that you share the image with. We recommend that you use shared tags only for values that you intend all accounts with access to see. If those accounts have attribute-based access control (ABAC) policies that evaluate tags, those policies also apply to the shared image. Only the resource owner can create, modify, or delete shared tags. As a result, accounts that you share the image with can't change the tag values that their policies depend on. When you use a shared image, the image owner sets its `ec2:SharedTag/` tags and you can't change them, so account for these tags in any ABAC policies that you use to control access to the image. For more information about shared tags, see Sharing tags. +