Organization access policy management
Note
This feature is in the Preview stage. To get access, contact tech support
Access policies are a Yandex Identity and Access Management mechanism that allows you to manage permissions for specific operations with Yandex Cloud resources. Access policies complement the role system for more flexible access management.
An organization's access policies can be managed by a user with the organization-manager.admin or admin role.
Assigning an access policy for an organization
To assign an access policy for an organization:
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
-
Get a list of supported access policies with their IDs.
-
Run this command:
yc organization-manager organization bind-access-policy \ --name <organization_name> \ --access-policy-template-id=<access_policy_ID>Where:
--name: Name of the organization you want to assign the policy to. Instead of the organization name, you can provide its ID in the--idparameter.--access-policy-template-id: ID of the access policy you want to assign to the specified organization.
-
Make sure the policy was assigned.
Use the bindAccessPolicy REST API method for the Organization resource or the OrganizationService/BindAccessPolicy gRPC API call.
The assigned access policy will apply to resources within all clouds in the specified organization.
Viewing the list of access policies assigned for an organization
To view the list of access policies assigned for an organization:
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
Run the command, specifying the name or ID of the organization for which you want to view the assigned policies:
yc organization-manager organization list-access-policy-bindings <organization_name_or_ID>
Result:
+------------------------------+
| ACCESS POLICY TEMPLATE ID |
+------------------------------+
| organization.denyUserListing |
+------------------------------+
Use the listAccessPolicyBindings REST API method for the Organization resource or the OrganizationService/ListAccessPolicyBindings gRPC API call.
Revoking an access policy assigned for an organization
To revoke an access policy assigned for an organization:
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
-
Get a list of access policy IDs assigned for the organization.
-
Run this command:
yc organization-manager organization unbind-access-policy \ --name <organization_name> \ --access-policy-template-id=<access_policy_ID>Where:
--name: Name of the organization you want to revoke the policy from. Instead of the organization name, you can provide its ID in the--idparameter.--access-policy-template-id: ID of the access policy you want to revoke from the specified organization.
-
Make sure the policy has been revoked.
Use the unbindAccessPolicy REST API method for the Organization resource or the OrganizationService/UnbindAccessPolicy gRPC API call.
The access policy will no longer apply to resources within all clouds in the specified organization.