Log Service provides the permission assistant feature. This feature allows you to grant permissions on Log Service resources to a RAM user or a RAM role in a simplified manner. This topic describes how to configure the permission assistant feature in the Log Service console.

Procedure

  1. Log on to the Log Service console.
  2. In the Projects section, click the name of the project that you want to view.
  3. In the left-side navigation pane, choose Other > Permission Assistant.
  4. On the Permission Assistant page, configure the following parameters in the Configure Policy step and click Next.
    In the Select Mode section, you can select Project or APP.
    • Project

      If you select Project for Select Mode, you can grant permissions on all functional modules of Log Service.

      Parameter Description
      Select Scenario Different scenarios are associated with different functional modules. You can select a scenario based on your business requirements. After you select a scenario, Log Service automatically selects the functional modules that are associated with the scenario. You can also create a custom scenario by selecting specific functional modules.

      The permissions on a functional module include management permissions and read-only permissions. You can select permissions based on your business requirements.

      Note The functional modules have the following relationships:
      • You must grant the read-only permissions or the management permissions on the Project module before you can use other functional modules.
      • The Data Import module is based on the Logstore module. If you select a submodule of the Data Import module, Log Service automatically selects the Logstore module.
      • The Visualization submodule is based on the Data Query submodule.
      • The Alerts, Subscribe, and Data Imported by Cloud Products submodules are based on the Visualization submodule. If you select the Alerts and Subscribe submodules, Log Service automatically grants the management permissions on the Visualization submodule.
      Resources After you configure permissions on functional modules, you can specify the resources on which you want to grant permissions. You can use asterisks (*) to match one or more projects or Logstores. Examples:
      • RAM users or RAM roles that are granted the following permissions can manage all resources of Log Service.
        "Action": "log:*",
        "Resource": "*",
      • RAM users or RAM roles that are granted the following permissions can manage only the resources in project01.
        • acs:log:*:*:project/project01
        • acs:log:*:*:project/project01/*
      • RAM users or RAM roles that are granted the following permissions can manage only the resources in logstore01 of project01.
        • acs:log:*:*:project/project01/logstore/logstore01
        • acs:log:*:*:project/project01/logstore/logstore01/*
      Conditions You can specify conditions to grant the permissions based on your business requirements. For more information, see Policy elements.
    • APP

      If you select APP for Select Mode, you can grant only the permissions on the Cost Manager and Log Audit Service applications.

      Parameter Description
      APPs Select the applications on which you want to grant permissions. You can grant the Allow or Deny permission on an application.
      Select Scenario If you grant the Allow permission on an application and select a scenario, Log Service automatically selects the functional modules that are associated with the scenario. You can also create a custom scenario by selecting specific functional modules.

      The permissions on a functional module include management permissions and read-only permissions. You can select permissions based on your business requirements.

      Note The functional modules have the following relationships:
      • You must grant the read-only permissions or the management permissions on the Project module before you can use other functional modules.
      • The Data Import module is based on the Logstore module. If you select a submodule of the Data Import module, Log Service automatically selects the Logstore module.
      • The Visualization submodule is based on the Data Query submodule.
      • The Alerts, Subscribe, and Data Imported by Cloud Products submodules are based on the Visualization submodule. If you select the Alerts and Subscribe submodules, Log Service automatically grants the management permissions on the Visualization submodule.
      Resources After you select an application, Log Service automatically specifies the associated resources. You cannot modify the associated resources.
      Conditions You can specify conditions to grant the permissions based on your business requirements. For more information, see Policy elements.
  5. In the Preview Policy step, preview and edit the policy. The following table describes the operations that you can perform. After you confirm or edit the policy, click Next.
    Operation Description
    Format Format the JSON policy after you edit the policy.
    Compress The number of lines in a permission policy cannot exceed the specified number. You can click Compress to delete redundant spaces and line feeds.
    Reset Reset the policy content.
    Copy to Clipboard Copy the policy content to the clipboard for further use.
    Add to Custom Template Add the policy as a custom policy template for further use.
    Note Custom policy templates are stored only in the local storage of the current browser. If you use another browser, you cannot access the templates.
  6. In the Apply Settings to RAM step, follow the on-screen instructions to attach the policy to a RAM user or a RAM role.

What to do next

  • Apply common policy templates

    On the Permission Assistant page, you can select a common policy template based on your business requirements.

  • Apply custom policy templates
    On the Permission Assistant page, you can add a custom policy as a custom policy template in the Preview Policy step for further use.
    Note Custom policy templates are stored in the local storage of the current browser. If you use another browser, you cannot access the templates.