All Projects → acm-uiuc → groot-api-gateway

acm-uiuc / groot-api-gateway

Licence: other
API Gateway for the Groot project written in Arbor

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to groot-api-gateway

gateway
A high-performance API Gateway with middlewares, supporting HTTP and gRPC protocols.
Stars: ✭ 520 (+4233.33%)
Mutual labels:  api-gateway
serverless-content-encoding
Serverless plugin to enable content encoding for response compression
Stars: ✭ 14 (+16.67%)
Mutual labels:  api-gateway
gobis
Gobis is a lightweight API Gateway written in go which can be used programmatically or as a standalone server.
Stars: ✭ 48 (+300%)
Mutual labels:  api-gateway
yappa
Serverless deploy of python web-apps @yandexcloud
Stars: ✭ 57 (+375%)
Mutual labels:  api-gateway
api-gateway
Node.js API gateway that works as single entry point for all clients in a MicroService architecture pattern.
Stars: ✭ 26 (+116.67%)
Mutual labels:  api-gateway
rocket-lamb
A crate to allow running a Rocket webserver as an AWS Lambda Function with API Gateway or an Application Load Balancer
Stars: ✭ 73 (+508.33%)
Mutual labels:  api-gateway
Aspnetcore.proxy
ASP.NET Core Proxies made easy.
Stars: ✭ 234 (+1850%)
Mutual labels:  api-gateway
serverless-websockets-chat
Realtime chat app based on AWS Lambda, API Gateway, DynamoDB, Websockets, React in TS
Stars: ✭ 19 (+58.33%)
Mutual labels:  api-gateway
realtime-transport-dashboards
Serverless APIs for AWS to build and display public transports real time data (Serverless application example)
Stars: ✭ 23 (+91.67%)
Mutual labels:  api-gateway
sls-photos-upload-service
Example web app and serverless API for uploading photos and saving to S3 and DynamoDB
Stars: ✭ 50 (+316.67%)
Mutual labels:  api-gateway
CloudFrontier
Monitor the internet attack surface of various public cloud environments. Currently supports AWS, GCP, Azure, DigitalOcean and Oracle Cloud.
Stars: ✭ 102 (+750%)
Mutual labels:  api-gateway
serverless-go
Serverless Golang Function to Discover Movies 🎥
Stars: ✭ 37 (+208.33%)
Mutual labels:  api-gateway
GatewayService
GatewayService (Ocelot).
Stars: ✭ 19 (+58.33%)
Mutual labels:  api-gateway
kong-plugin-url-rewrite
Kong API Gateway plugin for url-rewrite purposes
Stars: ✭ 43 (+258.33%)
Mutual labels:  api-gateway
AspNetCore.ApiGateway
Asp Net Core Api Gateway Framework
Stars: ✭ 46 (+283.33%)
Mutual labels:  api-gateway
Krakend Ce
KrakenD Community Edition. Make your binary of KrakenD API Gateway
Stars: ✭ 245 (+1941.67%)
Mutual labels:  api-gateway
image-resizer-service
Serverless image resizing service for AWS
Stars: ✭ 95 (+691.67%)
Mutual labels:  api-gateway
noiiice
a serverless blog built on NuxtJS, AWS, serverless framework, and irrational exuberance.
Stars: ✭ 42 (+250%)
Mutual labels:  api-gateway
amazon-ivs-ugc-web-demo
This repository shows how you can build a compelling user-generated content (UGC) live streaming webapp with Amazon IVS.
Stars: ✭ 14 (+16.67%)
Mutual labels:  api-gateway
go2gql
graphql-go schema generator by proto files
Stars: ✭ 33 (+175%)
Mutual labels:  api-gateway

GROOT

Build Status

This repo contains the API Gateway written in Fall of 2015 It provides the following capabilities:

  • Easy registration of services
  • Universal Authentication for the entire application - via an external authentication provided (Atlassian crowd)
  • Proxying API calls
  • Managing inter-service communication

When registering as service specify the data encoding and when requesting a resource though groot make the request using json.

Join the chat at https://acm-uiuc.slack.com/messages/C6XGZD212/

RUNNING GROOT

Add the API spec in a new file (ex. todo.go) in the services package

There is a set of proxy api calls defined by the Arbor framework which the API Gateway is written in.

AS OF 4/24/17

/**
 *  Pass the http Request from the client and the ResponseWriter it expects
 *  Pass the target url of the backend service (not the url the client called)
 *  Pass the format of the service
 *  Pass a authorization token (optional)
 *  Will call the service and return the result to the client.
 **/
 arbor.GET(w http.ResponseWriter, url string, format string, token string, r *http.Request)
 /**
  *  Pass the http Request from the client and the ResponseWriter it expects
  *  Pass the target url of the backend service (not the url the client called)
  *  Passes the encoded json(only format currently supported) to the service.
  *  Pass a authorization token (optional)
  *  Will call the service and return the result to the client.
  **/
  arbor.POST(w http.ResponseWriter, url string, format string, token string, r *http.Request)
 /**
  *  Pass the http Request from the client and the ResponseWriter it expects
  *  Pass the target url of the backend service (not the url the client called)
  *  Passes the encoded json(only format currently supported) to the service.
  *  Pass a authorization token (optional)
  *  Will call the service and return the result to the client.
  **/
  arbor.PUT(w http.ResponseWriter, url string, format string, token string, r *http.Request)
/**
 *  Pass the http Request from the client and the ResponseWriter it expects
 *  Pass the target url of the backend service (not the url the client called)
 *  Pass a authorization token (optional)
 *  Will call the service and return the result to the client.
 **/
 arbor.DELETE(w http.ResponseWriter, url string, format string, token string, r *http.Request)

All secret data should be kept in a file called config.go in the config directory

Make sure you have go dependencey management installed

go get github.com/golang/dep/...

Install Dependencies [First time setup]

dep ensure 

Compile the service

./build.sh

CLI

groot-api-gateway [-r | --register-client client_name] [-c | --check-registration token] [-u | --unsecured]

-r | --register-client client_name

registers a client, generates a token

-c | --check-registration token

checks if a token is valid and returns name of client

-u | --unsecured

runs groot without the security layer

without args

runs groot with the security layer

Docker

Creating a client key:

docker-compose run groot-api-gateway ./build/groot-api-gateway -r <client_name>

Checking a client key:

docker-compose run groot-api-gateway ./build/groot-api-gateway -c <client_key>

Config Values

To allow all services to work with the docker network, make sure to set these values in config.go:

//Service hosts
const CreditsURL = "http://groot-credits-service:8765"
const EventsURL = "http://groot-events-service:8002"
const GigsURL = "http://groot-gigs-service:8964"
const GroupsURL = "http://groot-groups-service:9001"
const HardwareURL = "http://groot:4523/api/v1.0"
const MemesURL = "http://groot-meme-service:42069"
const MerchURL = "http://groot-merch-service:6969"
const QuotesURL = "http://groot-quotes-service:9494"
const RecruiterURL = "http://groot-recruiters-service:4567"
const UsersURL = "http://groot-users-service:8001"

//Arbor configurations
func LoadArborConfig() {
    security.AccessLogLocation = "/var/groot-api-gateway/access.log"
    security.ClientRegistryLocation = "/var/groot-api-gateway/clients.db"
    proxy.AccessControlPolicy = "*"
}

License

This project is licensed under the University of Illinois/NCSA Open Source License. For a full copy of this license take a look at the LICENSE file.

When contributing new files to this project, preappend the following header to the file as a comment:

Copyright © 2017, ACM@UIUC

This file is part of the Groot Project.  
 
The Groot Project is open source software, released under the University of Illinois/NCSA Open Source License. 
You should have received a copy of this license in a file with the distribution.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].