Google Cloud Endpoint API for Kubernetes Engine Authentication with Auth0
Cloud endpoints are used as a front to application deployed in GCP on app-engine or kubernetes engine. It provides the a number of features for securing, monitoring and overall management of programmatic access to applications deployed.
GCE provides three methods to deploy the endpoints:
- Cloud Endpoints for OpenAPI
- Cloud Endpoints for gRPC
- Cloud Endpoints Frameworks for the App Engine standard environment
For App-Engine specific deployment refer the documentation : Quickstart for Cloud Endpoints
Cloud Endpoints for kubernetes Engine:
To deploy the Cloud endpoints API for application deployed on Kubernetes Engine :
- Create and deploy the back-end application on the kubernetes Engine.
- Create and deploy the Cloud Endpoints for the application deployed onto the k8s cluster.
Refer link given below to complete the above two steps: https://cloud.google.com/endpoints/docs/openapi/get-started-kubernetes-engine
Authenticating the cloud endpoints
- Create or sign-up for Auth0 account
- Go-to the API section in Auth0 dashboard and create new API
3. Now edit the openapi.yaml file with the below given parameters in security definitions tag
4. Now provide the security tag for method as
5. To get the bearer token you need to curl with the credentials of API created in auth0. find the test section of an API in auth0 to get all details.
6. Using the token provide by the above command you can access the Cloud Endpoint API.