Help Center/ SecMaster/ User Guide/ Permissions Management/ SecMaster Custom Policies
Updated on 2025-09-24 GMT+08:00

SecMaster Custom Policies

Custom policies can be created to supplement the system-defined policies of SecMaster. For the actions that can be added to custom policies, see SecMaster Permissions and Supported Actions.

Currently, Huawei Cloud allows you to create custom policies in either of the following ways:

  • Visual editor: Select cloud services, actions, resources, and request conditions. This does not require knowledge of policy syntax.
  • JSON: Edit JSON policies from scratch or based on an existing policy.

For details, see Creating a Custom Policy. When you create a custom policy and add a resource path, you need to specify resource paths for SecMaster. For details, see Table 1.

Table 1 SecMaster resources and their paths

Resource

Resource Name

Resource Path URN

workspace

Workspace

secmaster:<region>:<account-id>:workspace:<workspace-id>

accountAgency

Agency

secmaster:<region>:<account-id>:accountAgency:<accountAgency-id>

playbook

Playbook

secmaster:<region>:<account-id>:playbook:<workspace-id>/<playbook-id>

workflow

Workflow

secmaster:<region>:<account-id>:workflow:<workspace-id>/<workflow-id>

connection

Connection

secmaster:<region>:<account-id>:connection:<workspace-id>/<connection-id>

task

To-dos

secmaster:<region>:<account-id>:task:<workspace-id>/<task-id>

indicator

Indicator

secmaster:<region>:<account-id>:indicator:<workspace-id>/<indicator-id>

alert

Alert

secmaster:<region>:<account-id>:alert:<workspace-id>/<alert-id>

incident

Incident

secmaster:<region>:<account-id>:incident:<workspace-id>/<incident-id>

dataobject

Data object

secmaster:<region>:<account-id>:dataobject:<workspace-id>/<dataobject-id>

metric

Metric

secmaster:<region>:<account-id>:metric:<workspace-id>/<metric-id>

resource

Resource

secmaster:<region>:<account-id>:resource:<workspace-id>/<resource-id>

report

Report

secmaster:<region>:<account-id>:report:<workspace-id>/<report-id>

emergencyVulnerability

Emergency vulnerability

secmaster:<region>:<account-id>:emergencyVulnerability:<workspace-id>/<emergency-vulnerability-id>

dataspace

Data space

secmaster:<region>:<account-id>:dataspace:<workspace-id>/<dataspace-id>

pipe

Pipeline

secmaster:<region>:<account-id>:pipe:<workspace-id>/<pipe-id>

alertRule

Alert models

secmaster:<region>:<account-id>:alertRule:<workspace-id>/<alertRule-id>

vulnerability

Vulnerabilities

secmaster:<region>:<account-id>:vulnerability:<workspace-id>/<vulnerability-id>

alertRuleTemplate

Alert template

secmaster:<region>:<account-id>:alertRuleTemplate:<workspace-id>/<alertRuleTemplate-id>

searchCondition

Search criteria

secmaster:<region>:<account-id>:searchCondition:<workspace-id>/<searchCondition-id>

dataclass

Data class

secmaster:<region>:<account-id>:dataclass:<workspace-id>/<dataclass-id>

mapping

Categorical mapping

secmaster:<region>:<account-id>:mapping:<workspace-id>/<mapping-id>

layout

Layout

secmaster:<region>:<account-id>:layout:<workspace-id>/<layout-id>

catalogue

Directory

secmaster:<region>:<account-id>:catalogue:<workspace-id>/<catalogue-id>

table

Table

secmaster:<region>:<account-id>:table:<workspace-id>/<table-id>

policy

Emergency policy

secmaster:<region>:<account-id>:policy:<workspace-id>/<policy-id>

baseline

Baseline inspection

secmaster:<region>:<account-id>:baseline:<workspace-id>/<baseline-id>

shipper

Data delivery

secmaster:<region>:<account-id>:shipper:<workspace-id>/<shipper-id>

analysisScript

Analysis script

secmaster:<region>:<account-id>:analysisScript:<workspace-id>/<analysisScript-id>

collectorChannel

Collection channel

secmaster:<region>:<account-id>:collectorChannel:<workspace-id>/<collectorChannel-id>

collectorChannelGroup

Collection channel group

secmaster:<region>:<account-id>:collectorChannelGroup:<workspace-id>/<collectorChannelGroup-id>

collectorConnection

Collector

secmaster:<region>:<account-id>:collectorConnection:<workspace-id>/<collectorConnection-id>

collectorParser

Parser

secmaster:<region>:<account-id>:collectorParser:<workspace-id>/<collectorParser-id>

component

Component

secmaster:<region>:<account-id>:component:<workspace-id>/<component-id>

node

Node

secmaster:<region>:<account-id>:node:<workspace-id>/<node-id>

The following section contains examples of common SecMaster custom policies.

Example Custom Policies

  • Example 1: Authorization for alert list search permission and permission execution analysis
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    {
        "Version": "1.1",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "secmaster:alert:list",
                    "secmaster:search:createAnalysis"
                ]
            }
        ]
    }
    
  • Example 2: Preventing users from modifying alert configurations

    A deny policy must be used together with other policies. If the policies assigned to a user contain both Allow and Deny actions, the Deny actions take precedence over the Allow actions.

    You can use the following method to create a custom policy that disallows users who have the SecMaster FullAccess policy assigned to modify alert configurations. Assign both SecMaster FullAccess and the custom policies to the group to which the user belongs. Then the user can perform all operations except modifying alert configurations on SecMaster. The following is an example of a deny policy:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    { 
             "Version": "1.1", 
        "Statement": [
            {
                "Effect": "Deny",
                "Action": [
                    "secmaster:alert:updateType"
                ]
            }
        ]
    }
    
  • Example 3: Defining permissions for multiple services in a policy

    A custom policy can contain the actions of multiple services that are of the global or project-level type. The following is an example policy containing actions of multiple services:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    {
        "Version": "1.1",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "secmaster:alert:get",
                    "secmaster:alert:update"
                ]
            },
            {
                "Effect": "Allow",
                "Action": [
                    "hss:vuls:set",
                    "hss:vuls:list"
                ]
            }
        ]
    }