Commit graph

11 commits

Author SHA1 Message Date
SamoilenkoVadym
f5cb1170bb Fix superadmin matching: case-insensitive username/email lookup
Azure AD returns mixed-case usernames (VadymSamoilenko) but
superadmin was created with lowercase. Use LOWER() for matching.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 21:57:49 +00:00
SamoilenkoVadym
c59db0e9fd Serve static files via Apache, not Docker
- deploy.sh copies static/ to /var/www/html/solventum-image-metadata/
- Apache Alias serves CSS/JS directly from disk
- ProxyPass exclusion prevents static requests going to Docker
- Updated apache config with full working example

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 21:50:02 +00:00
SamoilenkoVadym
60e403494e Switch MSAL.js CDN from msauth.net to jsdelivr
Microsoft CDN URL was unreachable. Using jsdelivr with
@azure/msal-browser@3.27.0 instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 21:47:20 +00:00
SamoilenkoVadym
154658f5d7 Fix MSAL redirectUri to match Azure AD registration
redirectUri = https://ai-sandbox.oliver.solutions/solventum-image-metadata/
(app root, not /login or /auth/callback)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 21:46:11 +00:00
SamoilenkoVadym
eaa12be728 Fix MSAL.js load order: use onload callback
Define initMsal() first, then load CDN script with onload="initMsal()".
Prevents 'msal is not defined' race condition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 21:45:29 +00:00
SamoilenkoVadym
ff3b89f18c Fix MSAL.js: async initialize() before use
MSAL.js 2.x requires await initialize() before loginPopup().
Also added openid/profile/email scopes and loading state guard.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 21:43:58 +00:00
SamoilenkoVadym
f8711c1ace Switch SSO to client-side MSAL.js (no client secret needed)
- Frontend MSAL.js handles Azure AD popup login
- Backend validates access token via Graph API
- Removed server-side MSAL redirect flow (get_auth_url, acquire_token)
- MicrosoftSSO class simplified: only needs Graph API validation
- No AZURE_CLIENT_SECRET required

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 21:42:10 +00:00
SamoilenkoVadym
f635432f65 Make AZURE_CLIENT_SECRET optional for SSO
Support both ConfidentialClientApplication (with secret) and
PublicClientApplication (without secret). SSO now only requires
AZURE_CLIENT_ID and AZURE_TENANT_ID.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 21:39:15 +00:00
SamoilenkoVadym
b49096f42d Add itsdangerous dependency for Starlette session middleware
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 21:33:11 +00:00
SamoilenkoVadym
bcb2c49e43 Fix deploy.sh: auto-detect sudo for docker commands
git pull runs as current user (needs SSH key), docker commands
use sudo automatically if the user doesn't have docker socket access.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 21:29:20 +00:00
SamoilenkoVadym
3deaa5ef40 Initial commit: Oliver Metadata Tool (FastAPI)
Complete Flask → FastAPI migration with:
- FastAPI app with session auth, Azure AD SSO, rate limiting
- SQLite-backed session store (survives restarts)
- Bulk AI metadata generation with SSE progress
- Admin panel (user management, audit log, AI usage)
- Subpath deployment support (ROOT_PATH config)
- Docker + deploy.sh for production deployment
- Test suite (auth, upload, templates, imports, admin, sessions)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 21:23:42 +00:00