[Yandex Cloud documentation](../../index.md) > [Yandex MPP Analytics for PostgreSQL](../index.md) > Access management

# Access management in Yandex MPP Analytics for PostgreSQL


In this section, you will learn about:

* [Resources you can assign a role for](#resources).
* [Roles this service has](#roles-list).
* [Roles required for specific actions](#required-roles).

## Access management {#about-access-control}

[Yandex Identity and Access Management](../../iam/index.md) checks all operations in Yandex Cloud. If an entity does not have required permissions, IAM returns an error.


To grant permissions for a resource, [assign](../../iam/operations/roles/grant.md) the relevant resource roles to an entity performing operations. You can assign roles to a [Yandex account](../../iam/concepts/users/accounts.md#passport), [service account](../../iam/concepts/users/service-accounts.md), [local user](../../iam/concepts/users/accounts.md#local), [federated user](../../iam/concepts/federations.md), [user group](../../organization/operations/manage-groups.md), [system group](../../iam/concepts/access-control/system-group.md), or [public group](../../iam/concepts/access-control/public-group.md). For more information, see [How access management works in Yandex Cloud](../../iam/concepts/access-control/index.md).

To assign a role for a resource, you need the `mdb.admin` role, `managed-greenplum.admin` role, or one of the following roles for that resource:

* `admin`
* `resource-manager.admin`
* `organization-manager.admin`
* `resource-manager.clouds.owner`
* `organization-manager.organizations.owner`

## Resources supporting role assignment {#resources}

You can assign a role to an [organization](../../organization/concepts/organization.md), [cloud](../../resource-manager/concepts/resources-hierarchy.md#cloud), or [folder](../../resource-manager/concepts/resources-hierarchy.md#folder). The roles assigned to organizations, clouds, and folders also apply to their nested resources.

To allow access to Yandex MPP Analytics for PostgreSQL resources, assign the user the appropriate roles for the folder, cloud, or organization containing these resources.

You can assign a role for an individual cluster in the [management console](https://console.yandex.cloud), via the [CLI](../../cli/index.md), or [API](../api-ref/authentication.md).

## Roles this service has {#roles-list}

The diagram below shows available service roles and their permission inheritance hierarchy. For example, `editor` inherits all `viewer` permissions. You can find role descriptions below the diagram.

```mermaid
%%{
  init: {
    "flowchart": { "defaultRenderer": "elk" },
    "elk": { "nodePlacementStrategy": "NETWORK_SIMPLEX" }
  }
}%%
flowchart BT
    managed-greenplum.auditor --> managed-greenplum.viewer --> managed-greenplum.editor
    managed-greenplum.maintenanceTask.viewer --> managed-greenplum.maintenanceTask.editor
    managed-greenplum.maintenanceTask.viewer --> managed-greenplum.viewer["`managed-greenplum.
    viewer`"]
    managed-greenplum.maintenanceTask.viewer --> mdb.maintenanceTask.viewer
    mdb.auditor --> mdb.maintenanceTask.viewer
    managed-greenplum.viewer --> managed-greenplum.restorer["`managed-greenplum.
    restorer`"]
    managed-greenplum.viewer --> mdb.viewer
    managed-greenplum.restorer --> managed-greenplum.editor
    mdb.maintenanceTask.viewer --> mdb.maintenanceTask.editor
    managed-greenplum.maintenanceTask.editor --> mdb.maintenanceTask.editor
    managed-greenplum.maintenanceTask.editor["`managed-greenplum.
    maintenanceTask.editor`"] --> managed-greenplum.editor
    managed-greenplum.auditor["`managed-greenplum.
    auditor`"] --> managed-greenplum.maintenanceTask.viewer["`managed-greenplum.
    maintenanceTask.viewer`"]
    managed-greenplum.auditor --> mdb.auditor
    managed-greenplum.user --> managed-greenplum.editor
    managed-greenplum.editor --> managed-greenplum.admin
    managed-greenplum.restorer --> mdb.restorer
    mdb.viewer --> mdb.restorer
    managed-greenplum.admin --> mdb.admin
    mdb.viewer --> mdb.admin
    managed-greenplum.clusters.connector["`managed-greenplum.
  clusters.connector`"]
    vpc.publicAdmin
```

### Service roles {#service-roles}

#### managed-greenplum.clusters.connector {#managed-greenplum-clusters-connector}

The `managed-greenplum.clusters.connector` role enables Yandex Cloud [users](../../iam/concepts/users/accounts.md) to connect to databases in [Yandex MPP Analytics for PostgreSQL clusters](../../managed-mysql/concepts/index.md) within Yandex MPP Analytics for PostgreSQL via [Yandex Identity and Access Management](../../iam/index.md).

#### managed-greenplum.auditor {#managed-greenplum-auditor}

The `managed-greenplum.auditor` role enables viewing info on [Yandex MPP Analytics for PostgreSQL clusters](../concepts/index.md), [access permissions](../../iam/concepts/access-control/index.md) granted for them, [hosts](../concepts/instance-types.md) and cluster [backups](../concepts/backup.md), and on [quotas](../concepts/limits.md#quotas) and resource operations for Yandex MPP Analytics for PostgreSQL.

#### managed-greenplum.viewer {#managed-greenplum-viewer}

The `managed-greenplum.viewer` role enables viewing info on Yandex MPP Analytics for PostgreSQL clusters and their hosts within Yandex MPP Analytics for PostgreSQL, as well as viewing cluster logs and info on quotas and service resource operations.

Users with this role can:
* View info on [Yandex MPP Analytics for PostgreSQL clusters](../concepts/index.md) and [access permissions](../../iam/concepts/access-control/index.md) granted for them.
* View info on [maintenance](../concepts/maintenance.md) tasks for Yandex MPP Analytics for PostgreSQL clusters.
* View info on Yandex MPP Analytics for PostgreSQL cluster [hosts](../concepts/instance-types.md).
* View info on Yandex MPP Analytics for PostgreSQL cluster [backups](../concepts/backup.md).
* View Yandex MPP Analytics for PostgreSQL cluster logs.
* View info on the results of Yandex MPP Analytics for PostgreSQL cluster performance diagnostics.
* View info on [quotas](../concepts/limits.md#quotas) for Yandex MPP Analytics for PostgreSQL.
* View info on resource operations for Yandex MPP Analytics for PostgreSQL.

This role includes the `managed-greenplum.auditor` and `managed-greenplum.maintenanceTask.viewer` permissions.

#### managed-greenplum.restorer {#managed-greenplum-restorer}

The `managed-greenplum.restorer` role enables restoring Yandex MPP Analytics for PostgreSQL clusters from backups within Yandex MPP Analytics for PostgreSQL, viewing info on Yandex MPP Analytics for PostgreSQL clusters and hosts, their logs, as well as info on quotas and service resource operations.

Users with this role can:
* View info on [Yandex MPP Analytics for PostgreSQL cluster](../concepts/index.md) backups and restore clusters from [backups](../concepts/backup.md).
* View info on Yandex MPP Analytics for PostgreSQL clusters and [access permissions](../../iam/concepts/access-control/index.md) granted for them.
* View info on [maintenance](../concepts/maintenance.md) tasks for Yandex MPP Analytics for PostgreSQL clusters.
* View info on Yandex MPP Analytics for PostgreSQL cluster [hosts](../concepts/instance-types.md).
* View Yandex MPP Analytics for PostgreSQL cluster logs.
* View info on the results of Yandex MPP Analytics for PostgreSQL cluster performance diagnostics.
* View info on [quotas](../concepts/limits.md#quotas) for Yandex MPP Analytics for PostgreSQL.
* View info on resource operations for Yandex MPP Analytics for PostgreSQL.

This role includes the `managed-greenplum.viewer` permissions.

#### managed-greenplum.user {#managed-greenplum-user}

The `managed-greenplum.user` role enables using [Yandex MPP Analytics for PostgreSQL clusters](../concepts/index.md).

#### managed-greenplum.editor {#managed-greenplum-editor}

The `managed-greenplum.editor` role enables managing Yandex MPP Analytics for PostgreSQL clusters in Yandex MPP Analytics for PostgreSQL.

Users with this role can:
* View info on [Yandex MPP Analytics for PostgreSQL clusters](../concepts/index.md), as well as create, use, modify, delete, run, and stop them.
* View info on [access permissions](../../iam/concepts/access-control/index.md) granted for Yandex MPP Analytics for PostgreSQL clusters.
* View info on [maintenance](../concepts/maintenance.md) tasks for Yandex MPP Analytics for PostgreSQL clusters and modify such tasks.
* View info on Yandex MPP Analytics for PostgreSQL cluster [hosts](../concepts/instance-types.md), as well as create, modify, and delete them.
* View info on Yandex MPP Analytics for PostgreSQL cluster [backups](../concepts/backup.md), create and delete such backups, as well as restore clusters from backups.
* View Yandex MPP Analytics for PostgreSQL cluster logs.
* View info on the results of Yandex MPP Analytics for PostgreSQL cluster performance diagnostics.
* View info on [quotas](../concepts/limits.md#quotas) for Yandex MPP Analytics for PostgreSQL.
* View info on resource operations for Yandex MPP Analytics for PostgreSQL.

This role includes the `managed-greenplum.viewer`, `managed-greenplum.user`, `managed-greenplum.restorer`, and `managed-greenplum.maintenanceTask.editor` permissions.

To create Yandex MPP Analytics for PostgreSQL clusters within Yandex MPP Analytics for PostgreSQL, you also need the `vpc.user` role.

#### managed-greenplum.admin {#managed-greenplum-admin}

The `managed-greenplum.admin` role enables managing Yandex MPP Analytics for PostgreSQL clusters and access to them in Yandex MPP Analytics for PostgreSQL.

Users with this role can:
* View info on [access permissions](../../iam/concepts/access-control/index.md) granted for [Yandex MPP Analytics for PostgreSQL clusters](../concepts/index.md) and modify such permissions.
* View info on Yandex MPP Analytics for PostgreSQL clusters, as well as create, use, modify, delete, run, and stop them.
* View info on [maintenance](../concepts/maintenance.md) tasks for Yandex MPP Analytics for PostgreSQL clusters and modify such tasks.
* View info on Yandex MPP Analytics for PostgreSQL cluster [hosts](../concepts/instance-types.md), as well as create, modify, and delete them.
* View info on Yandex MPP Analytics for PostgreSQL cluster [backups](../concepts/backup.md), create and delete such backups, as well as restore clusters from backups.
* View Yandex MPP Analytics for PostgreSQL cluster logs.
* View info on the results of Yandex MPP Analytics for PostgreSQL cluster performance diagnostics.
* View info on [quotas](../concepts/limits.md#quotas) for Yandex MPP Analytics for PostgreSQL.
* View info on resource operations for Yandex MPP Analytics for PostgreSQL.

This role includes the `managed-greenplum.editor` permissions.

To create Yandex MPP Analytics for PostgreSQL clusters within Yandex MPP Analytics for PostgreSQL, you also need the `vpc.user` role.

#### managed-greenplum.maintenanceTask.viewer {#managed-greenplum-maintenanceTask-viewer}

The `managed-greenplum.maintenanceTask.viewer` role enables viewing info on [Yandex MPP Analytics for PostgreSQL clusters](../concepts/index.md), their [maintenance](../concepts/maintenance.md) tasks, and [access permissions](../../iam/concepts/access-control/index.md) granted for them, on [hosts](../concepts/instance-types.md) and cluster [backups](../concepts/backup.md), and on [quotas](../concepts/limits.md#quotas) and resource operations for Yandex MPP Analytics for PostgreSQL.

This role includes the `managed-greenplum.auditor` permissions.

#### managed-greenplum.maintenanceTask.editor {#managed-greenplum-maintenanceTask-editor}

The `managed-greenplum.maintenanceTask.editor` role enables viewing info on [maintenance](../concepts/maintenance.md) tasks for Yandex MPP Analytics for PostgreSQL clusters and modifying such tasks, as well as viewing info on [Yandex MPP Analytics for PostgreSQL clusters](../concepts/index.md) and [access permissions](../../iam/concepts/access-control/index.md) granted for them, on [hosts](../concepts/instance-types.md) and [cluster backups](../concepts/backup.md), and on [quotas](../concepts/limits.md#quotas) and resource operations for Yandex MPP Analytics for PostgreSQL.

This role includes the `managed-greenplum.maintenanceTask.viewer` permissions.

#### mdb.auditor {#mdb-auditor}

The `mdb.auditor` role grants the minimum permissions required to view info on managed database clusters (without access to data or logs).

Users with this role can view info on managed database clusters, quotas, and resource operations.

This role includes the `managed-opensearch.auditor`, `managed-kafka.auditor`, `managed-mysql.auditor`, `managed-postgresql.auditor`, `managed-spqr.auditor`, `managed-greenplum.auditor`, `managed-clickhouse.auditor`, `managed-redis.auditor`, and `managed-mongodb.auditor` permissions.

#### mdb.viewer {#mdb-viewer}

The `mdb.viewer` role grants read access to managed database clusters and cluster logs.

Users with this role can read from databases, view the logs of managed database clusters, and view info on cluster maintenance tasks, clusters, quotas, and resource operations.

This role includes the `managed-opensearch.viewer`, `managed-kafka.viewer`, `managed-mysql.viewer`, `managed-postgresql.viewer`, `managed-greenplum.viewer`, `managed-clickhouse.viewer`, `managed-redis.viewer`, `managed-mongodb.viewer`, and `dataproc.viewer` permissions.

#### mdb.admin {#mdb-admin}

The `mdb.admin` role grants full access to managed database clusters.

Users with this role can create, edit, delete, run, and stop managed database clusters, manage access to clusters, create cluster backups and restore clusters from backups, read and write to databases, view info on clusters, view and modify cluster maintenance tasks, and view cluster logs as well as info on quotas and resource operations.

This role includes the `mdb.viewer`, `vpc.user`, `managed-opensearch.admin`, `managed-kafka.admin`, `managed-mysql.admin`, `managed-postgresql.admin`, `managed-spqr.admin`, `managed-greenplum.admin`, `managed-clickhouse.admin`, `managed-redis.admin`, `managed-mongodb.admin`, and `dataproc.admin` permissions.

#### mdb.restorer {#mdb-restorer}

The `mdb.restorer` role enables restoring managed database clusters from backups and grants read access to such clusters and their logs.

Users with this role can restore managed database clusters from backups, read from databases, view cluster logs, and view info on clusters, their maintenance tasks, quotas, and resource operations.

This role includes the `mdb.viewer`, `managed-opensearch.restorer`, `managed-mysql.restorer`, `managed-postgresql.restorer`, `managed-spqr.restorer`, `managed-greenplum.restorer`, `managed-clickhouse.restorer`, `managed-redis.restorer`, and `managed-mongodb.restorer` permissions.

#### mdb.maintenanceTask.viewer {#mdb-maintenanceTask-viewer}

The `mdb.maintenanceTask.viewer` role grants access to information on maintenance tasks for managed database clusters.

Users with this role can view information on managed database clusters, their maintenance tasks, and access permissions granted for them, on hosts and cluster backups, as well as on service quotas and resource operations.

This role includes the `mdb.auditor`, `managed-clickhouse.maintenanceTask.viewer`, `managed-greenplum.maintenanceTask.viewer`, `managed-kafka.maintenanceTask.viewer`, `managed-mongodb.maintenanceTask.viewer`, `managed-mysql.maintenanceTask.viewer`, `managed-opensearch.maintenanceTask.viewer`, `managed-postgresql.maintenanceTask.viewer`, `managed-redis.maintenanceTask.viewer`, and `managed-spqr.maintenanceTask.viewer` permissions.

#### mdb.maintenanceTask.editor {#mdb-maintenanceTask-editor}

The `mdb.maintenanceTask.editor` role enables managing maintenance tasks for managed database clusters.

Users with this role can view information on maintenance tasks for managed database clusters and modify such tasks, view information on managed database clusters and access permissions granted for them, on cluster hosts and backups, as well as on service quotas and resource operations.

This role includes the `mdb.maintenanceTask.viewer`, `managed-clickhouse.maintenanceTask.editor`, `managed-greenplum.maintenanceTask.editor`, `managed-kafka.maintenanceTask.editor`, `managed-mongodb.maintenanceTask.editor`, `managed-mysql.maintenanceTask.editor`, `managed-opensearch.maintenanceTask.editor`, `managed-postgresql.maintenanceTask.editor`, `managed-redis.maintenanceTask.editor`, and `managed-spqr.maintenanceTask.editor` permissions.

When you create a Yandex MPP Analytics for PostgreSQL cluster, an admin user with the `mdb_admin` role is created automatically. This role replaces the superuser when working with the database and is not analogous to the `mdb.admin` role in Yandex Cloud. For more information, see [Users and roles in Yandex MPP Analytics for PostgreSQL](../concepts/cluster-users.md).

#### vpc.publicAdmin {#vpc-public-admin}

The `vpc.publicAdmin` role allows you to manage NAT gateways, public IP addresses, and external network connectivity, as well as view information on the quotas, resources, and resource operations. This role grants administrator privileges for multi-interface instances that provide connectivity between multiple networks.

{% cut "Users with this role can:" %}

* View the list of [cloud networks](../../vpc/concepts/network.md#network) and info on them, as well as set up external access to them.
* Manage connectivity of multiple cloud networks.
* Manage multi-interface instances that provide connectivity between multiple networks.
* View the list of [subnets](../../vpc/concepts/network.md#subnet) and info on them, as well as modify them.
* View information on [NAT gateways](../../vpc/concepts/gateways.md), as well as create, modify, and delete them.
* View the list of [cloud resource addresses](../../vpc/concepts/address.md) and info on them, as well as create, update, and delete public IP addresses.
* View the list of [route tables](../../vpc/concepts/routing.md#rt-vpc) and info on them, as well as link them to subnets.
* View the list of [security groups](../../vpc/concepts/security-groups.md) and the info on them.
* View information on the IP addresses used in subnets.
* View information on Virtual Private Cloud [quotas](../../vpc/concepts/limits.md#vpc-quotas).
* View information on resource operations for Virtual Private Cloud.
* View information on resource operations for Compute Cloud.
* View information on the relevant [cloud](../../resource-manager/concepts/resources-hierarchy.md#cloud).
* View info on the relevant [folder](../../resource-manager/concepts/resources-hierarchy.md#folder).

{% endcut %}

This role includes the `vpc.viewer` permissions.

You can assign a role for a cloud or folder.

{% note warning %}

If a network and subnet are in different folders, the `vpc.publicAdmin` role is checked for the folder where the network is located.

{% endnote %}


### Primitive roles {#primitive-roles}

Primitive roles allow users to perform actions in all Yandex Cloud [services](../../overview/concepts/services.md).

#### auditor {#auditor}

The `auditor` role grants a permission to read configuration and metadata of any Yandex Cloud resources without any access to data.

For instance, users with this role can:
* View info on a [resource](../../resource-manager/concepts/resources-hierarchy.md).
* View the resource metadata.
* View the list of operations with a resource.

`auditor` is the most secure role that does not grant any access to the [service](../../overview/concepts/services.md) data. This role suits the users who need minimum access to the Yandex Cloud resources.

#### viewer {#viewer}

The `viewer` role grants the permissions to read the info on any Yandex Cloud [resources](../../resource-manager/concepts/resources-hierarchy.md).

This role includes the `auditor` permissions.

Unlike `auditor`, the `viewer` role provides access to [service](../../overview/concepts/services.md) data in read mode.

#### editor {#editor}

The `editor` role provides permissions to manage any Yandex Cloud [resources](../../resource-manager/concepts/resources-hierarchy.md), except for assigning roles to other users, transferring [organization](../../organization/concepts/organization.md) ownership, removing an organization, and deleting Key Management Service [encryption keys](../../kms/concepts/index.md).

For instance, users with this role can create, modify, and delete resources.

This role includes the `viewer` permissions.

#### admin {#admin}

The `admin` role enables assigning any roles, except for `resource-manager.clouds.owner` and `organization-manager.organizations.owner`, and provides permissions to manage any Yandex Cloud [resources](../../resource-manager/concepts/resources-hierarchy.md) (except for transferring [organization](../../organization/concepts/organization.md) ownership and removing an organization).

Prior to assigning the `admin` role for an organization, [cloud](../../resource-manager/concepts/resources-hierarchy.md#cloud), or [billing account](../../billing/concepts/billing-account.md), make sure to check out the information on protecting [privileged accounts](../../security/standard/all.md#privileged-users).

This role includes the `editor` permissions.

Instead of primitive roles, we recommend using service roles with more granular access control, allowing you to implement the [least privilege principle](../../security/standard/all.md#min-privileges).

For more information on primitive roles, see the [Yandex Cloud role reference](../../iam/roles-reference.md#primitive-roles).

## Required roles {#required-roles}

As a user, you need the [managed-greenplum.editor role or higher](../../iam/concepts/access-control/roles.md) for the folder that will contain the new cluster. The `managed-greenplum.viewer` role only allows you to view the list of clusters.

To create a Yandex MPP Analytics for PostgreSQL cluster, you need the [vpc.user](../../vpc/security/index.md#vpc-user) role and the `managed-greenplum.editor` role or higher.

You can always assign a role with more permissions, e.g., `managed-greenplum.admin` instead of `managed-greenplum.editor`.

## What's next {#whats-next}

* [How to assign a role](../../iam/operations/roles/grant.md).
* [How to revoke a role](../../iam/operations/roles/revoke.md).
* [Learn more about access management in Yandex Cloud](../../iam/concepts/access-control/index.md).
* [Learn more about role inheritance](../../resource-manager/concepts/resources-hierarchy.md#access-rights-inheritance).