Search code examples
spring-bootgoogle-cloud-platformgoogle-cloud-endpointsopenapi

Is there a third party service that can do api key management while not requiring the user to make an account on GCP for example?


If I want to make a public api, I am pretty sure I need some sort of third party vendor to manage the api key authentication, because the alternative would be something inefficient like an alphanumeric generator and checking against a database of keys.

I was doing some research into Cloud Endpoints as a potential solution because it can handle api keys, but according to their documentation, any prospective user would need a GCP project specifically registered to my api in order to get an api key. This is dumb because the right way to do api registration isn't by forcing people that might not even be using GCP to make an account.

So is there any service, whether it comes from Google or someone else, that allows me to generate and manage api keys at my discretion (so I decide how a user is able to register for an api key and control its disbursement) that also has a clean solution for verification that I could implement for a Spring Boot api?

Edit: I should clarify some of the features of said imaginary service could provide that would probably be reinventing the wheel to manually implement.

  • rate limiting, to lock out any api keys that are making too many requests too quickly

  • usage limits, say N requests per day or something like that

  • efficiency of key authentication, in order to ensure the api itself is performant

  • ensuring uniqueness of keys

  • allow on demand creation and termination of keys from say an angular app

If your API requires an API key, you either have to give your API users a key from the project that you created the Cloud Endpoints service in, or you can let users enable your API in their own Google Cloud project and create an API key.

I also noticed this verbiage, so it wouldn't be the perfect solution but I could consider Cloud Endpoints if there was a way to accomplish this through code. If there is a way to automate creation + distribution of api keys for my GCP project as a hacky workaround, that could certainly be a solution.

At the moment the only instructions I can find on that operation is manually through the UI though, which is not feasible.


Solution

  • Apigee on Google Cloud is probably what you want to look into. It has many solutions with guides:

    Moreover, you can then use Apigee to further extend the API for monetization if you wish so.