README
¶
GCP IAP Oauth2 with Golang Sample
This is a sample code for access GAE standard through IAP.
Before User
- Setup a GAE web server.
- Setup a IAP for GAE.
- Create a service account only for access GAE through IAP.
- Download the service account key json file.
- Get IAP client ID.
Use
$ GAE_WEB_URI="<YOUR_GAE_URL>" \
CLIENT_ID="<YOUR_IAP_CLIENT_ID>" \
SEVICE_ACCOUNT_KEY_PATH="<YOUR_JSON_KEY_PATH>" \
go run ./main.go
for exmaple:
$ GAE_WEB_URI="https://<PROJECT_ID>.appspot.com" \
CLIENT_ID="<RANDOM_STRING>.apps.googleusercontent.com" \
SEVICE_ACCOUNT_KEY_PATH="key.json" \
go run ./main.go
Documentation
¶
There is no documentation for this package.
Click to show internal directories.
Click to hide internal directories.