12

I've created several RESTful microservices and dockerized them. Now I want to have a web-based UI for them and the ability to create users and grant permissions to them to use some of the APIs.

I know that I need some kind of API gateway. My first thought was that I always could do that bruteforce way: create some django app that would serve UI and proxy all request to APIs by hand, but this seems very dull. Maybe there are some alternatives? I've ready about Tyk, but can't find any information about the ability to add users and grant permissions to them.

I probably could create an application that would serve as API gateway and automate proxying of requests by writing some code that would model that. So for example I basically need a mapping between external urls to actual api urls and some authorization logic. Maybe there are already something like that?

cellepo
  • 2,827
  • 2
  • 31
  • 46
user1685095
  • 5,042
  • 7
  • 39
  • 85

3 Answers3

18

I was looking for something similar, including support for rate limiting, UI console, etc. It boils down to a few freemium tools like:

and a few open source ones:

I've decided on tyk since it has a nice UI console and solid docs. All of them were mentioned on Quora, which is nice when you want to go shopping :)

milan
  • 9,932
  • 3
  • 36
  • 44
  • What about creating users and grant them permissions for APIs? – user1685095 Jul 29 '15 at 08:03
  • @user1685095 see my new Answer for solutions involving users / authentication / permissions. Of course it is focused on AWS - so this Answer here is better instead if more broad suggestions per API Gateway itself are desired (nice one @milan!). – cellepo Mar 28 '20 at 00:36
4

If you like getting your hands dirty, you could quite easily implement your own simplified API Gateway. I believe this approach perfectly fits into microservice paradigm - implement simple service with limited functionality that does only one thing, but does it well.

I've written a tutorial on this subject (implementing simple API Gateway for Dockerized microservices with Node.js). My example is about 100 lines of JavaScript code, it uses node-docker-monitor to listen to Docker events and http-proxy to handle HTTP requests from the clients.

https://memz.co/api-gateway-microservices-docker-node-js/

or alternative solution with SkyDNS and Nginx

https://memz.co/reverse-proxy-nginx-docker-microservices/

0

Unless I'm mistaken (I'm a bit new to containers) - I think all of these solutions from Amazon AWS (with AWS API Gateway itself in front of any of them for public access) would also fall in the category of freemium solutions for running / orchestrating Docker Container(s) behind a public API Gateway:

Here are AWS blogs on using AWS API Gateway with them:

And depending on your requirements, either of these (also from Amazon AWS) should also meet requirements for users, accounts, permissions, authorization, etc:

By the way, I don't think any intermediary management / compute / server should be necessary for architecting with any of those (although compute from AWS EC2 and/or AWS Lambda could still be inserted for any purpose), as they are all AWS services [that manage their functionality] unto themselves.

cellepo
  • 2,827
  • 2
  • 31
  • 46
  • This obviously focuses on AWS - but surely **all major cloud platforms have their own analogous solutions** for the most-part. – cellepo Mar 28 '20 at 23:16