I built my container image and then deployed to Cloud Run using the Cloud Console. However, when I open the endpoint URL of my service, I get a 403 "Error: Forbidden"
page
If you receive a 403 "Error: Forbidden" error message when accessing your Cloud Run service, it means that your client is not authorized to invoke this service. You can address this by taking one of the following actions:
Try this solution.
Go to Cloud Run then click on your service (In this example, "hello-world") :
Then, go to "TRIGGERS" and look at "Authentication" :
Your "Authentication" will be "Require authentication" :
So change it to "Allow unauthenticated invocations" then click on "SAVE" :
Finally, you will be able to open your URL properly.
In addition, you can choose "Allow unauthenticated invocations" for "Authentication" when you create a service on Cloud Run :
I have used IAP to resolve this issue. If there is a use case where only authenticated users must be able to access the application then use IAP
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.