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

https://github.com/waifusquad/rasopus-backend

The Rasopus URL shortener backend
https://github.com/waifusquad/rasopus-backend

api backend rest rocket rust

Last synced: 8 months ago
JSON representation

The Rasopus URL shortener backend

Awesome Lists containing this project

README

          

# Rasopus Backend

The Rasopus URL shortener backend

## Collaborating

Check out [Board](https://github.com/orgs/WaifuSquad/projects/3), and [Issues](https://github.com/WaifuSquad/Rasopus-Backend/issues)

## Configuration

The following environment variables can be used to configure the Rasopus backend:

| Variable | Required | Description |
| ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `RASOPUS_ADDRESS` | Optional | The address Rocket will bind to. When not provided, Rocket's internal default is used. At the time of writing, this is `0.0.0.0`. |
| `RASOPUS_PORT` | Optional | The port Rocket will bind to. When not provided, Rocket's internal default is used. At the time of writing, this is `8000`. |
| `RASOPUS_SECRET_KEY` | Required | The secret key passed to Rocket for encrypting private cookies. For example, you can generate one with OpenSSL by executing `openssl rand -base64 32`. |
| `RASOPUS_POSTGRES_USER` | Required | The name of the postgres user. |
| `RASOPUS_POSTGRES_PASSWORD` | Required | The password of the postgres user. |
| `RASOPUS_POSTGRES_HOST` | Required | The postgres host to connect to. |
| `RASOPUS_POSTGRES_PORT` | Required | The postgres port to connect to. |
| `RASOPUS_POSTGRES_DATABASE` | Required | The name of the postgres database schema to use. |
| `RASOPUS_POSTGRES_POOL_SIZE` | Optional | How many postgres connections to open. By default, this has the value `10`. This should be enough, but the option is there, just in case. |
| `RASOPUS_ARGON2_ITERATIONS` | Optional | The number of iterations for Argon2 hashing. By default, this has the value `3`, which is in range of what [OWASP recommends](https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#argon2id). This is a good cost/value trade-off. If you want higher security at the cost of performance, increase this to `4` or even `5`. If you're insane, you can also go beyond that. |
| `RASOPUS_ARGON2_MEMORY_MIB` | Optional | The memory size in MiB for Argon2 hashing. By default, this has the value `70`, which is higher than what [OWASP recommends](https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#argon2id). Same as above, increase for additional security at the cost of performance. |