이 페이지에서는 Secret Manager를 구성하는 데 사용할 수 있는 Identity and Access Management(IAM) 역할을 설명합니다. 역할은 주 구성원의 리소스 액세스 기능을 제한합니다. 항상 지정된 태스크를 수행하는 데 필요한 최소한의 권한 집합을 부여하세요.
Secret Manager 역할
다음은 Secret Manager와 연결된 IAM 역할입니다. IAM 역할을 사용해 리소스에 대한 액세스 권한을 부여, 변경 또는 취소하는 방법에 대한 자세한 내용은 리소스에 대한 액세스 권한 부여, 변경, 취소를 참조하세요.
Role
Permissions
Secret Manager Admin
(roles/secretmanager.admin)
Full access to administer Secret Manager resources.
Lowest-level resources where you can grant this role:
Secret
cloudkms.keyHandles.*
cloudkms.keyHandles.create
cloudkms.keyHandles.get
cloudkms.keyHandles.list
cloudkms.operations.get
cloudkms.projects.showEffectiveAutokeyConfig
resourcemanager.projects.get
resourcemanager.projects.list
secretmanager.*
secretmanager.locations.get
secretmanager.locations.list
secretmanager.secrets.create
secretmanager.secrets.createTagBinding
secretmanager.secrets.delete
secretmanager.secrets.deleteTagBinding
secretmanager.secrets.get
secretmanager.secrets.getIamPolicy
secretmanager.secrets.list
secretmanager.secrets.listEffectiveTags
secretmanager.secrets.listTagBindings
secretmanager.secrets.setIamPolicy
secretmanager.secrets.update
secretmanager.versions.access
secretmanager.versions.add
secretmanager.versions.destroy
secretmanager.versions.disable
secretmanager.versions.enable
secretmanager.versions.get
secretmanager.versions.list
Secret Manager Secret Accessor
(roles/secretmanager.secretAccessor)
Allows accessing the payload of secrets.
Lowest-level resources where you can grant this role:
Secret
resourcemanager.projects.get
resourcemanager.projects.list
secretmanager.versions.access
Secret Manager Secret Version Adder
(roles/secretmanager.secretVersionAdder)
Allows adding versions to existing secrets.
Lowest-level resources where you can grant this role:
Secret
resourcemanager.projects.get
resourcemanager.projects.list
secretmanager.versions.add
Secret Manager Secret Version Manager
(roles/secretmanager.secretVersionManager)
Allows creating and managing versions of existing secrets.
Lowest-level resources where you can grant this role:
Secret
resourcemanager.projects.get
resourcemanager.projects.list
secretmanager.versions.add
secretmanager.versions.destroy
secretmanager.versions.disable
secretmanager.versions.enable
secretmanager.versions.get
secretmanager.versions.list
Secret Manager Viewer
(roles/secretmanager.viewer)
Allows viewing metadata of all Secret Manager resources
Lowest-level resources where you can grant this role:
Secret
resourcemanager.projects.get
resourcemanager.projects.list
secretmanager.locations.*
secretmanager.locations.get
secretmanager.locations.list
secretmanager.secrets.get
secretmanager.secrets.getIamPolicy
secretmanager.secrets.list
secretmanager.secrets.listEffectiveTags
secretmanager.secrets.listTagBindings
secretmanager.versions.get
secretmanager.versions.list
최소 권한 원칙
최소 권한의 원칙을 따르면 지정된 태스크를 수행하는 데 필요한 최소 수준의 액세스 권한이 부여됩니다. 예를 들어 주 구성원이 단일 보안 비밀에 액세스해야 하는 경우 주 구성원에게 프로젝트 또는 조직의 다른 보안 비밀이나 모든 보안 비밀에 대한 액세스 권한을 부여하지 마세요. 주 구성원이 보안 비밀을 읽기만 해야 하는 경우에는 주 구성원에게 보안 비밀을 수정할 수 있는 권한을 부여하지 마세요.
IAM을 사용하여 Google Cloud 보안 비밀, 프로젝트, 폴더 또는 조직 수준의 IAM 역할과 권한을 부여할 수 있습니다. 항상 리소스 계층 구조에서 가장 낮은 수준의 권한을 적용합니다.
다음 표에는 Secret Manager 보안 비밀 접근자 역할(roles/secretmanager.secretAccessor)이 부여된 리소스 계층 구조의 수준을 기준으로 서비스 계정의 효과적인 기능이 나와 있습니다.
리소스 계층 구조
기능
보안 비밀
보안 비밀에만 액세스
프로젝트
프로젝트의 모든 보안 비밀에 액세스
폴더
폴더 내 모든 프로젝트의 모든 보안 비밀에 액세스
조직
조직 내 모든 프로젝트의 모든 보안 비밀에 액세스
roles/owner 역할에는 `secretmanager.versions.access` 권한이 포함되어 있지만 roles/editor 및 roles/viewer에는 포함되어 있지 않습니다.
주 구성원이 단일 보안 비밀 값에만 액세스해야 하는 경우 주 구성원에게 모든 보안 비밀에 액세스할 수 있는 권한을 부여하지 마세요. 예를 들어 서비스 계정에 단일 보안 비밀의 Secret Manager 보안 비밀 접근자 역할(roles/secretmanager.secretAccessor)을 부여할 수 있습니다.
주 구성원이 단일 보안 비밀만 관리해야 하는 경우 주 구성원에게 모든 보안 비밀을 관리할 수 있는 권한을 부여하지 마세요. 예를 들어 서비스 계정에 단일 보안 비밀의 Secret Manager 관리 역할(roles/secretmanager.admin)을 부여할 수 있습니다.
IAM 조건
IAM 조건을 사용하면 Secret Manager 리소스를 비롯한 일부 Google Cloud 리소스에 조건부 속성 기반 액세스 제어를 정의하고 적용할 수 있습니다.
Secret Manager에서 다음 속성을 기준으로 조건부 액세스를 적용할 수 있습니다.
날짜/시간 속성: Secret Manager 리소스에 만료, 예약 또는 기간 제한 액세스를 설정하는 데 사용합니다. 예를 들어 사용자가 지정된 날짜까지 보안 비밀에 액세스하도록 허용할 수 있습니다.
리소스 속성: 리소스 이름, 리소스 유형 또는 리소스 서비스 속성을 기반으로 조건부 액세스를 구성하는 데 사용합니다. Secret Manager에서 보안 비밀 속성과 보안 비밀 버전을 사용하여 조건부 액세스를 구성할 수 있습니다. 예를 들어 사용자가 특정 프리픽스로 시작하는 보안 비밀의 보안 비밀 버전만 관리하도록 허용하거나 특정 보안 비밀 버전에만 액세스하도록 허용할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-03(UTC)"],[],[],null,["# Access control with IAM\n\nThis page describes the Identity and Access Management (IAM) roles you can use to\nconfigure Secret Manager. Roles limit a principal's ability to\naccess resources. Always grant the minimum set of permissions required to\nperform a given task.\n\nSecret Manager roles\n--------------------\n\nFollowing are the IAM roles that are associated with\nSecret Manager. To learn how to grant, change, or revoke access to resources using\nIAM roles, see\n[Granting, changing, and revoking access to resources](/iam/docs/granting-changing-revoking-access).\n**Important:** To use Secret Manager with workloads running on Compute Engine or Google Kubernetes Engine, the underlying instance or node must have the `cloud-platform` OAuth scope. See [accessing the Secret Manager API](/secret-manager/docs/accessing-the-api#oauth-scopes) for more information. \n\nPrinciple of least privilege\n----------------------------\n\nWhen you follow the principle of least privilege, you grant the minimum level of\naccess to resources required to perform a given task. For example, if a\nprincipal needs access to a single secret, don't give that principal access to\nother secrets or all secrets in the project or organization. If a principal only\nneeds to read a secret, don't grant that principal the ability to modify the\nsecret.\n\nYou can use [IAM](/iam/docs/overview) to grant IAM\nroles and permissions at the level of the Google Cloud secret, project,\nfolder, or organization. Always apply permissions at the lowest level in the\n[resource hierarchy](/resource-manager/docs/cloud-platform-resource-hierarchy).\n\nThe following table shows the effective capabilities of a service account, based on the\nlevel of the resource hierarchy where the Secret Manager Secret Accessor role\n(`roles/secretmanager.secretAccessor`) is granted.\n\nThe role `roles/owner` includes the\n\\`secretmanager.versions.access\\` permission, but the `roles/editor`\nand `roles/viewer` do not.\n\nIf a principal only needs to access a single secret's value, don't grant that\nprincipal the ability to access **all** secrets. For example, you can grant a\nservice account the Secret Manager Secret Accessor role\n(`roles/secretmanager.secretAccessor`) on a single secret.\n\nIf a principal only needs to manage a single secret, don't grant that principal\nthe ability to manage all secrets. For example, you can grant a service\naccount the Secret Manager Admin role (`roles/secretmanager.admin`) on a single secret.\n\nIAM conditions\n--------------\n\n[IAM Conditions](/iam/docs/conditions-overview)\nallow you to define and enforce conditional, attribute-based access control for\nsome Google Cloud resources, including Secret Manager\nresources.\n\nIn Secret Manager, you can enforce conditional access\nbased on the following attributes:\n\n- **[Date/time attributes](/iam/docs/conditions-attribute-reference#date-time)**: Use to set expirable, scheduled, or limited-duration access to Secret Manager resources. For example, you could allow a user to access a secret until a specified date.\n- **[Resource attributes](/iam/docs/conditions-attribute-reference#resource)**: Use to configure conditional access based on a resource name, resource type, or resource service attributes. In Secret Manager, you can use attributes of secrets and secret versions to configure conditional access. For example, you can allow a user to manage secret versions only on secrets that begin with a specific prefix, or allow a user to access only a specific secret version.\n\nFor more information about IAM Conditions, see the\n[Conditions overview](/iam/docs/conditions-overview).\n\nWhat's next\n-----------\n\n- Learn how to [manage access to secrets](/secret-manager/docs/manage-access-to-secrets).\n- Learn how to apply the [principle of least privilege](/iam/docs/using-iam-securely#least_privilege) when managing Secret Manager resources by [creating and managing custom roles](/iam/docs/creating-custom-roles).\n- Learn about [IAM Conditions](/iam/docs/conditions-overview)."]]