'How to allow users to consume GCP API Gateway programmatically?

I have a simple bussiness case, not real one, but common:

  1. We have an API to sell, maybe weather API.
  2. Users stored and managed with some identity provider.
  3. Users can generate JWT token to use for machine-to-machine communication. For example using client_id and client_secret.

Now what GCP offers for this scenario:

  1. API Gateway is the way to go, it has JWT auth available.
  2. Firebase or Identity platform are good options to store and manage users.
  3. Logged in users has JWT which can be used with API Gateway, but we need machine-to-machine flow to obtain the token. And both Firebase or Identity platform can't be used for this.

I am curious if this is a correct way to approach this case, because the only way to solve it is to use some third party identity provider like Auth0, or make inhouse solution to generate machine-to-machine JWT. I just can't believe GCP has nothing to offer for such common use case.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source