Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Key Management Service
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Keys
    • Key version
    • Data encryption
  • Concepts
    • Overview
    • Keys
    • Key version
    • Encryption
    • Envelope encryption
    • Key consistency
    • Quotas and limits
  • Use cases
    • All use cases
    • Data encryption
      • Which encryption method should I choose?
      • Encrypting data using the Yandex.Cloud CLI and API
      • Encrypting data using the Yandex.Cloud SDK
      • Encrypting data using the AWS Encryption SDK
      • Encrypting data using Google Tink
    • Encrypting secrets in Managed Service for Kubernetes
    • KMS key management with Hashicorp Terraform
    • Encrypting secrets in Hashicorp Terraform
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • SymmetricCryptoService
      • SymmetricKeyService
      • OperationService
    • REST
      • Overview
      • SymmetricCrypto
        • Overview
        • decrypt
        • encrypt
        • generateDataKey
        • reEncrypt
      • SymmetricKey
        • Overview
        • cancelVersionDestruction
        • create
        • delete
        • get
        • list
        • listAccessBindings
        • listOperations
        • listVersions
        • rotate
        • scheduleVersionDestruction
        • setAccessBindings
        • setPrimaryVersion
        • update
        • updateAccessBindings
  • Questions and answers
  1. Access management

Access management

  • About access management
  • What resources you can assign roles to.
  • What roles exist in the service
    • Service roles
    • Primitive roles
  • What roles do I need

In this section, you'll learn:

  • What resources you can assign roles to.
  • What roles exist in the service.
  • What roles are required for particular actions.

About access management

All transactions in Yandex.Cloud are checked by the Identity and Access Management service. If a subject doesn't have the required permission, the service returns an error.

To grant permission to a resource, assign roles for this resource to the subject that will perform operations. Roles can be assigned to a Yandex account, service account, or system group. For more information, see How access management works in Yandex.Cloud.

Only users with the admin or resource-manager.clouds.owner role for a resource can assign roles for this resource.

What resources you can assign roles to.

You can assign roles for a cloud, folder, or key. These roles also apply to nested resources.

What roles exist in the service

You can manage access to KMS keys using both service and primitive roles. The diagram shows which roles are available in the service and how they inherit each other's permissions. For example, the editor role includes all viewer role permissions. A description of each role is given under the diagram.

Service roles

Service roles provide more granular control over KMS keys, taking into account the service specifics: a strict division of subjects into key administrators (the kms.admin role) and users (the kms.keys.encrypterDecrypter role).

Users without the resource-manager.clouds.owner or admin role can't assign roles via the management console.

List of service roles:

  • kms.keys.encrypterDecrypter: Lets you perform data encryption and decryption operations and view information about keys.
  • kms.admin: Lets you manage keys (view, create, update, destroy, rotate keys, as well as encrypt and decrypt data). It also lets you assign the kms.keys.encrypterDecrypter role for keys using the CLI and API.

Primitive roles

Primitive roles are common to all Yandex.Cloud resources. Assigning any of them grants certain permissions in KMS and other cloud services. For example, the admin role assigned for a folder lets you destroy any KMS key in that folder and update the folder itself or resources in it. You can manage primitive roles using the management console.

List of primitive roles:

  • viewer: Only lets you view information about the resources.

  • editor: Lets you manage resources (create, edit, and delete).

  • admin: Lets you manage resources and access them.

What roles do I need

Example of key access control

We recommend working with roles as follows:

  1. The cloud owner (the resource-manager.clouds.owner role) or administrator (the admin role) assigns the kms.admin role to the KMS administrator.
  2. The KMS administrator creates the required number of keys and assigns (through the CLI or API) roles to use them: subjects from different teams are granted the kms.keys.encrypterDecrypter role for the keys they need.

It's good practice to store KMS keys in a dedicated folder, separately from other Yandex.Cloud resources.

Action Methods Required roles
KMS
Get information about keys and versions get, listVersions kms.keys.encrypterDecrypter for a key
Operations of encryption and decryption encrypt, decrypt, reencrypt, generatedatakey kms.keys.encrypterDecrypter for a key
Get a list of keys in a folder list kms.admin for a key
Create and update a key create, update kms.admin for a key
Rotate a key and change the primary version rotate, setPrimaryVersion kms.admin for a key
Destroy a key and version delete, scheduleVersionDestruction, cancelVersionDestruction kms.admin for a key
Assign, revoke, and view roles granted for the key setAccessBindings, updateAccessBindings, listAccessBindings kms.admin for a key

What's next

  • How to use Yandex.Cloud securely
  • How to assign a role.
  • How to revoke a role.
  • Read more about access management in Yandex.Cloud.
  • More about role inheritance.
In this article:
  • About access management
  • What resources you can assign roles to.
  • What roles exist in the service
  • Service roles
  • Primitive roles
  • What roles do I need
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC