2022-02-22 01:40:18
JD Cloud IAM supports using variables as placeholders to implement generalization policies.
JD Cloud supports the use of policy variables in the Condition element.
Using variables as placeholders, policy variables are replaced with values from the request context when determining permissions. That is, the values populating the policy variables must come from the current request context. The following policy variable types are currently supported by the JD Cloud Condition element:
Variable Name | Variable Description |
---|---|
${accountId} | The current IAM user's master account accountId |
${name} | Subusername of current IAM user |
The policy variables work with the JD Cloud resource tag, mainly to achieve the function of authorization based on the creator tag (jdc-createdby). Example application scenario:
Create a policy that allows all Subusers under the master account 859150329790 to manage their own cloud virtual machines that they have created. Details of the policy are as follows:
json { "Version": "3", "Statement": [ { "Effect": "Allow", "Action": [ "vm:*" ], "Resource": [ "*" ], "Condition": { "StringEquals": { "JDCloud:ResourceTag/jdc-createdby": [ "${name}" ] } } } ] }
我们的产品专家为您找到最合适的产品/解决⽅案
1v1线上咨询获取售前专业咨询
专业产品顾问,随时随地沟通