Skip to content

logging: User does not have permission to access organization #5384

@pnatraj

Description

@pnatraj

I am trying to create a sink to monitor VPC_FLOW LOGS for all the projects in an organization and i am getting permission denied, has anybody else have a similar issue ?. Error is clear that it's permissiond denied but what permission do i need to create this ?

Environment: I am logging with somebody@domainname.com (gsuite user)

From Command Line:
gcloud beta logging sinks create somesinknamehere --include-children --log-filter='resource.type="gce_subnetwork"' storage.googleapis.com/somebuckethere --organization=organizations/0000000000

Error : ERROR: (gcloud.logging.sinks.create) User [nataraj@somedomaindonamehere] does not have permission to access organization [0000000000] (or it may not exist): The caller does not have permission.

API

API

Request

POST https://logging.googleapis.com/v2/organizations/00000000000/sinks?key={YOUR_API_KEY}

{
"destination": "storage.googleapis.com/somebucket",
"filter": "resource.type="gce_subnetwork",
"name": "somenamehere",
"includeChildren": true
}

Response

403

  • Show headers -

{
"error": {
"code": 403,
"message": "The caller does not have permission",
"status": "PERMISSION_DENIED"
}
}

I tried the beta API and this the response that i am getting and it looks to me mostly like a Google issue to me at this point of time.

Request

POST https://logging.googleapis.com/v2beta1/organizations/0000000000/sinks?key={YOUR_API_KEY}

{
“destination”: “storage.googleapis.com/somelogsbucket”,
“filter”: “resource.type=\“gce_subnetwork”,
“name”: “somesinkname”,
“includeChildren”: true
}

Response

404

  • Show headers -
<title>Error 404 (Not Found)!!1</title> <style> *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px} </style>

404. That’s an error.

The requested URL /v2beta1/organizations/000000000/sinks?key=AIzaSyD-a9IF8KKYgoC3cpgS-Al7hLQDbugrDcw&alt=json was not found on this server. That’s all we know.

Note: Please find the stackoverflow link for the same issue.

https://stackoverflow.com/questions/50480372/error-error-gcloud-logging-sinks-create-user-natarajsomedomaindonamehere

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the Cloud Logging API.status: invalidtype: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions