Skip to content

LDAP Auth#601

Open
yaemiku wants to merge 102 commits into
sentriz:masterfrom
yaemiku:ldap_auth
Open

LDAP Auth#601
yaemiku wants to merge 102 commits into
sentriz:masterfrom
yaemiku:ldap_auth

Conversation

@yaemiku
Copy link
Copy Markdown

@yaemiku yaemiku commented Sep 21, 2025

I have come across PR #346 while looking for a way to have a music server that integrates with LDAP. I managed to get it working for me. I have

  • Fixed the LDAP authentication logic. Auth is performed solely against the LDAP database. Users who pass the user filter are automatically registered when trying to log in for the first time. Users who pass the admin filter are assigned admin privileges
  • While testing, I noticed that the "Tempo" subsonic client sends the password parameter hex-encrypted (in the form of "p=enc:HEXHERE"). Added support for that as well

@yaemiku
Copy link
Copy Markdown
Author

yaemiku commented Feb 15, 2026

Sorry for the delay, lots of stuff has been happening lately. I hope this is how you have envisioned moving ldap.LDAPStore into cmd/gonic/gonic.go. I have also added appropriate entries for the environmental variables concerning LDAP in README.md, including a comment about escaping commas, since I've run into not doing that being an issue (I guess flagconf interprets a string with commas as an array and picks out the last entry as the final value being passed down, but as I have stated - I'm not much of a Go developer - so I'm not acquainted with it)

@mantralunar
Copy link
Copy Markdown

Loving the work you've done @yaemiku. Im no expert, but from the env documentation you've included in your fork, and doing a bit of diving through the logs, it looks like the bind user is looked up using a hardcoded uid=, is it possible to make this part of the variable? my workflow uses cn= but Im unable to bind with it as its automatically inserting uid= beforehand (uid=cn=myuser)... Would love to get this up and running! :)

@yaemiku
Copy link
Copy Markdown
Author

yaemiku commented Feb 18, 2026

Added another flag to change that behavior. Let's for example say that you have a user username=xyz,ou=users,dc=domain,dc=org, then you'd set in your env:

GONIC_LDAP_BASE_DN='ou=users\,dc=domain\,dc=org'
GONIC_LDAP_USERNAME_ATTR=username

Hope that helps :)

@mantralunar
Copy link
Copy Markdown

Thank you for the quick fix! Seems to be working now! Now to sort out my syntax for the admin filters! Much appreciated!

@sentriz sentriz force-pushed the master branch 2 times, most recently from 66c0eb5 to b2674f8 Compare February 24, 2026 14:51
@Cherryblue
Copy link
Copy Markdown
Contributor

Hi there,

Interested too ; @sentriz what would be needed for this to be merged on gonic main branch, more testers/users ? reviewers ?

I can test it on my environment with my existing ldap, and eventually do a code review even if I'm no go expert (I can at least verify the logic if needed).

Have a nice day everyone !

@mantralunar
Copy link
Copy Markdown

I’ve been using @yaemiku fork for quite a while now. Stable enough, getting clients to work can be a bit tricky, something to do with token login not being supported I think, client needs to accept credentials sent as plaintext in the URL which I imagine is a bit of a security risk- but on my home LAN I’m not too concerned. Unless I’m missing something, otherwise seems pretty stable!

sentriz and others added 11 commits April 26, 2026 03:00
… errors

listenbrainz's server can't handle the larger TLS ClientHello from
Go's post-quantum key exchange (Kyber). Explicitly set classic curve
preferences to avoid "connection reset by peer" errors.

golang/go#70139
* [ PR Year @ Track-level ] This resolves issue sentriz#549

* Update db/migrations.go

Co-authored-by: Senan Kelly <senan@senan.xyz>

* [ PR sentriz#661 ] Fixes proposed by Sentriz (file indentation, simpler call to functions)

* [ PR sentriz#661 ] Fix File indentation for construct_by_folder

* [ PR sentriz#661 ] Set known tracks year field to their parent (album) year value ; until next deep scan.

* [ PR sentriz#661 ] Fix database field names in sql query

* Update db/migrations.go

Co-authored-by: Senan Kelly <senan@senan.xyz>

* Update db/migrations.go

Co-authored-by: Senan Kelly <senan@senan.xyz>

---------

Co-authored-by: Senan Kelly <senan@senan.xyz>
write playlist item paths relative to the playlist file directory, an resolve relative paths back to absolute on read

closes sentriz#537
closes sentriz#529
There were a number of error codes being returned that did not match the
the code given by the spec. Primarily this was the use of error code 10
(missing input parameter) when 70 (data not found) was the more
appropriate return. Though several uses of 10 are actually 0 (internal
server or unspecified error).

Signed-off-by: Eric B Munson <eric@munsonfam.org>
I came across this issue when I started to use a custom RSS
generator that works fine for e.g. the Apple Podcasts app
but results in a crash in gonic.

I found these nil pointer dereferences by looking at the stacktraces
only.
No time was spent looking for additional locations were this might need to
be fixed.

The custom generator if that helps
https://gist.github.com/diepfote/59aaf5eb8ea3e2d7bcdd97b8efd2a472
…ts status (sentriz#672)

Some error paths out of this function are not setting the podcast status
to 'error'. Move the deferred error checking earlier to ensure the
status is set.

Signed-off-by: Eric B Munson <eric@munsonfam.org>
@sentriz sentriz force-pushed the master branch 3 times, most recently from 42aaccf to 6b377e7 Compare April 29, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants