FusionAuth and API Gateway (Kong)
-
Hi all,
we are trying to setup and connect FusionAuth in our micro-service architecture which is using Kong as an API Gateway and are struggling to understand how to best integrate it.
Couple of questions:
-
Is there any best practice article were you describe how to best integrate FusionAuth in an API Gateways?
-
How to best deal with Users which exists inside Organizations (were they have specific roles like: editor, admin, owner, etc) ?
-
Do you recomand starting directly with JWT + oauth2 or just JWT?
-
What would be the flow for registering new users and afterwords logging them in, as well as syncing the data from micro-services to FusionAuth (in case of user being able to manage their data (email, name, etc) in our micro-services)?
Thanks in advance!
-
-
Is there any best practice article were you describe how to best integrate FusionAuth in an API Gateways?
Unfortunately I am not aware of any.
How to best deal with Users which exists inside Organizations (were they have specific roles like: editor, admin, owner, etc) ?
Each FusionAuth application can have as many roles as you want, and each user can be assigned roles on an application by application basis. I'm not sure I understand your question, can you explain further?
Do you recommend starting directly with JWT + oauth2 or just JWT?
Are you asking if you should use OAuth or the Login API for user authentication? I'm not sure what applications you're trying to integrate, but if you are using anything external (like a forum, help desk software, etc), it'll be less work to integrate OAuth. If you are just using FA as the user store, the Login API is more straightforward.
What would be the flow for registering new users and afterwords logging them in, as well as syncing the data from micro-services to FusionAuth (in case of user being able to manage their data (email, name, etc) in our micro-services)?
You can use this API: https://fusionauth.io/docs/v1/tech/apis/registrations#create-a-user-and-registration-combined and then this API: https://fusionauth.io/docs/v1/tech/apis/login in your signup flow to register a user and then log them in.
FusionAuth doesn't have any special support for syncing up user data. You could of course call the update user API: https://fusionauth.io/docs/v1/tech/apis/users#update-a-user from any of your microservices if you desired.
Hope this helps.
-
We have started to document API gateway integrations with FusionAuth here: https://fusionauth.io/docs/v1/tech/developer-guide/api-gateways/