Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hvalfangst/encryption-api
Flask AES API running on Gunicorn deployed on Kubernetes
https://github.com/hvalfangst/encryption-api
aes-encryption docker flask gunicorn kubernetes nginx python redis wsgi
Last synced: 5 days ago
JSON representation
Flask AES API running on Gunicorn deployed on Kubernetes
- Host: GitHub
- URL: https://github.com/hvalfangst/encryption-api
- Owner: hvalfangst
- Created: 2023-02-06T23:33:29.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-28T14:17:36.000Z (almost 2 years ago)
- Last Synced: 2024-11-25T08:33:29.485Z (2 months ago)
- Topics: aes-encryption, docker, flask, gunicorn, kubernetes, nginx, python, redis, wsgi
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gunicorn Flask encryption API with NGINX reverse proxy
Provides endpoints for encrypting and decrypting using AES in CBC mode with PBKDF2 key derivation
## Requirements
* Docker
* Kubernetes cluster##
## Creating resources
The shell script "up.sh" is responsible for building the local Docker image and creating resources
```
sh up.sh
```## Port forwarding
The following command will reroute requests from local port 6666 to that of port 80 of the nginx pod
```
kubectl port-forward deployments/nginx 6666:80
```## Deleting resources
The shell script "down.sh" frees up allocated resources```
sh down.sh
```## Endpoints
---
### Encrypt (raw body: text), (bearer token) -> ciphertext
POST http://localhost:6666/encrypt
### Decrypt (raw body: ciphertext), (bearer token) -> text
POST http://localhost:6666/decrypt
---
### Create User (json body: {username, password}) -> text
POST http://localhost:6666/users
### List Users -> JSON
GET http://localhost:6666/users
### Delete User (json body: {username, password}) -> text
DELETE http://localhost:6666/users
---
### Login (json body: {username, password}) -> Token
POST http://localhost:6666/login