Improve SSO support (Round #2)
Author: selfhoster1312Created Jun 12, 2023Updated Sep 12, 2026
Related to #141 and https://github.com/YunoHost-Apps/navidrome_ynh/issues/101
- When SSO is enabled account is populated from SSO headers, with random password ; password change is allowed without knowing this first password
- When the service is accessed outside SSO: for the first time it just doesn't work; after SSO account bootstrapping, the password is not known and there is no indication that you need to change the password manually after logging in from SSO
Expected Behavior
There are many ways to address this problem (they are complementary):
- For SSO systems that support it, extract the plaintext password directly from HTTP headers to populate the DB (via a new config param)
- Prompt the user after logging in from SSO for the first time to setup a navidrome-specific password
- Support LDAP login (#141) and allow to fallback to LDAP auth when SSO provides no information
Here's my rough design proposal:
- navidrome supports two auth modes: internal or external
- internal mode is similar to current system with HTTP SSO disabled
- external mode does not store/handle passwords in any way, only usernames and related data ; multiple sources can be chained for external auth (eg. first SSO then LDAP)
I can dedicate at least one day full-time on this, but I may need guidance on what to keep from the current system, and help for the UI/Javascript part. Would this patch be welcome?
Source: navidrome/navidrome