'How to allow users to consume GCP API Gateway programmatically?
I have a simple bussiness case, not real one, but common:
- We have an API to sell, maybe weather API.
- Users stored and managed with some identity provider.
- Users can generate JWT token to use for machine-to-machine communication. For example using
client_id
andclient_secret
.
Now what GCP offers for this scenario:
- API Gateway is the way to go, it has JWT auth available.
- Firebase or Identity platform are good options to store and manage users.
- 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 |
---|