Simple Log Service provides the permission assistant feature. This feature allows you to grant permissions on Simple 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 Simple Log Service console.
Procedure
Log on to the Simple Log Service console.
In the Projects section, click the project that you want to manage.
In the left-side navigation pane, choose .
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 Simple 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, Simple 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.
ImportantThe 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, Simple 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, Simple 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 Simple 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, Log Audit Service, and K8s Event Center 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, Simple 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.
ImportantThe 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, Simple 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, Simple Log Service automatically grants the management permissions on the Visualization submodule.
Resources
After you select an application, Simple 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.
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.
NoteCustom policy templates are stored only in the local storage of the current browser. If you use another browser, you cannot access the templates.
Create a custom policy.
Log on to the RAM console by using you Alibaba Cloud account or a RAM user who has administrative rights.
In the left-side navigation pane, choose .
On the Policies page, click Create Policy.
On the Create Policy page, click the JSON tab, replace the existing script in the code editor with the policy document that is obtained in Step 5, and then click OK.
In the Create Policy dialog box, configure the Name and Description parameters and click OK.
Grant the required permissions created in Step 5 to the principal. The principal can be a RAM user or RAM role. For more information, see Grant permissions to a RAM user and Grant permissions to a RAM role.
After the principal is granted the required permissions, you can use the principal.
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.
NoteCustom policy templates are stored in the local storage of the current browser. If you use another browser, you cannot access the templates.