OAuth2.0 Auth Server and IAM

500 Views Asked by At

I'm building a microservice based REST API and a native SPA Web Frontend for an application. The API should be protected using OAuth2.0 to allow for other clients in the future. It should use the Authorization Code Flow ideally with Proof Key for Code Exchange (PKCE)

As I understand it I need to run my own OAuth Auth Server that's managing the API Clients and generating access tokens, etc. Also I need my own Authentication/IAM service with it's own fronted for user login and client authorization granting. This service is the place the users login credentials are ultimately checked against a backend. That last part should be flexible and the backend might be an LDAP server in some private cloud deployment.

These components (Auth Server and IAM servicve) are outside of the OAuth scope but appear, correct me if I'm wrong, to be required if I'm running my own API for my own users.

However creating these services myself appears to be more work than I appreciate besides the obvious security risks involved.

I read about auth0 and okta but I'm not sure if they are suited for my use case with the application potentially deployed in private cloud. I also thought about running Hydra (OAuth Server) and Kratos (IAM) by ory but I'm not sure if this is adding too many dependencys to my project.

Isn't there an easy way to secure an API with OAuth that deals with the Auth Server and the IAM that's good for small projects?!

0

There are 0 best solutions below