mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-25 14:35:52 +03:00
[GH-ISSUE #145] Add LDAP auth support #108
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ynsta on GitHub (Aug 20, 2019).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/145
Hello,
I would like to contribute to add ldap auth support in your project.
@RadhiFadlillah do you plan to merge soon your ramadhan branch, if not I'll do a PR into this branch ?
I'll need to add a some config options (ldap server, port, tls, search string, ...) I think a shiori.toml file should be a fine solution.
Regards
@ynsta commented on GitHub (Aug 21, 2019):
Here is a proposition of configuration to be discussed
@RadhiFadlillah commented on GitHub (Aug 21, 2019):
Hi @ynsta
Yep, I just need to make sure that the old database is still compatible, then I will merge it. If all goes well, maybe at most two days from now the branch will be merged to master.
Please bear with me, but this is the first time I heard about LDAP.
If I understand it correctly, LDAP is protocol for accessing directory server. Directory server itself is a type of database that stores information represented as trees of entries instead of tables as usually found in relational database. Therefore, directory server can be considered as a type of NoSQL database.
As any other NoSQL database, one of the strength of directory server is it's really fast at reading or querying a large dataset. Therefore, a common use of LDAP is to provide a central place to store usernames and passwords. This allows many different applications and services to connect to the LDAP server to validate users.
So, from what I understand, by implementing LDAP auth, Shiori can connect into a LDAP server. Therefore, when user login in Shiori, instead of comparing user's data in Shiori's own database, now it will compare the login request with user data that contained in LDAP server.
With that said, I'm wondering what is the use case for this feature ?
I mean, if I understand correctly, LDAP usually used for organization with many registered account. In other hand, I imagine one instance of Shiori usually used by only one or two people, which make the existing database is enough for managing account's data.
Feel free to correct me if I'm wrong.
Thank you !
@ynsta commented on GitHub (Aug 22, 2019):
Hello,
The use case is to have some people in my organization that can edit the bookmarks in a group (owner) and all other ones connect as visitor. The main use case is to permits manager to provide all usefull links for new employee in a central place.
But I also plan to have other instances to share some interesting learning materials, blogs, ... inside a team, where all users of this team will be owner.
And by using ldap auth it will permits :
It is simple to implement in go, I already done that in other apps, to authenticate a user the flow is :
Note that the flow is organized to always perform the same number of search and bind operations to prevent user guessing by timing attacks.
I plan to have some time this week end to do it. If not merged I'll start on your branch and will rebase when your branch will be merged in master.
By the way thank you for you project, I find it very interesting and might be interested to contribute to some other parts in my free time.
Regards,
@ynsta commented on GitHub (Sep 6, 2019):
Hello,
I made a PR on this subject.
I also added a Dockerfile.
I made some unit test on the config part but not yet on the LDAP part, I only made manual integration tests.
If I have some more time I'll add some automated tests.
Regards,
@RadhiFadlillah commented on GitHub (Sep 7, 2019):
@ynsta thanks!
Sorry for slow response. I just got married last week, so I haven't worked on my PC for last week. I will review it ASAP.
@ynsta commented on GitHub (Sep 7, 2019):
Hello,
You're welcome.
Dont' worry there is no hurry for the review and congratulation for your wedding.
Regards,
@ynsta commented on GitHub (May 16, 2020):
Hello,
I made a new PR #249 without the config part, no all LDAP configuration are given with environment vars.
You could reject the older one #149.
Regards,
@fmartingr commented on GitHub (Feb 5, 2022):
@clach04 commented on GitHub (Jul 13, 2022):
ldap support would be neat, could be used with https://github.com/nitnelave/lldap/ or OpenLDAP, etc.
@fmartingr commented on GitHub (Oct 7, 2022):
After further consideration, I'm moving this to a discussion to allow conversation to move on, but there are a lot of things that currently need fixing or a rework to tackle something like LDAP at the moment. Maybe in the future where the auth is more robust and the database engines are refactored we could take a look at this again. Apologies for the delay and a response you were not expecting. Hope we can allow multiple auth engines in the future.