IAM policies and ACLs require active management to be effective.
Before you make a bucket or object accessible to other users, be sure you know
who you want to share the bucket or object with and what roles you want each of
those people to have. Over time, changes in project management, usage patterns,
and organizational ownership may require you to modify IAM or ACL
settings on buckets and projects, especially if you manage
Cloud Storage in a large organization or for a large group of users. As
you evaluate and plan your access control settings, keep the following best
practices in mind:
Use the principle of least privilege when granting access to your buckets or
objects.
Theprinciple of least privilegeis a security
guideline for granting access to your resources. When you grant access based
on the principle of least privilege, you grant the minimum permission
that's necessary for a user to accomplish their assigned task. For example,
if you want to share files with someone, you should grant them thestorage.objectViewerIAM role or theREADERACLs
permission, and not thestorage.adminIAM role or theOWNERACLs permission.
Avoid granting IAM roles withsetIamPolicypermission or
granting the ACLOWNERpermission to people you do not know.
Granting thesetIamPolicyIAM permission or theOWNERACLs permission allows a user to change permissions and take control
of data. You should use roles with these permissions only when you want to
delegate administrative control over objects and buckets.
Be careful how you grant permissions for anonymous users.
TheallUsersandallAuthenticatedUsersprincipal types should only be
used when it is acceptable for anyone on the Internet to read and analyze
your data. While these scopes are useful for some applications and
scenarios, it is usually not a good idea to grant all users certain
permissions, such as the IAM permissionssetIamPolicy,update,create, ordelete, or the ACLsOWNERpermission.
Be sure you delegate administrative control of your buckets.
You should be sure that your resources can still be managed by
other team members should an individual with administrative access leave the
group.
To prevent resources from becoming inaccessible, you can do any of the
following:
Grant theStorage AdminIAM role for your project to a
group instead of an individual
Grant theStorage AdminIAM role for your project to
at least two individuals
Grant theOWNERACLs permission for your bucket to at least two
individuals
Be aware of Cloud Storage's interoperable behavior.
When using the XML API for interoperable access with other storage services,
such as Amazon S3, the signature identifier determines the ACL syntax. For
example, if the tool or library you are using makes a request to
Cloud Storage to retrieve ACLs and the request uses another storage
provider's signature identifier, then Cloud Storage returns an XML
document that uses the corresponding storage provider's ACL syntax. If the
tool or library you are using makes a request to Cloud Storage to
apply ACLs and the request uses another storage provider's signature
identifier, then Cloud Storage expects to receive an XML document
that uses the corresponding storage provider's ACL syntax.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Access control best practices\n\nThis page describes best practices for using\n[Identity and Access Management (IAM)](/storage/docs/access-control/iam)\nand [Access Control Lists (ACLs)](/storage/docs/access-control/lists) to manage access to your data.\n\nIAM policies and ACLs require active management to be effective.\nBefore you make a bucket or object accessible to other users, be sure you know\nwho you want to share the bucket or object with and what roles you want each of\nthose people to have. Over time, changes in project management, usage patterns,\nand organizational ownership may require you to modify IAM or ACL\nsettings on buckets and projects, especially if you manage\nCloud Storage in a large organization or for a large group of users. As\nyou evaluate and plan your access control settings, keep the following best\npractices in mind:\n\n- **Use the principle of least privilege when granting access to your buckets or\n objects.**\n\n The [*principle of least privilege*](https://en.wikipedia.org/wiki/Principle_of_least_privilege) is a security\n guideline for granting access to your resources. When you grant access based\n on the principle of least privilege, you grant the minimum permission\n that's necessary for a user to accomplish their assigned task. For example,\n if you want to share files with someone, you should grant them the\n `storage.objectViewer` IAM role or the `READER` ACLs\n permission, and not the `storage.admin` IAM role or the\n `OWNER` ACLs permission.\n- **Avoid granting IAM roles with `setIamPolicy` permission or\n granting the ACL `OWNER` permission to people you do not know.**\n\n Granting the `setIamPolicy` IAM permission or the\n `OWNER` ACLs permission allows a user to change permissions and take control\n of data. You should use roles with these permissions only when you want to\n delegate administrative control over objects and buckets.\n- **Be careful how you grant permissions for anonymous users.**\n\n The `allUsers` and `allAuthenticatedUsers` principal types should only be\n used when it is acceptable for anyone on the Internet to read and analyze\n your data. While these scopes are useful for some applications and\n scenarios, it is usually not a good idea to grant all users certain\n permissions, such as the IAM permissions `setIamPolicy`,\n `update`, `create`, or `delete`, or the ACLs `OWNER` permission.\n- **Be sure you delegate administrative control of your buckets.**\n\n You should be sure that your resources can still be managed by\n other team members should an individual with administrative access leave the\n group.\n\n To prevent resources from becoming inaccessible, you can do any of the\n following:\n - Grant the **Storage Admin** IAM role for your project to a\n group instead of an individual\n\n - Grant the **Storage Admin** IAM role for your project to\n at least two individuals\n\n - Grant the `OWNER` ACLs permission for your bucket to at least two\n individuals\n\n- **Be aware of Cloud Storage's interoperable behavior.**\n\n When using the XML API for interoperable access with other storage services,\n such as Amazon S3, the signature identifier determines the ACL syntax. For\n example, if the tool or library you are using makes a request to\n Cloud Storage to retrieve ACLs and the request uses another storage\n provider's signature identifier, then Cloud Storage returns an XML\n document that uses the corresponding storage provider's ACL syntax. If the\n tool or library you are using makes a request to Cloud Storage to\n apply ACLs and the request uses another storage provider's signature\n identifier, then Cloud Storage expects to receive an XML document\n that uses the corresponding storage provider's ACL syntax.\n\n For more information about using the XML API for interoperability with\n Amazon S3, see [Simple migration from Amazon S3 to Cloud Storage](/storage/docs/aws-simple-migration).\n\nWhat's next\n-----------\n\n- [Learn how to use IAM policies with Cloud Storage](/storage/docs/access-control/using-iam-permissions).\n- [Learn how to use ACLs with Cloud Storage](/storage/docs/access-control/create-manage-lists).\n- [Review the IAM reference table for Cloud Storage](/storage/docs/access-control/iam-reference)."]]