Repository navigation
Replies: 2 comments 14 replies
|
We can't really change the OG specs. What LMS does is that it enforce passing the apiKeys to auth to the legacy endpoints. That's a nice middle ground. |
|
I’m not sure if we can reach consensus on this, but there seems like enough concerns that I think we should try. And there are enough servers that are already diverging from the spec that I think it’s becoming more of a problem. The original reason I started this thread was because a lot of us client developers were surprised to learn that what many of the servers are doing was different than what the spec says. So, I have written a PR for some changes to this, and then we can discuss further and see if we can work towards something we can hopefully all find acceptable: #278 If anyone else would like to try a different approach, please feel free. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Last week, @deluan said this on the Navidrome Discord:
(link to message)
As I understand it, Navidrome (and presumably, all other servers that implement token auth) must keep the password in clear text in the database, in order to implement token authentication. Because of the random salt, the only way to validate the password is to start from the same clear text and run the same hash+salt on the server side. (Or, theoretically, you could try to crack the MD5 on every HTTP request, but that would be a bit impractical, to say the least.)
Anyway, it's not good practice to keep a cleartext copy of the password anywhere in storage, so I see why they would want to move away from that. Some related bug reports: [1] [2]
But in doing so, Navidrome will no longer be able to support token auth.
The OpenSubsonic spec currently says this:
This text seems to have been copied directly from the Subsonic API docs.
So in other words, the spec is currently recommending the same thing that Navidrome wants to stop doing.
As a result, some clients (including mine) were under the mistaken impression that we could implement only token authentication and conform to the OpenSubsonic spec that way. It's reasonable to read that part of the spec and come away with the understanding that all OpenSubsonic servers support token auth; but it seems like this may not be the case in the future.
I have now fixed this in my client, so that it falls back to hexadecimal or plaintext passwords when it encounters error code 41 or 42.
I'm thinking we should probably make some changes to this page in the spec so that new clients reading the spec will better understand what they need to do.
I can write up a PR for this change, but before I do that, I wanted to open this up for discussion first. Any thoughts or concerns?
All reactions