Managing access to DataLens
Access to Yandex DataLens is managed from the Yandex.Cloud console.
To grant a user access, assign them a DataLens role.
Permission differentiation in the service is implemented at the object and directory level.
You can grant users permission to each object and directory. They determine what operations are allowed. By default, objects inherit the access rights of the parent folder.
You can grant users access to a directory or any service object:
- Connections
- Datasets
- Charts
- Dashboards
Users can also request permission on their own via the request form. For more information, see Request permissions.
User roles
Let you define user permissions in a DataLens instance:
datalens.instances.user
— A DataLens user with the rights to create, read, and update objects based on object permissions.datalens.instances.admin
— The DataLens instance administrator. The role is automatically assigned to the instance creator. The administrator has thedatalens.instances.user
rights and can also change the service plan and pay for the paid content in Cloud Marketplace.
User roles are assigned in the Yandex.Cloud console.
Adding users
You can add users with a Yandex account and federated users.
Add a user with a Yandex account
To add a user and grant them access to DataLens:
-
Open the Access management page for the selected cloud. If necessary, switch to another cloud.
-
On the Users and roles page, click Add user in the upper-right corner.
-
Enter the user's Yandex email address.
-
Click Add. When a new user is added to the cloud, they're automatically assigned the cloud member role:
resource-manager.clouds.member
.Note
It may take several hours before the username of the added user appears in the form for granting permissions.
-
Select the user to assign the role to, click , and choose Configure roles.
-
To add a role for a cloud, click in the Roles for the cloud
section. To add a role for a folder, select the folder and click Assign role in the Roles for folders section.
-
Choose
datalens.instances.user
ordatalens.instances.admin
from the list.
Add federated users
To add federated users, you need to know the users' Name IDs returned by the Identity Provider (IdP) server with the successful authentication response. This is usually the user's primary email address. If you don't know what the server returns as the Name ID, contact the administrator who configured authentication for your federation.
-
Add federated users:
Management consoleCLIAPITo add identity federation users to the cloud:
-
Open the Access management page for the selected cloud. If necessary, switch to another cloud.
- Click the arrow next to the Add user button.
- Select Add federated users.
- Select the identity federation to add users from.
- List the Name IDs of users, separating them with line breaks.
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the
--folder-name
or--folder-id
parameter.-
View a description of the add user command:
$ yc iam federation add-user-accounts --help
-
Add users by listing their Name IDs separated by a comma:
$ yc iam federation add-user-accounts --name my-federation \ --name-ids=alice@example.com,bob@example.com,charlie@example.com
To add identity federation users to the cloud:
-
Create a file with the request body (for example,
body.json
). In the request body, specify the array of Name IDs of users you want to add:{ "nameIds": [ "alice@example.com", "bob@example.com", "charlie@example.com" ] }
-
Send the request by specifying the Federation ID in the parameters:
$ curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <IAM token>" \ -d '@body.json' \ https://iam.api.cloud.yandex.net/iam/v1/saml/federations/<federation ID>:addUserAccounts
-
-
Select the user to assign the role to, click , and choose Configure roles.
-
To add a role for a cloud, click in the Roles for the cloud
section. To add a role for a folder, select the folder and click Assign role in the Roles for folders section.
-
Choose
datalens.instances.user
from the list.
For more information about assigning roles in Yandex.Cloud, see Roles.
Object permissions
You can assign the following permissions to objects and folders in DataLens:
Execute
A user with the Execute
permission can make requests to available connections and datasets.
It doesn't let the user view connections or datasets.
Warning
You can only grant the Execute
permission for a connection and dataset.
Read
A user with the Read
permission can view dashboards, widgets, datasets, and directories.
Write
A user with the Write
permission can edit dashboards, widgets, connections, datasets, and directories.
The Write
permission includes everything under the Read
permission.
Admin
A user with the Admin
permission can edit available objects and directories, as well as edit permissions.
The Admin
permission includes everything under the Write
permission.
Table of permissions
Access object Action |
Execute | Read | Write | Admin |
---|---|---|---|---|
Directory | ||||
View directories | N/A | ✔ | ✔ | ✔ |
Edit directories | N/A | - | ✔ | ✔ |
Delete directories | N/A | - | - | ✔ |
Edit permissions | N/A | - | - | ✔ |
Connections | ||||
Make requests to a connection |
✔ | ✔ | ✔ | ✔ |
Create a dataset over a connection |
- | ✔ | ✔ | ✔ |
View connection parameters |
- | ✔ | ✔ | ✔ |
Edit connections | - | - | ✔ | ✔ |
Delete connections | - | - | - | ✔ |
Edit permissions | - | - | - | ✔ |
Datasets | ||||
Make requests to a dataset |
✔ | ✔ | ✔ | ✔ |
Create charts on a dataset |
✔ | ✔ | ✔ | ✔ |
View datasets | - | ✔ | ✔ | ✔ |
Edit datasets | - | - | ✔ | ✔ |
Delete datasets | - | - | - | ✔ |
Edit permissions | - | - | - | ✔ |
Charts | ||||
View charts | N/A | ✔ | ✔ | ✔ |
Edit charts | N/A | - | ✔ | ✔ |
Delete charts | N/A | - | - | ✔ |
Edit permissions | N/A | - | - | ✔ |
Dashboards | ||||
View dashboards | N/A | ✔ | ✔ | ✔ |
Edit dashboards | N/A | - | ✔ | ✔ |
Deleting dashboards | N/A | - | - | ✔ |
Edit permissions | N/A | - | - | ✔ |
Object access audit
A DataLens user can get access logs for DataLens objects (view, edit, delete).
To get logs, you can contact technical support.