Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

403 Error when trying to initialize a project for Anthos Service Mesh installation

Hi there,

I'm a newbie to Kubeflow and am trying to follow step-by-step instructions to deploy over Google Cloud. Right now, I am stuck with how to initialize a project for Anthos Service Mesh installation.

I'm running this code on bash:

 

 

 

curl --request POST \
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
--data '' \
https://meshconfig.googleapis.com/v1alpha1/projects/${PROJECT_ID}:initialize

 

 

 


And am getting this error:

 

 

 

"error": {
"code": 403,
"message": "Permission denied on resource project -325000.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developer console API key",
"url": "https://console.developers.google.com/project/-325000/apiui/credential"
}
]
},
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "CONSUMER_INVALID",
"domain": "googleapis.com",
"metadata": {
"consumer": "projects/-325000",
"service": "meshconfig.googleapis.com"

 

 

 


I made sure to enable the Anthos API on the G-Cloud console, and even created a new project in case there was a residual issue at stake. I reinitialized over bash many times to make sure that the right Google account and project are selected. I looked over Google Cloud's documentation on code 403 error which specifies that "The authorization policy denies a request if it is not allowed by the policy. For HTTP (including gRPC) protocols, the request will be denied with status code 403."

I tried setting-up authentication but that's not making a difference either?

I'm unsure how to go about resolving this issue.

0 1 4,026
1 REPLY 1

I would test the calculated values by running

 

echo "Authorization: Bearer $(gcloud auth print-access-token)"
echo "https://meshconfig.googleapis.com/v1alpha1/projects/${PROJECT_ID}:initialize"

 

then test the curl command with the result.

Though from the error message it looks like your PROJECT_ID is incomplete, -325000 seems to be missing the first part. Check the Dashboard page in the console for the full ID or run 

gcloud config get-value project

in the SDK shell.

Better still, run this to set the value correctly

PROJECT_ID=$(gcloud config get-value project)
Top Labels in this Space