Skip to content

Bug - the total number of roles and permissions should be equal or less than 10 #13

Description

@DaniloNC

Currently, the bfs.py has 18 elements inside the dangerous_permissions list, sending 18 permissions at once to the analyzeIamPolicy causes an INVALID_ARGUMENT status.

In order to troubleshoot the error, I modified the bfs.py to print the response `print(res.text)``

        res = requests.post("https://cloudasset.googleapis.com/v1p4beta1/organizations/{}:analyzeIamPolicy".format(org), headers=headers, json=JSON_REQUEST)
        print(res.text)

The error is displayed below.

root@bf38aed1a4c7:/# python3 bfs.py --source xxxx@yyyy.com --org_id 123
{
  "error": {
    "code": 400,
    "message": "Some specified value(s) are invalid.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "field": "access_selector",
            "description": "In one request, the total number of roles and permissions should be equal or less than 10. If you have more than that, please split your request into multiple ones."
          }
        ]
      }
    ]
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions