2026-06-18 09:20:44 +02:00
2026-06-18 09:20:44 +02:00
2026-06-18 00:03:47 +02:00
2026-06-17 17:17:18 +02:00
2026-06-18 00:03:47 +02:00
2026-06-18 00:03:47 +02:00
2026-06-17 17:17:18 +02:00
2026-06-17 17:17:18 +02:00
2026-06-18 09:20:44 +02:00
2026-06-17 19:04:39 +02:00
2026-06-17 19:04:39 +02:00
2026-06-17 17:17:18 +02:00
2026-06-18 00:03:47 +02:00
2026-06-17 19:04:39 +02:00

OIDC Showcase – Flask + Zitadel RBAC

Proof-of-Concept-Webapplikation zur Demonstration von feingranularem, dynamischem Role-Based Access Control (RBAC) und Multi-Tenancy mit Zitadel als externem Identity Provider (IdP) über OIDC.

Ziel: Authentifizierung vollständig an Zitadel delegieren. Autorisierung, Projektzuweisung und Datentrennung lokal über SQLite verwalten.


Technologie-Stack

Komponente Technologie
Backend Python Flask 2.x
OIDC-Client Authlib
Datenbank SQLite via SQLAlchemy
IdP Zitadel (https://id.vmlx.de)
Produktion Docker / gunicorn

Rollen

Rolle Zugriff
Admin Vollzugriff auf alle Clients, Projekte und Nutzer
Mitarbeiter Nur zugewiesene Projekte (N:M-Tabelle lokal)
Kunde Nur zugewiesene Projekte des eigenen Clients

Lokale Entwicklung

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env    # Zitadel-Credentials eintragen (siehe ZITADEL-SETUP.md)
flask seed-db           # Schema initialisieren + Testdaten einspielen
flask run               # App startet auf http://localhost:5000

Docker / Produktion

docker compose up --build
# App erreichbar auf http://localhost:8000

Ein Basis-Image-Update löst durch pull_policy: always automatisch einen Rebuild aus.


Zitadel einrichten

Anleitung zum Anlegen von Testnutzern, Rollen und OIDC-Credentials: → ZITADEL-SETUP.md

Dokumentation generieren

pip install sphinx
sphinx-apidoc -o docs/source/ app/
cd docs && make html
# Doku unter docs/_build/html/index.html
S
Description
oidc anbindung und Authentifizierung testen
Readme
68 KiB
0 Stars 5 Watchers 0 Forks
Languages
Python 62.6%
HTML 27%
CSS 9.6%
Dockerfile 0.8%