-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from everysoftware/feature/docker-tests
Move observability to another repo
- Loading branch information
Showing
38 changed files
with
104 additions
and
1,792 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
APP_NAME="breezeauth" | ||
APP_DISPLAY_NAME="Breeze Auth" | ||
APP_ENV="dev" | ||
|
||
DB_URL="postgresql+asyncpg://postgres:changethis@db:5432/app" | ||
REDIS_URL="redis://default:changethis@redis:6379/0" | ||
TEMPO_URL="http://host.docker.internal:4317" | ||
|
||
JWT_PRIVATE_KEY="certs/jwt-private.pem" | ||
JWT_PUBLIC_KEY="certs/jwt-public.pem" | ||
ADMIN_PASSWORD="changethis" | ||
|
||
GOOGLE_SSO=0 | ||
GOOGLE_CLIENT_ID="" | ||
GOOGLE_CLIENT_SECRET="" | ||
|
||
YANDEX_SSO=0 | ||
YANDEX_CLIENT_ID="" | ||
YANDEX_CLIENT_SECRET="" | ||
|
||
TELEGRAM_SSO=0 | ||
TELEGRAM_BOT_TOKEN="" | ||
|
||
MAIL_ENABLED=1 | ||
SMTP_HOST="smtp.gmail.com" | ||
SMTP_PORT=465 | ||
SMTP_USERNAME="" | ||
SMTP_PASSWORD="" | ||
SMTP_FROM_NAME="Breeze Auth" | ||
|
||
# Docker environment | ||
POSTGRES_USER="postgres" | ||
POSTGRES_PASSWORD="changethis" | ||
POSTGRES_DB="app" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
custom: https://boosty.to/everysoftware |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,60 @@ | ||
# FastAPI Auth | ||
# Breeze Auth | ||
|
||
Authorization server with **Google**, **Yandex** & **Telegram SSO**, **RBAC**, **user management**, etc. | ||
Powered by FastAPI & PostgreSQL. | ||
Authorization server with OAuth2, permissions, user management, etc. | ||
|
||
## Features | ||
|
||
- Secure and usable **JWT authorization** (feat. Refresh Tokens) | ||
- Extendable **single sign-on** via Google, Yandex & Telegram | ||
- Confirm actions using a **one-time code** (Email & Telegram) | ||
- Extendable **role-based access control** (supports user & superuser) | ||
- Powerful **user** management: CRUD, search, etc. | ||
- **Admin panel** with authorization & CRUD operations | ||
- **Observability** with Grafana: metrics, tracing & logging | ||
- Secure **JWT authorization** | ||
- Scalable Google, Telegram and Yandex **single sign-on** | ||
- **One-time code** confirmation (Email & Telegram) | ||
- Extendable **permission system** | ||
- Powerful **user management**: CRUD, search, roles, etc. | ||
- **Admin panel** with authorization and CRUD operations | ||
- **Grafana dashboard** with metrics, tracing & logging | ||
|
||
## Installation | ||
|
||
1. Clone the repository: | ||
1. Install [observability preset](https://github.com/everysoftware/fastapi-obs) | ||
2. Clone the repository: | ||
|
||
```bash | ||
git clone https://github.com/everysoftware/fastapi-auth | ||
``` | ||
```bash | ||
git clone https://github.com/everysoftware/fastapi-auth | ||
``` | ||
|
||
2. Generate RSA keys: | ||
3. Generate RSA keys: | ||
|
||
```bash | ||
openssl genrsa -out certs/private.pem 2048 | ||
openssl rsa -in certs/private.pem -pubout -out certs/public.pem | ||
``` | ||
```bash | ||
openssl genrsa -out certs/private.pem 2048 | ||
openssl rsa -in certs/private.pem -pubout -out certs/public.pem | ||
``` | ||
|
||
3. Create a `.env` file. Use the `.env.example` as a reference. | ||
4. Run the application: | ||
4. Create a `.env` file. Use the `.env.example` as a reference. | ||
5. Run the application: | ||
|
||
```bash | ||
make up | ||
``` | ||
```bash | ||
make up | ||
``` | ||
|
||
## Screenshots | ||
|
||
### Swagger UI | ||
|
||
![img.png](assets/swagger_auth.png) | ||
![img_1.png](assets/swagger_oauth.png) | ||
![Swagger Auth](assets/swagger_auth.png) | ||
![Swagger OAuth](assets/swagger_oauth.png) | ||
|
||
### Consent example | ||
### Consents | ||
|
||
![img.png](assets/consent.png) | ||
![Google](assets/google_consent.png) | ||
![Telegram](assets/telegram_consent.png) | ||
![Yandex](assets/yandex_consent.png) | ||
|
||
### Admin Panel | ||
|
||
![img_2.png](assets/admin_panel.png) | ||
![Admin Panel](assets/admin_panel.png) | ||
|
||
### Dashboards | ||
|
||
![img_3.png](assets/dashboard_metrics.png) | ||
![img_4.png](assets/dashboards_logs.png) | ||
![Metrics](assets/dashboard_metrics.png) | ||
![Logs](assets/dashboards_logs.png) | ||
|
||
**Made with love by Ivan Stasevich ❤️** | ||
**Made with ❤️** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from .main import app | ||
from .workers import MyUvicornWorker | ||
|
||
__all__ = ["MyUvicornWorker", "app"] | ||
__all__ = ["app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.