Access management in Key Management Service
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
resource-manager.clouds.owner role for a resource can assign roles for this resource.
What resources you can assign roles to
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 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
Users without the
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.encrypterDecrypterrole for keys using the CLI and API.
Primitive roles are common to all resources Yandex Cloud. Assigning any of them grants certain permissions in KMS and other cloud services. For example, the
admin role assigned for a folder can enable you to remove any KMS keys in a folder and modify the folder itself or the resources it contains. You can manage primitive roles using the management console.
List of primitive roles:
viewer: Provides viewing access only to resource information.
editor: Lets you manage (create and edit) resources.
admin: Lets you manage access to resources as well as the resources themselves (create, modify, and delete).
What roles do I need
Example of key access control
We recommend working with roles as follows:
- The cloud owner (the
resource-manager.clouds.ownerrole) or administrator (the
adminrole) assigns the
kms.adminrole to the KMS administrator.
- 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.encrypterDecrypterrole for the keys they need.
It's good practice to store KMS keys in a dedicated folder apart from other Yandex Cloud resources.
|Get information about keys and versions||
|Encryption and decryption||
|Get a list of keys in a folder||
|Create and update a key||
|Rotate a key and update the primary version||
|Destroy a key and version||
|Assign, revoke, and view roles granted for the key||