Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated LDAP Integration #738

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gentoo9ball
Copy link

I've taken the older LDAP Pull Request and merged it with the latest code. It is working great in my environment.

From the old code, I've found that the popular kpeiruza/hashtopolis docker image uses the User.class constructor with 16 arguments, the extra argument breaks this. So I've reworked the constructor flow to use either 16 or 17 arguments.

Also, I've made the BaseDN and UID config settings, so this can work in different environments. Some LDAP Servers use CN by default, others use UID. Setting these variables right now has to occur manually via the database.

A couple nice things that I can work on in the future, would be:

  1. A way to specify TLS Certs for LDAPS
  2. A configuration interface to set LDAP Configuration settings (ldap_server, ldap_basedn, ldap_uid)
  3. A way to sync users from LDAP given an admin user

dru1d-foofus and others added 5 commits August 21, 2020 17:02
…a/hashtopolis's adduser and other integrations that may exist that use only 16 arguments to construct user
…ration. These are required, however, there is also a more specific Description to assist the users
@gentoo9ball
Copy link
Author

Still using this on our side, working well

Copy link
Member

@s3inlc s3inlc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request, I added some small comments regarding some code parts, but looking good overall.
One thing which is missing, is the addition to the update script which is used to update existing installations which pulled new changes from the repository. These would break with the current implementation. The changes needed to be done on the database should be added in src/install/updates/update_v0.12.x_v0.x.x.php.

@zyronix will do a test on our side to verify the functionality and then report back.

@@ -19,14 +20,44 @@ class User extends AbstractModel {
private $otp2;
private $otp3;
private $otp4;

function __construct($userId, $username, $email, $passwordHash, $passwordSalt, $isValid, $isComputedPassword, $lastLoginDate, $registeredSince, $sessionLifetime, $rightGroupId, $yubikey, $otp1, $otp2, $otp3, $otp4) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I understand what the idea is behind having two constructors, this would break the way how the Models are generated.
In src/dba/models/generator.php there are all models defined in arrays, which would be the way to go to add another column for a table. After this, just all new User( calls would need to be searched to adjust the arguments.

@@ -0,0 +1,2 @@
Order deny,allow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this file slip in by accident? As this would block installation procedure to start after placing the files. The block htaccess file should be added automatically by the installation procedure after it is completed.

@zyronix zyronix self-assigned this May 20, 2022
@zyronix zyronix added the new feature New feature to be added label May 20, 2022
@zyronix zyronix linked an issue May 20, 2022 that may be closed by this pull request
@Prototype82
Copy link

Is there any progress on this topic? LDAP authentication would be a great feature

@zyronix
Copy link
Member

zyronix commented Dec 11, 2022

No progress on this has been made, but in the background we have been working on a new frontend and backend. This will come with the switch to oAuth for authentication, which would make it possible to use all kinds of authentication servers like LDAP or AD based servers for authentication.

@gary-sixgen
Copy link

Any status update on this? Super useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature to be added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LDAP Authentication
7 participants