Create a custom role with no (or minimal) permissions

别来无恙 提交于 2021-02-11 18:19:13

问题


I am working on an application that has several custom roles that do not map to the existing IAM roles or permissions. e.g. Sales Department, Administrator, or Approver.

I would like to create these custom roles in IAM and assign users to them. However, in order to create a custom role, I need to select at least one permission from the list of predefined permissions.

Is there a way to create a custom role with no permissions or with a minimal permission that has no side effects?


回答1:


You may create roles with no permissions:

Request

POST https://iam.googleapis.com/v1/projects/[[PROJECT-ID]]/roles
{
 "role": {
 },
 "roleId": "test"
}

Response

200

- Show headers -

{
 "name": "projects/[[PROJECT-ID]]/roles/test",
 "etag": "BwWEuBNyx4k="
}


来源:https://stackoverflow.com/questions/55270838/create-a-custom-role-with-no-or-minimal-permissions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!