Configuring Resource Permissions

This topic describes how to create permission policies to control access to resources and assign minimum permissions to users for the purpose of lower data security risks. A permission policy takes effect about 1 minute after being configured.

Prerequisites

An MRS Ranger connection has been created in Management Center. The MRS cluster version is 3.0.0 or later. For details, see Creating Data Connections.

Creating an HDFS Permission Policy

  1. Log in to the DGC console, select an instance, and click Access on it.
  2. Click the Workspaces tab. In the workspace list, find the required workspace. In the Quick Entry column, choose Data Security to access the management console.
  3. Choose Resource Permission Settings from the left navigation bar.
  4. Click Configure to the right of the HDFS component, and click Create in the upper part of the page that is displayed.

    Figure 1 Creating a permission policy

  5. Set related parameters as prompt and click OK.

    Figure 2 Assigning a permission policy
    Table 1 Parameters for configuring an HDFS permission policy

    Parameter

    Description

    Policy Type

    The policy type is automatically generated based on the selected service component. Policy Type can be set to Access, Mask, and Row-level Filter. Mask and Row-level Filter are specific to Hive.

    Policy Status

    If Policy Status is Enabled, the permission policy takes effect immediately. If Policy Status is Disabled, the permission policy does not take effect after being created. Policy Status is set to Enabled by default.

    Overwrite

    If Overwrite is set to Enabled, the new policy takes effect and the old policy does not take effect. Overwrite is set to Enabled by default.

    When you need to create a temporary access policy, enable Overwrite and set Validity Period as required. In this way, even if the temporary access policy expires, the original permission policy still takes effect.

    Audit Log

    If Audit Log is set to Enabled, logs are recorded. The log content includes the client access time, client IP address, client user, and resource operation result.

    Policy Name

    Policy name is mandatory. A policy name can include only letters, numbers, underscores (_), and hyphens (-). Up to 50 characters are allowed.

    Description

    A description of the policy. Up to 256 characters are allowed.

    Resource Path

    HDFS path for access permission control.

    Validity Period

    You can set the effective time and expiration time of a policy. You can configure multiple time ranges.

    Allowed

    Users and user groups that are allowed to access the resources.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Granted: If Granted is selected, management permissions are assigned to appropriate users and groups. Delegated administrators can update and delete policies and create sub-policies based on the original policies.

    Exceptions

    If you select Exceptions for Allowed, users who are not allowed to access the system are added to the user group that is allowed to access the system.

    If you select Exceptions for blocked, users who are allowed to access the system are added to the user group that is blocked from the system.

    Block all other accesses

    If you select Block all other accesses, only specified users or user groups are allowed to access the system.

    Blocked

    Blocked is displayed when Block all other accesses is not selected. Users and user groups that are not allowed to access the system can be specified in the Blocked area.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are not allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Granted: If Granted is selected, management permissions are assigned to appropriate users and groups. Delegated administrators can update and delete policies and create sub-policies based on the original policies.

Creating a Hive Access Permission Policy

  1. Log in to the DGC console, select an instance, and click Access on it.
  2. Click the Workspaces tab. In the workspace list, find the required workspace. In the Quick Entry column, choose Data Security to access the management console.
  3. Choose Resource Permission Settings from the left navigation bar.
  4. Click Configure to the right of the Hive component, and click Create in the upper part of the page that is displayed.

    Figure 3 Creating a permission policy

  5. Set related parameters as prompt and click OK.

    Figure 4 Configuring a Hive policy
    Table 2 Parameters of a Hive permission policy

    Parameter

    Description

    Policy Type

    The policy type is automatically generated based on the selected service component. Policy Type can be set to Access, Mask, and Row-level Filter. Mask and Row-level Filter are specific to Hive.

    Policy Status

    If Policy Status is Enabled, the permission policy takes effect immediately. If Policy Status is Disabled, the permission policy does not take effect after being created. Policy Status is set to Enabled by default.

    Overwrite

    If Overwrite is set to Enabled, the new policy takes effect and the old policy does not take effect. Overwrite is set to Enabled by default.

    When you need to create a temporary access policy, enable Overwrite and set Validity Period as required. In this way, even if the temporary access policy expires, the original permission policy still takes effect.

    Audit Log

    If Audit Log is set to Enabled, logs are recorded. The log content includes the client access time, client IP address, client user, and resource operation result.

    Policy Name

    Policy name is mandatory. A policy name can include only letters, numbers, underscores (_), and hyphens (-). Up to 50 characters are allowed.

    Description

    A description of the policy. Up to 256 characters are allowed.

    database

    The database parameter is mandatory. You need to set the database whose permissions need to be controlled. Fuzzy search is supported.

    table

    The table parameter is mandatory. You need to set the table whose permissions need to be controlled. Fuzzy search is supported.

    Column

    The Column parameter is mandatory. You need to set the column whose permissions need to be controlled. Fuzzy search is supported.

    Validity Period

    You can set the effective time and expiration time of a policy. You can configure multiple time ranges.

    Allowed

    Users and user groups that are allowed to access the resources.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Granted: If Granted is selected, management permissions are assigned to appropriate users and groups. Delegated administrators can update and delete policies and create sub-policies based on the original policies.

    Exceptions

    If you select Exceptions for Allowed, users who are not allowed to access the system are added to the user group that is allowed to access the system.

    If you select Exceptions for blocked, users who are allowed to access the system are added to the user group that is blocked from the system.

    Block all other accesses

    If you select Block all other accesses, only specified users or user groups are allowed to access the system.

    Blocked

    Blocked is displayed when Block all other accesses is not selected. Users and user groups that are not allowed to access the system can be specified in the Blocked area.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are not allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Granted: If Granted is selected, management permissions are assigned to appropriate users and groups. Delegated administrators can update and delete policies and create sub-policies based on the original policies.

Creating a Hive Masking Permission Policy

  1. Log in to the DGC console, select an instance, and click Access on it.
  2. Click the Workspaces tab. In the workspace list, find the required workspace. In the Quick Entry column, choose Data Security to access the management console.
  3. Choose Resource Permission Settings from the left navigation bar.
  4. Click Configure to the right of the Hive component, and click Create in the upper part of the Mask tab page.

    Figure 5 Creating a permission policy

  5. Set related parameters as prompt and click OK.

    Figure 6 Configuring a Hive policy
    Table 3 Parameters of a Hive permission policy

    Parameter

    Description

    Policy Type

    The policy type is automatically generated based on the selected service component. Policy Type can be set to Access, Mask, and Row-level Filter. Mask and Row-level Filter are specific to Hive.

    Policy Status

    If Policy Status is Enabled, the permission policy takes effect immediately. If Policy Status is Disabled, the permission policy does not take effect after being created. Policy Status is set to Enabled by default.

    Overwrite

    If Overwrite is set to Enabled, the new policy takes effect and the old policy does not take effect. Overwrite is set to Enabled by default.

    When you need to create a temporary access policy, enable Overwrite and set Validity Period as required. In this way, even if the temporary access policy expires, the original permission policy still takes effect.

    Audit Log

    If Audit Log is set to Enabled, logs are recorded. The log content includes the client access time, client IP address, client user, and resource operation result.

    Policy Name

    Policy name is mandatory. A policy name can include only letters, numbers, underscores (_), and hyphens (-). Up to 50 characters are allowed.

    Description

    A description of the policy. Up to 256 characters are allowed.

    Database

    The Database parameter is mandatory. You need to set the database whose permissions need to be controlled. Fuzzy search is supported.

    Data Table

    The Data Table parameter is mandatory. You need to set the table whose permissions need to be controlled. Fuzzy search is supported.

    Column

    The Column parameter is mandatory. You need to set the column whose permissions need to be controlled. Fuzzy search is supported.

    Validity Period

    You can set the effective time and expiration time of a policy. You can configure multiple time ranges.

    Mask

    The masking mode for users or user groups to access data.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Mask Mode: Columns that require permission control in a Hive table are masked based on the value of this parameter.

Creating a Hive Row-Level Filter Permission Policy

  1. Log in to the DGC console, select an instance, and click Access on it.
  2. Click the Workspaces tab. In the workspace list, find the required workspace. In the Quick Entry column, choose Data Security to access the management console.
  3. Choose Resource Permission Settings from the left navigation bar.
  4. Click Configure to the right of the Hive component, and click Create in the upper part of the Row-level Filter tab page.

    Figure 7 Creating a Hive row-level filter policy

  5. Set related parameters as prompt and click OK.

    Figure 8 Configuring a Hive policy
    Table 4 Parameters of a Hive permission policy

    Parameter

    Description

    Policy Type

    The policy type is automatically generated based on the selected service component. Policy Type can be set to Access, Mask, and Row-level Filter. Mask and Row-level Filter are specific to Hive.

    Policy Status

    If Policy Status is Enabled, the permission policy takes effect immediately. If Policy Status is Disabled, the permission policy does not take effect after being created. Policy Status is set to Enabled by default.

    Overwrite

    If Overwrite is set to Enabled, the new policy takes effect and the old policy does not take effect. Overwrite is set to Enabled by default.

    When you need to create a temporary access policy, enable Overwrite and set Validity Period as required. In this way, even if the temporary access policy expires, the original permission policy still takes effect.

    Audit Log

    If Audit Log is set to Enabled, logs are recorded. The log content includes the client access time, client IP address, client user, and resource operation result.

    Policy Name

    Policy name is mandatory. A policy name can include only letters, numbers, underscores (_), and hyphens (-). Up to 50 characters are allowed.

    Description

    A description of the policy. Up to 256 characters are allowed.

    Database

    The Database parameter is mandatory. You need to set the database whose permissions need to be controlled. Fuzzy search is supported.

    Data Table

    The Data Table parameter is mandatory. You need to set the table whose permissions need to be controlled. Fuzzy search is supported.

    Column

    The Column parameter is mandatory. You need to set the column whose permissions need to be controlled. Fuzzy search is supported.

    Validity Period

    You can set the effective time and expiration time of a policy. You can configure multiple time ranges.

    Row key Filter

    Users and user groups that are allowed to access the resources.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Row-level Filter: Filter by field content. The parameter format is as follows: Field=Value. Example: state=1.

Creating an HBase Permission Policy

  1. Log in to the DGC console, select an instance, and click Access on it.
  2. Click the Workspaces tab. In the workspace list, find the required workspace. In the Quick Entry column, choose Data Security to access the management console.
  3. Choose Resource Permission Settings from the left navigation bar.
  4. Click Configure to the right of the HBase component, and click Create in the upper part of the page that is displayed.

    Figure 9 Creating an HBase permission policy

  5. Set related parameters as prompt and click OK.

    Figure 10 Configuring an HBase policy
    Table 5 Parameters of an HBase permission policy

    Parameter

    Description

    Policy Type

    The policy type is automatically generated based on the selected service component. Policy Type can be set to Access, Mask, and Row-level Filter. Mask and Row-level Filter are specific to Hive.

    Policy Status

    If Policy Status is Enabled, the permission policy takes effect immediately. If Policy Status is Disabled, the permission policy does not take effect after being created. Policy Status is set to Enabled by default.

    Overwrite

    If Overwrite is set to Enabled, the new policy takes effect and the old policy does not take effect. Overwrite is set to Enabled by default.

    When you need to create a temporary access policy, enable Overwrite and set Validity Period as required. In this way, even if the temporary access policy expires, the original permission policy still takes effect.

    Audit Log

    If Audit Log is set to Enabled, logs are recorded. The log content includes the client access time, client IP address, client user, and resource operation result.

    Policy Name

    Policy name is mandatory. A policy name can include only letters, numbers, underscores (_), and hyphens (-). Up to 50 characters are allowed.

    Description

    A description of the policy. Up to 256 characters are allowed.

    Data Table

    The Data Table parameter is mandatory. You need to set the table whose permissions need to be controlled. Fuzzy search is supported.

    Column

    The Column parameter is mandatory. You need to set the column whose permissions need to be controlled. Fuzzy search is supported.

    Column Family

    Column Family is mandatory. This parameter indicates a set of column families in an HBase cluster.

    Validity Period

    You can set the effective time and expiration time of a policy. You can configure multiple time ranges.

    Allowed

    Users and user groups that are allowed to access the resources.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Granted: If Granted is selected, management permissions are assigned to appropriate users and groups. Delegated administrators can update and delete policies and create sub-policies based on the original policies.

    Exceptions

    If you select Exceptions for Allowed, users who are not allowed to access the system are added to the user group that is allowed to access the system.

    If you select Exceptions for blocked, users who are allowed to access the system are added to the user group that is blocked from the system.

    Block all other accesses

    If you select Block all other accesses, only specified users or user groups are allowed to access the system.

    Blocked

    Blocked is displayed when Block all other accesses is not selected. Users and user groups that are not allowed to access the system can be specified in the Blocked area.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are not allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Granted: If Granted is selected, management permissions are assigned to appropriate users and groups. Delegated administrators can update and delete policies and create sub-policies based on the original policies.

Creating a Yarn Permission Policy

  1. Log in to the DGC console, select an instance, and click Access on it.
  2. Click the Workspaces tab. In the workspace list, find the required workspace. In the Quick Entry column, choose Data Security to access the management console.
  3. Choose Resource Permission Settings from the left navigation bar.
  4. Click Configure to the right of the Yarn component, and click Create in the upper part of the page that is displayed.

    Figure 11 Creating a permission policy

  5. Set related parameters as prompt and click OK.

    Figure 12 Configuring a Yarn policy
    Table 6 Parameters of a Yarn permission policy

    Parameter

    Description

    Policy Type

    The policy type is automatically generated based on the selected service component. Policy Type can be set to Access, Mask, and Row-level Filter. Mask and Row-level Filter are specific to Hive.

    Policy Status

    If Policy Status is Enabled, the permission policy takes effect immediately. If Policy Status is Disabled, the permission policy does not take effect after being created. Policy Status is set to Enabled by default.

    Overwrite

    If Overwrite is set to Enabled, the new policy takes effect and the old policy does not take effect. Overwrite is set to Enabled by default.

    When you need to create a temporary access policy, enable Overwrite and set Validity Period as required. In this way, even if the temporary access policy expires, the original permission policy still takes effect.

    Audit Log

    If Audit Log is set to Enabled, logs are recorded. The log content includes the client access time, client IP address, client user, and resource operation result.

    Policy Name

    Policy name is mandatory. A policy name can include only letters, numbers, underscores (_), and hyphens (-). Up to 50 characters are allowed.

    Description

    A description of the policy. Up to 256 characters are allowed.

    Queue

    Resource scheduling queue in the Yarn service.

    Validity Period

    You can set the effective time and expiration time of a policy. You can configure multiple time ranges.

    Allowed

    Users and user groups that are allowed to access the resources.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Granted: If Granted is selected, management permissions are assigned to appropriate users and groups. Delegated administrators can update and delete policies and create sub-policies based on the original policies.

    Exceptions

    If you select Exceptions for Allowed, users who are not allowed to access the system are added to the user group that is allowed to access the system.

    If you select Exceptions for blocked, users who are allowed to access the system are added to the user group that is blocked from the system.

    Block all other accesses

    If you select Block all other accesses, only specified users or user groups are allowed to access the system.

    Blocked

    Blocked is displayed when Block all other accesses is not selected. Users and user groups that are not allowed to access the system can be specified in the Blocked area.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are not allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Granted: If Granted is selected, management permissions are assigned to appropriate users and groups. Delegated administrators can update and delete policies and create sub-policies based on the original policies.

Creating a Kafka Permission Policy

  1. Log in to the DGC console, select an instance, and click Access on it.
  2. Click the Workspaces tab. In the workspace list, find the required workspace. In the Quick Entry column, choose Data Security to access the management console.
  3. Choose Resource Permission Settings from the left navigation bar.
  4. Click Configure to the right of the Kafka component, and click Create in the upper part of the page that is displayed.

    Figure 13 Creating a permission policy

  5. Set related parameters as prompt and click OK.

    Figure 14 Configuring a Kafka policy
    Table 7 Parameters of a Kafka permission policy

    Parameter

    Description

    Policy Type

    The policy type is automatically generated based on the selected service component. Policy Type can be set to Access, Mask, and Row-level Filter. Mask and Row-level Filter are specific to Hive.

    Policy Status

    If Policy Status is Enabled, the permission policy takes effect immediately. If Policy Status is Disabled, the permission policy does not take effect after being created. Policy Status is set to Enabled by default.

    Overwrite

    If Overwrite is set to Enabled, the new policy takes effect and the old policy does not take effect. Overwrite is set to Enabled by default.

    When you need to create a temporary access policy, enable Overwrite and set Validity Period as required. In this way, even if the temporary access policy expires, the original permission policy still takes effect.

    Audit Log

    If Audit Log is set to Enabled, logs are recorded. The log content includes the client access time, client IP address, client user, and resource operation result.

    Policy Name

    Policy name is mandatory. A policy name can include only letters, numbers, underscores (_), and hyphens (-). Up to 50 characters are allowed.

    Description

    A description of the policy. Up to 256 characters are allowed.

    Policy Conditions

    Range of IP addresses that can access the Kafka topic.

    Topic

    The message topic of a Kafka cluster.

    Validity Period

    You can set the effective time and expiration time of a policy. You can configure multiple time ranges.

    Allowed

    Users and user groups that are allowed to access the resources.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Policy Conditions: the range of IP addresses that can access the Kafka topic.
    • Granted: If Granted is selected, management permissions are assigned to appropriate users and groups. Delegated administrators can update and delete policies and create sub-policies based on the original policies.

    Exceptions

    If you select Exceptions for Allowed, users who are not allowed to access the system are added to the user group that is allowed to access the system.

    If you select Exceptions for blocked, users who are allowed to access the system are added to the user group that is blocked from the system.

    Blocked

    Blocked is displayed when Block all other accesses is not selected. Users and user groups that are not allowed to access the system can be specified in the Blocked area.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are not allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Policy Conditions: the range of IP addresses that can access the Kafka topic.
    • Granted: If Granted is selected, management permissions are assigned to appropriate users and groups. Delegated administrators can update and delete policies and create sub-policies based on the original policies.

Creating a Storm Permission Policy

  1. Log in to the DGC console, select an instance, and click Access on it.
  2. Click the Workspaces tab. In the workspace list, find the required workspace. In the Quick Entry column, choose Data Security to access the management console.
  3. Choose Resource Permission Settings from the left navigation bar.
  4. Click Configure to the right of the Storm component, and click Create in the upper part of the page that is displayed.

    Figure 15 Creating a permission policy

  5. Set related parameters as prompt and click OK.

    Figure 16 Configuring a Storm policy
    Table 8 Parameters of a Storm permission policy

    Parameter

    Description

    Policy Type

    The policy type is automatically generated based on the selected service component. Policy Type can be set to Access, Mask, and Row-level Filter. Mask and Row-level Filter are specific to Hive.

    Policy Status

    If Policy Status is Enabled, the permission policy takes effect immediately. If Policy Status is Disabled, the permission policy does not take effect after being created. Policy Status is set to Enabled by default.

    Overwrite

    If Overwrite is set to Enabled, the new policy takes effect and the old policy does not take effect. Overwrite is set to Enabled by default.

    When you need to create a temporary access policy, enable Overwrite and set Validity Period as required. In this way, even if the temporary access policy expires, the original permission policy still takes effect.

    Audit Log

    If Audit Log is set to Enabled, logs are recorded. The log content includes the client access time, client IP address, client user, and resource operation result.

    Policy Name

    Policy name is mandatory. A policy name can include only letters, numbers, underscores (_), and hyphens (-). Up to 50 characters are allowed.

    Description

    A description of the policy. Up to 256 characters are allowed.

    Topology

    Tasks in a Storm cluster.

    Validity Period

    You can set the effective time and expiration time of a policy. You can configure multiple time ranges.

    Allowed

    Users and user groups that are allowed to access the resources.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Granted: If Granted is selected, management permissions are assigned to appropriate users and groups. Delegated administrators can update and delete policies and create sub-policies based on the original policies.

    Exceptions

    If you select Exceptions for Allowed, users who are not allowed to access the system are added to the user group that is allowed to access the system.

    If you select Exceptions for blocked, users who are allowed to access the system are added to the user group that is blocked from the system.

    Block all other accesses

    If you select Block all other accesses, only specified users or user groups are allowed to access the system.

    Blocked

    Blocked is displayed when Block all other accesses is not selected. Users and user groups that are not allowed to access the system can be specified in the Blocked area.

    • Username: MRS user.
    • Role: MRS role.
    • Group: MRS user groups.
    • Permission: the permission required by users who are not allowed to access the system. Permission and Username can be left blank or not left blank at the same time. For details on service permissions, see Table 1.
    • Granted: If Granted is selected, management permissions are assigned to appropriate users and groups. Delegated administrators can update and delete policies and create sub-policies based on the original policies.