Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/diptochakrabarty/api-gateway-kong-golang

API Gateway developed using kong , golang and python services for a authentication and operations service where golang service acts as authentication mechanism and python service is backend and kong is gateway
https://github.com/diptochakrabarty/api-gateway-kong-golang

authentication cloud cloud-computing cloudnative devops flask gin-gonic golang kong kong-api-gateway kong-gateway python python3

Last synced: 9 days ago
JSON representation

API Gateway developed using kong , golang and python services for a authentication and operations service where golang service acts as authentication mechanism and python service is backend and kong is gateway

Awesome Lists containing this project

README

        

# api-gateway-kong-golang

## General Introduction
- This is a api gateway microservices proect
- It involves following technologies
- Kong
- Golang
- Python

## Architecture

![Architecture Image](/images/arch.png)

- Users sends requests to the service which are handled by kong
- All requests involving logging in the user are directed to the golang service
- The golang service provides a jwt token
- All other requests are redirected first to golang service for authentication
- Once authenticated it is redirected to the backend service
- Golang service acts as authentication mechanism and python service acts as backend

## Initial Configuration
- Add your Ip Address to gateway in config/kong.yaml

```
extra_hosts:
- "host.docker.internal:"
```

- Set password for postgres in kong-gateway/POSTGRES_PASSWORD file

- Install python dependencies
```
pip3 install -r requirements.txt
```

- Install golang dependecies
```
go mod download
```

- Add api endpoints configuration under kong-gateway/config/kong.yaml

## Running application
- Run python backend api
```
python3 backend/app.py
```

- Run golang server
```
go run main.go
```

- Run kong proxy
```
in kong-gateway directory
docker-compose up
```

- curl commands present in curl-commands.md