opencdms-dev / legacy-opencdms-api

⭐🐍 OpenCDMS server application written in Python (FastAPI) and exposing a web interface for `opencdms-app` and other applications
MIT License
3 stars 3 forks source link

New authentication option when connecting to Climsoft databases #53

Open isedwards opened 2 years ago

isedwards commented 2 years ago

When both SURFACE_API_ENABLED and AUTH_ENABLED environment variables are set to True (e.g. here), opencdms-api uses Django's password hashing algorithm to authenticate API users against SURFACE's auth_user database table.

Climsoft CDMS does not maintain it's own user credentials, but instead uses MariaDB's mysql.user (i.e the user table in the database system's mysql database).

When connecting to Climsoft databases and AUTH_ENABLED is True, can opencdms-api authenticate against mysql.user using MariaDBs password hashing algorithm (possibly by directly calling the database's PASSWORD() function?