Question: 403 err occurs when running make_iap_request.py
In which file did you encounter the issue?
https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/iap/make_iap_request.py
Did you change the file? If so, how?
import os
if name == 'main': os.environ[ "GOOGLE_APPLICATION_CREDENTIALS"] = '/Users/foo/bar.json'
print make_iap_request('https://foo.com/', 'xxxxtheidforthatiapservice.apps.googleusercontent.com')
Describe the issue
Trying to let a python command line to access(HTTP GET) IAP-protected application.
With https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/iap/make_iap_request.py
But 403 err occurs Exception: Service account [email protected] does not have permission to access the IAP-protected application.
Following methods have been tried, but still issue persists as above 1. remove/create the service account 2. re-create the json key file 3. grant the service account project owner permission
also posted on https://stackoverflow.com/questions/55349308/access-denied-for-service-account-when-accessing-iap-protected-application
Could you try checking your GOOGLE_APPLICATION_CREDENTIALS variable? I found the same error using Vision API, the I exported the environment variable, and then it works. check this link for more info
@afitz0 is this issue fixed (or non-issue)?
@andrewferlitsch neither; it's unowned.
@sgreenberg Can you assign this to someone. don't know who would cover this.
Closing due to lack of activity and that a possible solution was given. Feel free to re-open if more investigation needs to happen!