Authentication of REST API on GKE with Google Cloud Service Account

922 Views Asked by At

I am looking to host my REST APIs on GKE (microservices), I want other applications and services I develop to authenticate with these APIs using JWT with Spring Boot Security. I want to generate a JWT token from a Google Cloud Service Account from a Google Cloud project and use this to authenticate with my APIs. My question is, is this possible to secure the API's that I develop to allow a JWT token to authenticate against Google Cloud IAM (Service Account). An example on the Spring side would be most helpful..

I am looking to something similar to what you can do in App Engine with the ESP..

1

There are 1 best solutions below

0
On

You can follow the Google official documentation:

Authentication between services

You have to:

  1. Created a Google Cloud project.

  2. Created an OpenAPI document for your API.

  3. Deployed your OpenAPI document.

  4. Deployed the API backend.

The Api backend can be on Google Kubernetes Engine, Compute Engine, and the App Engine flexible environment. You have to deploy the Extensible Service Proxy (ESP) to Google Kubernetes Engine.

Deploying the API backend