CREATE OBJECT (TYPE SECRET_ACCESS)
Alert
This command is deprecated and will be removed in future versions of YDB. The recommended syntax for working with secrets is described in the Secrets section.
All rights to use a secret belong to the secret's creator. The creator can grant another user read access to the secret through secret access management.
Access to secrets is managed using special SECRET_ACCESS objects. To grant permission to use the secret secret_name to the user user_name, create a SECRET_ACCESS object named secret_name:user_name.
CREATE OBJECT `secret_name:user_name` (TYPE SECRET_ACCESS);
Where:
secret_name— the name of the secret.user_name— the name of the user who receives access.
Example
The following statement grants access to the secret MySecretName to the user another_user:
CREATE OBJECT `MySecretName:another_user` (TYPE SECRET_ACCESS);