feat: Sammelpostfach per SSO (OAuth/XOAUTH2) statt Passwort

Einmal "Connect mailbox" (OIDC mit PKCE, prompt=login, Anmeldung als technisches Konto des
Postfachs), Prüfung der Mail-Adresse im Token, Refresh-Token verschlüsselt in DATA_DIR,
Access-Token im Speicher; ein gunicorn-Worker wegen der Token-Rotation. Ohne OIDC_* weiter mit
EMAIL_PASSWORD.

Claude-Session: https://claude.ai/code/session_01SqzF6qT3TQ8ej3wigEuMSu
This commit is contained in:
Rsclub2_2 committed 2026-10-29 14:29:22 +01:00
1 parent b741389754
commit 68940e831a
7 files changed
+404 -6

No files matched your search

+4 -3
View File
@@ -5,7 +5,7 @@ WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py index.html result.html ./
COPY app.py oauth.py index.html result.html ./
COPY static ./static
RUN useradd -m -u 1000 app
@@ -15,5 +15,6 @@ EXPOSE 5000
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:5000/health')"
# gunicorn instead of the Flask development server (no Werkzeug debugger)
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "--timeout", "120", "app:app"]
# gunicorn instead of the Flask development server (no Werkzeug debugger); one worker, because the
# OAuth refresh token rotates and must not be refreshed by two processes at once
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "1", "--threads", "4", "--timeout", "120", "app:app"]