8000 LDAP Integration · Issue #119 · wekan/wekan · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

LDAP Integration #119

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

Closed
neandrake opened this issue Jan 25, 2015 · 104 comments
Closed

LDAP Integration #119

neandrake opened this issue Jan 25, 2015 · 104 comments

Comments

@neandrake
Copy link

Ability to authenticate users against LDAP rather than users requiring to create accounts.

@mquandalle
Copy link

Is this just an idea, or a feature you plan to use when it gets ready?

@gomex
Copy link
gomex commented Jan 28, 2015

It is a really good feature.

@neandrake
Copy link
Author

This is a feature request. Libreboard would need settings/configuration page to add LDAP authentication. Currently the authentication is against the application database. Having the ability to delegate authentication to LDAP allows for all users in an organization to have immediate access. Rather than requiring each user to register their own account.

@gomex
Copy link
gomex commented Jan 29, 2015

It would be nice if that configuration we can block registration of new account too.

@miketweaver
Copy link

I would certainly use this feature.

@JulianCataldo
Copy link

We use LDAP at our organization for better management, LDAP support is mandatory for any new tool / service :/

@Guybrush333
Copy link

For groups using this tool in conjunction with several other self hosted tools, ldap support is a must. I would be very happy to see this in this formidable project. The sooner the better!

@snolahc
Copy link
snolahc commented Jul 9, 2015

+1024 :)
@mquandalle i'd be up to work on it with you ~week 30 (end of july) :)

@rysiekpl
Copy link
rysiekpl commented Oct 4, 2015

Any news on this? This would be a game-changer.

There seems to be a meteor LDAP accounts plugin available: https://atmospherejs.com/typ/accounts-ldap

Would that be helpful?

If one was to try implementing LDAP in wekan, where one should look first?

@neandrake
Copy link
Author

I had tried browsing the code to see where authentication occurs, but hadn't found anything. I have no idea what Meteor does exactly but I'm assuming that by doing install/build there's some authentication dependency that gets loaded which takes care of it. I would be willing to assist with this but I don't have much of a dedicated effort to setting up a build/test environment, as well as learning Meteor and the wekan codebase.

I took a quick peek at the accounts-ldap package @rysiekpl linked, and some things look a little concerning.

  1. The package claims to be a step above proof-of-concept, to my mind means changes are likely needed upstream in this package.
  2. The example of logging in is listed as "Client Side", and appears to allow specifying raw LDAP dn query. This is a little worrying as it might allow a client to construct probing queries. The LDAP query should only ever be constructed server-side, much like a SQL query.
  3. An item under "Issues + Notes" reads: "... the user/password are sent to the server unencrypted. I still need to figure out a solution for this." - I'm pretty sure this is the reason why an install should be using HTTPS and not plain HTTP. This is how most logins work and why your browser should warn with having password fields on a plaintext connection.

If someone who is familiar with Meteor and how accounts are managed/authenticated I would be willing to assist and provide any insights from my experience with LDAP. Here are some other resources which might be useful:

  1. A different meteor account ldap package: https://github.com/UK-AS-HIVE/meteor-accounts-ldap
  2. A large js library for both client and server features: http://ldapjs.org/client.html
  3. This looks like a very simple library which only aims to provide authentication support: https://github.com/trentm/node-ldapauth

@rysiekpl
Copy link
rysiekpl commented Oct 5, 2015

@neandrake so I am not alone. ;)

  1. The package claims to be a step above proof-of-concept, to my mind means changes are likely needed upstream in this package.

We can always fork.

  1. The example of logging in is listed as "Client Side", and appears to allow specifying raw LDAP dn query. This is a little worrying as it might allow a client to construct probing queries. The LDAP query should only ever be constructed server-side, much like a SQL query.

True.

  1. An item under "Issues + Notes" reads: "... the user/password are sent to the server unencrypted. I still need to figure out a solution for this."

There's no way around it, I guess. "Encrypting" in JS just gives a false sense of security. HTTPS is the way to go, full stop.

@ninja-
Copy link
ninja- commented Oct 5, 2015

IF wekan is Also on meteor, try getting some code from rocket.chat

@anhenghuang
Copy link

you can try this. Change login ways by change this to ldapLogin template. I made it.

@anhenghuang
Copy link

Be careful to put accounts-password package after hive:accounts-ldap

@skx
Copy link
skx commented Jun 8, 2016

@Umi97 - That sounds like a useful pointer. Would it be possible for you to document things more fully, such that the users following the bug could try it out?

Specifically which changes need to be made, and which packages installed.

Once present I assume it will allow logins to work via LDAP credentials, but will it also create new users in the mongodb store?

@ocdtrekkie
Copy link
Contributor

As a point of note, LDAP support for Sandstorm is now available for free: https://sandstorm.io/news/2017-02-06-sandstorm-returning-to-community-roots

@gramakri
Copy link
Contributor

I just made the Cloudron wekan app use LDAP to authenticate internally. If anyone is look for reference code, it's in https://git.cloudron.io/cloudron/accounts-cloudron. You can also see how the accounts package is used to setup wekan in https://git.cloudron.io/cloudron/wekan-app.

When I find more time, I will try to get our code upstreamed.

@xet7
Copy link
Member
xet7 commented Mar 19, 2017

@gramakri

Thanks, pull request very welcome wehen you find more time! :)

Pull requests are much easier for me to test than to figure out what has changed in outside repos.

@xet7
Copy link
Member
xet7 commented Mar 19, 2017

@gramakri

Pull request can be done to Wekan devel branch.

@xet7
Copy link
Member
xet7 commented Apr 4, 2017

I did some cleanup on this issue, to make it easier to implement in future.

@Saruspete
Copy link

Hello,

Would it be possible to have a few lines explaining how to use this ldap modification ? I don't get what modifications / commands I should pass to Meteor and/or where to push the files.

I tried git clone it to packages/ folder, then issue the following (after multiple unsucessful other tries) :

meteor add standard-minifier.js
meteor npm install
meteor build --directory ../wekan-1.39.ldap.build
cp -f fix-download-unicode/cfs_access-point.txt ../wekan-1.39.ldap.build/bundle/programs/server/packages/cfs_access-point.js

So I see some ldapjs packages included, but no trace of vars from wekan-ldap.

Any hint / howto ?

Thanks a lot !

@Saruspete
Copy link

Ok, finally got it working. Should we report the auto-registration / sync issues on wekan-ldap or in wekan ?

8000

@xet7
Copy link
Member
xet7 commented Sep 5, 2018

@Saruspete

Report to wekan-ldap .

@jolentes
Copy link
jolentes commented Sep 7, 2018

I saw that the 4 commands of @Saruspete are included in the Dockerfile already.
What do I have to do to include wekan-ldap in the Docker build process?

  1. Clone wekan into /wekan
  2. Create packages/ folder in /wekan
  3. Clone wekan-ldap to folder <workdir/wekan/packages/wekan-ldap
  4. Source app.env
  5. Run docker-compose build

PS: Docker-compose build failed due to tar error when installing meteor. Had to add install of bsdtar and use it for meteor extraction. Git clone with git:// protocol also failed.

@Saruspete
Copy link

I'm no fan of any automated tool that embed its own filesystem, so I took the commands from the dockerfile, and replayed some modifications from https://github.com/wekan/wekan/pull/1826/files after learning a bit about meteor.

A simplified script of mine would be :

set -o nounset
set -o noclobber
typeset PKGVERS_WEKAN='v1.43'

typeset MYPATH="$(pwd -P)"
typeset DST_BUILD="$MYPATH/wekan.build"
typeset DST_RUN="$MYPATH/wekan-$PKGVERS_WEKAN"
typeset SRC_BASE="$MYPATH/wekan.src"
typeset SRC_PKGS="$SRC_BASE/packages"

# Download wekan sources (release)
mkdir -p "$SRC_BASE" && cd "$SRC_BASE"
curl -L "https://github.com/wekan/wekan/archive/${PKGVERS_WEKAN}.tar.gz" | tar -xz --strip=1

# Download packages
mkdir -p "$SRC_PKGS" && cd "$SRC_PKGS"
git clone --depth 1 -b master 'https://github.com/wekan/flow-router.git' 'kadira-flow-router'
git clone --depth 1 -b master 'https://github.com/meteor-useraccounts/core.git' 'meteor-useraccounts-core'
sed -i 's/api\.versionsFrom/\/\/api.versionsFrom/' 'meteor-useraccounts-core/package.js'
git clone --depth 1 -b master 'https://github.com/wekan/wekan-ldap.git' 'wekan-ldap'

# Implement LDAP patch (https://github.com/wekan/wekan/pull/1826/files)
cd "$SRC_BASE"
echo 'wekan:wekan-ldap' >> '.meteor/versions'
echo 'yasaricli:slugify@0.0.7' >> '.meteor/versions'
sed -Ee '/es6-promise/a\    "ldapjs": "^1.0.2",' -i package.json

# Do the patch...
patch -p0 <<EOT
diff --git client/components/main/layouts.jade client/components/main/layouts.jade
index b0024b3..b0f7b33 100644
--- client/components/main/layouts.jade
+++ client/components/main/layouts.jade
@@ -18,6 +18,9 @@ template(name="userFormsLayout")
       img(src="{{pathFor '/wekan-logo.png'}}" alt="Wekan")
     section.auth-dialog
       +Template.dynamic(template=content)
+      if isLdap
+         .at-form
+         button#ldap(class='at-btn submit') {{ldapSignInLabel}}
       if isCas
         .at-form
           button#cas(class='at-btn submit' type='submit') {{casSignInLabel}}
diff --git client/components/main/layouts.js client/components/main/layouts.js
index 6d6e616..0bfbc03 100644
--- client/components/main/layouts.js
+++ client/components/main/layouts.js
@@ -40,12 +40,18 @@ Template.userFormsLayout.helpers({
     return t9nTag === curLang;
   },
 
+  isLdap() {
+     return Meteor.settings.public.ldap;
+  },
   isCas() {
     return Meteor.settings.public &&
       Meteor.settings.public.cas &&
       Meteor.settings.public.cas.loginUrl;
   },
 
+  ldapSignInLabel() {
+     return TAPi18n.__('ldapSignIn', {}, T9n.getLan
628C
guage() || 'en');
+  },
   casSignInLabel() {
     return TAPi18n.__('casSignIn', {}, T9n.getLanguage() || 'en');
   },
@@ -64,6 +70,21 @@ Template.userFormsLayout.events({
       }
     });
   },
+  'click button#ldap'() {
+     const username = $('#at-field-username_and_email').val() ||
+           $('#at-field-username').val() ||
+           $('#at-field-email').val();
+     const password = $('#at-field-password').val();
+     const options = {};
+     Meteor.loginWithLDAP(username, password, options, function(err) {
+       if (err){
+         console.log(err);
+       }
+       if (FlowRouter.getRouteName() === 'atSignIn') {
+         FlowRouter.go('/');
+       }
+     });
+   },
 });
 
 Template.defaultLayout.events({
EOT

# Then go-on with compilation
meteor add standard-minifier-js
meteor npm install
meteor build --directory "$DST_BUILD"
cp "$SRC_BASE/fix-download-unicode/cfs_access-point.txt" "$DST_BUILD/programs/server/packages/cfs_access-point.js"
cd "$DST_BUILD/bundle/programs/server"
npm install

# Then deloy and run
cp -r "$DST_BUILD/bundle" "$DST_RUN"
ln -s "$DST_RUN" "$MYPATH/wekan-current"

# Export usual vars, and the settings for ldap
export ROOT_URL="..."
# use settings.json from the snippet given by @maximest-pierre a few comments before.
export METOR_SETTINGS="$(cat $DST_RUN/settings.json)"
node main.js >>"$DST_RUN/wekan.out" 2>>"$DST_RUN/wekan.err" &

@xet7 may I suggest to update the "latest release" tag from github ? That would enable automatic downloads such as https://github.com/wekan/wekan/releases/latest or their API https://api.github.com/repos/wekan/wekan/releases/latest ? Current "latest" is 1.07
Automation seems possible too from https://developer.github.com/v3/repos/releases/#create-a-release

@xet7
Copy link
Member
xet7 commented Sep 8, 2018

@Saruspete

I added newest Wekan release to latest tag.

I will try adding LDAP to Wekan according to your script at your comment above.

@xet7
Copy link
Member
xet7 commented Sep 8, 2018

It seems that I do not yet have time to make changes.

I added wekan/ldap#3 about what is required before integrating LDAP to Wekan.

@xet7
Copy link
Member
xet7 commented Sep 27, 2018

@Akuket has been doing additions to LDAP code of @maximest-pierre .

From @Akuket

Now, i must manage some use cases. Tell me what you think about them :
To manage the connection, I connected to the event 'submit form' of the Template userFormsLayout in the file layouts.js. Inside it :
1 I must check the authentication method allowed for the user :
-> case 1 : The user is in database and can/must login with the LDAP
-> case 2 : The user is in database and can't login with the LDAP
-> case 3 : The user isn't in database (The ldap must be enabled to create and then to connect the user)

2 I must select the authentication method :
IF LDAP :
-> case 1 : The LDAP is enabled
-> case 2 : Not
ELIF DEFAULT :
pass
ELSE (for future authentication methods as needed)
pass

In callback after try to connect by the LDAP :
Can connect -> perfect
Exception caught :
-> case 1 : The user isn't in the LDAP
-> case 2 : The user is in the LDAP but the param ldap in database isn't true (normaly impossible thanks to the verification above)
-> case 3 : The user is in the LDAP but has provided bad credentials

IF EXCEPTION AND LOGIN_FALLBACK (env var) IS TRUE
What cases above I allow to try to connect by the default method ?

From @xet7

If password login is disabled, and LDAP is enabled, requirement for logging in with LDAP is that LDAP user must belong to specific LDAP group that is allowed to use Wekan. In that case, Wekan should get details from LDAP, and create new Wekan user, and log user in.

If login to Wekan is allowed to all LDAP users, and not limited to specific LDAP group, then all LDAP users can login, and Wekan user will be created for them, when they login.

From @Akuket

I have modificated the user model to add a boolean param named ldap. The person who made the code, use it in this code. Instead of that, one could imagine a connection variable that would contain the default authentication method of the user and that would be configurable from the admin panel

In that way, we can seperate local accounts and ldap accounts or others.

From @xet7 to all:

There is currently in progress adding multiple auth methods. There is existing password auth, LDAP (this issue), OAuth2, Auth0 and CAS. Friend auth is not started yet.

For identity providers, there are alternatives like:

Login experience?

How should the login experience be?

Single Login

In single login, it would be best to get id provider logging to all apps at once. Currently there is 2 login steps:

  • id provider login => wekan/rocket.chat/etc login button => now logged in to one app.

It should be:

  • id provider login => logged in to all apps.

Multiple auth enabled

If there are multiple authentication methods enabled in wekan, like for example password / OAuth2 / LDAP, then maybe there would be

  • username and password field
  • selection options what login method to use, for example:
Username or Email Address: [_______ ]
Password: [_______]

(X) Password
(_) LDAP
(_) OAuth2
(_) CAS

[Login]

When new user would be created?

When self-registration is turned off:

  • LDAP/OAuth2/CAS: If there is existing user with that username and password in LDAP/OAuth2/CAS
  • Password: If there is existing user in Wekan that has been created with Wekan REST API (or at Wekan Admin Panel, maybe at future)

And also limiting OAuth2 and others to one domain #1904

Original Requirements

I added some comments.

  1. All LDAP settings done with environment variables like at https://github.com/wekan/wekan-mongodb/blob/master/docker-compose.yml . Wekan does not use plugins, all is in same codebase and features turned on and of with environment variables. No passwords should be visible as plain text in Standalone Wekan Admin Panel, so in near future email settings password will be removed from Admin Panel, so they are not visible to other admins. In general, all settings need to be able to be set using environment variables.

  2. In added LDAP code, check that Standalone LDAP is not enabled when running at Sandstorm. You can check it using for example with code if isSandstorm... as can be seen at https://github.com/wekan/wekan/blob/devel/sandstorm.js

  3. In LDAP environment variable settings, have setting what LDAP field(s) to use for authentication, what human readable name to show in Admin Panel, and have those in some format like for example: "Employee Number:LDAP_employeeid", "Email address:LDAP_email", etc, so it can be defined what fields are visible and editable at Admin Panel / People, for example these: Employee Number, First Name, Last Name, Email, date of creation, date of last connection. Those dates of creation and last connection need to saved. There is limiting Wekan users to one LDAP group, is it enough? Not all these fields exists yet in Wekan.

  4. In Standalone Wekan Admin Panel / People, Administrators of Wekan application should be able to create also local accounts, that are not using LDAP. Local accounts fields also should be defined in environment variables, like at previous requirement 3. It needs checking is defining local accounts fields implemented yet.

  5. Importing and exporting LDAP and local accounts users from csv file. Not started yet I think.

  6. In Wekan Admin Panel, Administrators should be able to manage users : search, disable or enable users, edit user details. Only edit user details is currently available. Does LDAP has some field who is admin?

  7. Immediate syncronization between Wekan and LDAP, in a way that causes least amount of required data transfer and delays, when there is thousands of users. For example, keeps most LDAP data at LDAP, and only have user ID saved and used in Wekan MongoDB. Look at previous LDAP implementations about what would be more most efficient way. There is idea that all user data would be in LDAP, like username/password/avatar/permissions admin,normal,no comments,comment only. Is this possible, or does data need to be saved in Wekan? Also in other auth methods, does that data need to be stored in Wekan MongoDB at all?

  8. For MongoDB database schema changes, add migrations to https://github.com/wekan/wekan/blob/devel/server/migrations.js

Comments please

Everyone, please add comments if there is some use case I did not include yet. You can also help with current issues implementing this with helpful comments, pull requests etc.

@GuiGuiSoft
Copy link

Hello,

My opinion,

When multiple authentication methods are enabled, the dropdown should only list enabled on the wekan instance.

Requirement 3 : Yes I think it is enough to be able to filter on one group. At least for a first implementation.

Requirements 3 /4 : Wekan should get information in LDAP fields and store them to wekan DB. Environment variables should allow Wekan administrators to select which LDAP field match with Wekan fields. Wekan should never try to write in LDAP.

Requirement 5 : Don't think it is important.

Requirement 6/7 : LDAP informations needed for Wekan must be retrieved from LDAP and not editable if LDAP is the selected method for the user. Administrator must be able to change authentication method for one or multiple users.

Regards.

@jolentes
Copy link

Hello,
when multiple auth is enabled the methods should not be named with technical names (e.g. LDAP, OAuth2, ...) but with a logical service name the user can relate to (e.g. "Corporate Directory", "RocketChat", ...).
Non-technical users need to be able to identify the auth method they would like to use.

Requirement 3/4: What is the leading unique user id? How would you handle conflicts on username or email between e.g. LDAP and local accounts?
Wekan should never write to LDAP! I second that.
Instead Wekan should update information from LDAP to local DB for fields defined. Many corporate LDAP implementation force updates to happen on their interface so they only have a single location data entry validation.

Requirement 6: The right to access Wekan via LDAP auth should depend on a LDAP group membership. Once the membership is revoked the user should no longer be able to access Wekan. No need to disable accounts individually for LDAP users.

Best regards

@Saruspete
Copy link

Hello,

The main goal of a central Auth / DB is to have a single central management entry. So most information like group membership, user details (photo, name, email...) are to be stored there, and a flag should be set to limit the ability of the user to modify it locally (eg, cannot modify in wekan db).

  1. usually, the settings are fetched by precedence: 1) configuration file - 2) environment variable - 3) command line argument. Passwords should indeed not be visible (write only) but still available to change in the forms. For security, should passwords be supplied on cmdline, the displayed cmdline should either be cleared, either refuse to start.

  2. Not all fields exists in ldap, and their name might differs depending on the schema used. So it's the admin job to do the correct mapping between db fields and ldap attributes.
    Group filtering might also be handled as a pure ldap query: this leaves all power to admin, while not having to implement it on wekan. eg, specific classMember, special location in the directory, dereference group of groups, etc...

  3. No need for that.

  4. There's no standard flags on ldap users grants. Almost all accesses are granted to groups, and thus members of these groups.

  5. To minimize load on the ldap server, access and grants should be only checked upon new session (like first login, or old session closed then reopened). That would let removed users to keep their access until they close the session, but that shouldn't be a real issue (or generate a timeout, or a ldap sync every 5 to 15 minutes).
    You cannot save wekan data in ldap (it's not its job, nor a secure model) only use it to gather user's data at login. The real business data (cards, comments, stream...) is to be kept in mongodb, at the sole usage of wekan.

Best regards,

xet7 added a commit that referenced this issue Oct 3, 2018
Thanks to maximest-pierre, Akuket and xet.

Related #119
xet7 added a commit that referenced this issue Oct 3, 2018
  Please test and [add info about bugs](#119).

Thanks to maximest-pierre, Akuket and xet7 !

Related #119
@xet7
Copy link
Member
xet7 commented Oct 10, 2018

Wekan v1.53.2 snap+docker included latest IFTTT+LDAP, please test what works, but make sure you have backups. This is very experimental, brand new, and can contain bugs, or not work at all.

Package

https://github.com/wekan/wekan-ldap

Docker

https://github.com/wekan/wekan/blob/edge/Dockerfile

https://github.com/wekan/wekan/blob/edge/docker-compose.yml

Snap

https://github.com/wekan/wekan/blob/edge/snap-src/bin/config

Oops LDAP help missing from snap, should be added later.

https://github.com/wekan/wekan/blob/edge/snap-src/bin/wekan-help

@xet7
Copy link
Member
xet7 commented Oct 10, 2018

Someone, please:

  1. Add comment to this issue that you are helping with LDAP with these a) or b) or both

a) Add Wekan snap help LDAP options as pull request to this file, you see file format at this file:
https://github.com/wekan/wekan/blob/edge/snap-src/bin/wekan-help
All LDAP options can be seen from links in above comment.

b) Add LDAP options to this snap wiki page:
https://github.com/wekan/wekan-snap/wiki/Supported-settings-keys

Thanks!

@Akuket
Copy link
Contributor
Akuket commented Oct 10, 2018

For https://github.com/wekan/wekan/blob/edge/snap-src/bin/wekan-help
If someone wants to complete descriptions and examples missing

echo -e "Ldap Enable."
echo -e "To enable the ldap of Wekan:"
echo -e "\t$ snap set $SNAP_NAME LDAP_ENABLE='true'"
echo -e "\t-Disable the ldap of Wekan:"
echo -e "\t$ snap set $SNAP_NAME LDAP_ENABLE='false'"
echo -e "\n"
echo -e "Ldap Port."
echo -e "The port of the ldap server:"
echo -e "\t$ snap set $SNAP_NAME LDAP_PORT='12345'"
echo -e "\n"
echo -e "Ldap Host."
echo -e "The host server for the LDAP server:"
echo -e "\t$ snap set $SNAP_NAME LDAP_HOST='localhost'"
echo -e "\n"
echo -e "Ldap Base Dn."
echo -e "The base DN for the LDAP Tree:"
echo -e "\t$ snap set $SNAP_NAME LDAP_BASEDN='ou=user,dc=example,dc=org'"
echo -e "\n"
echo -e "Ldap Login Fallback."
echo -e "Fallback on the default authentication method:"
echo -e "\t$ snap set $SNAP_NAME LDAP_LOGIN_FALLBACK='true'"
echo -e "\n"
echo -e "Ldap Reconnect."
echo -e "Reconnect to the server if the connection is lost:"
echo -e "\t$ snap set $SNAP_NAME LDAP_RECONNECT='false'"
echo -e "\n"
echo -e "Ldap Timeout."
echo -e "Overall timeout, in milliseconds:"
echo -e "\t$ snap set $SNAP_NAME LDAP_TIMEOUT='12345'"
echo -e "\n"
echo -e "Ldap Idle Timeout."
echo -e "Specifies the timeout for idle LDAP connections in milliseconds:"
echo -e "\t$ snap set $SNAP_NAME LDAP_IDLE_TIMEOUT='12345'"
echo -e "\n"
echo -e "Ldap Connect Timeout."
echo -e "Connection timeout, in milliseconds:"
echo -e "\t$ snap set $SNAP_NAME LDAP_CONNECT_TIMEOUT='12345'"
echo -e "\n"
echo -e "Ldap Authentication."
echo -e "If the LDAP needs a user account to search:"
echo -e "\t$ snap set $SNAP_NAME LDAP_AUTHENTIFICATION='true'"
echo -e "\n"
echo -e "Ldap Authentication User Dn."
echo -e "The search user Dn:"
echo -e "\t$ snap set $SNAP_NAME LDAP_AUTHENTIFICATION_USERDN='cn=admin,dc=example,dc=org'"
echo -e "\n"
echo -e "Ldap Authentication Password."
echo -e "The password for the search user:"
echo -e "\t$ snap set $SNAP_NAME AUTHENTIFICATION_PASSWORD='admin'"
echo -e "\n"
echo -e "Ldap Log Enabled."
echo -e "Enable logs for the module:"
echo -e "\t$ snap set $SNAP_NAME LDAP_LOG_ENABLED='true'"
echo -e "\n"
echo -e "Ldap Background Sync."
echo -e "If the sync of the users should be done in the background:"
echo -e "\t$ snap set $SNAP_NAME LDAP_BACKGROUND_SYNC='true'"
echo -e "\n"
echo -e "Ldap Background Sync Interval."
echo -e "At which interval does the background task sync in milliseconds:"
echo -e "\t$ snap set $SNAP_NAME LDAP_BACKGROUND_SYNC_INTERVAL='12345'"
echo -e "\n"
echo -e "Ldap Background Sync Keep Existant Users Updated."
echo -e "\t$ snap set $SNAP_NAME LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED='true'"
echo -e "\n"
echo -e "Ldap Background Sync Import New Users."
echo -e "\t$ snap set $SNAP_NAME LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS='true'"
echo -e "\n"
echo -e "Ldap Encryption."
echo -e "Allow LDAPS:"
echo -e "\t$ snap set $SNAP_NAME LDAP_ENCRYPTION='true'"
echo -e "\n"
echo -e "Ldap Ca Cert."
echo -e "The certification for the LDAPS server:"
echo -e "\t$ snap set $SNAP_NAME LDAP_CA_CERT=-----BEGIN CERTIFICATE-----MIIE+zCCA+OgAwIBAgIkAhwR/6TVLmdRY6hHxvUFWc0+Enmu/Hu6cj+G2FIdAgIC...-----END CERTIFICATE-----"
echo -e "\n"
echo -e "Ldap Reject Unauthorized."
echo -e "Reject Unauthorized Certificate:"
echo -e "\t$ snap set $SNAP_NAME LDAP_REJECT_UNAUTHORIZED='true'"
echo -e "\n"
echo -e "Ldap User Search Filter."
echo -e "Optional extra LDAP filters. Don't forget the outmost enclosing parentheses if needed:"
echo -e "\t$ snap set $SNAP_NAME LDAP_USER_SEARCH_FILTER=''"
echo -e "\n"
echo -e "Ldap User Search Scope."
echo -e "Base (search only in the provided DN), one (search only in the provided DN and one level deep), or subtree (search the whole subtree):"
echo -e "\t$ snap set $SNAP_NAME LDAP_USER_SEARCH_SCOPE=one"
echo -e "\n"
echo -e "Ldap User Search Field."
echo -e "Which field is used to find the user:"
echo -e "\t$ snap set $SNAP_NAME LDAP_USER_SEARCH_FIELD='uid'"
echo -e "\n"
echo -e "Ldap Search Page Size."
echo -e "Used for pagination (0=unlimited):"
echo -e "\t$ snap set $SNAP_NAME LDAP_SEARCH_PAGE_SIZE='12345'"
echo -e "\n"
echo -e "Ldap Search Size Limit."
echo -e "The limit number of entries (0=unlimited):"
echo -e "\t$ snap set $SNAP_NAME LDAP_SEARCH_SIZE_LIMIT='12345'"
echo -e "\n"
echo -e "Ldap Group Filter Enable."
echo -e "Enable group filtering:"
echo -e "\t$ snap set $SNAP_NAME LDAP_GROUP_FILTER_ENABLE='true'"
echo -e "\n"
echo -e "Ldap Group Filter ObjectClass."
echo -e "The object class for filtering:"
echo -e "\t$ snap set $SNAP_NAME LDAP_GROUP_FILTER_OBJECTCLASS='group'"
echo -e "\n"
echo -e "Ldap Group Filter Id Attribute."
echo -e "\t$ snap set $SNAP_NAME LDAP_GROUP_FILTER_GROUP_ID_ATTRIBUTE=''"
echo -e "\n"
echo -e "Ldap Group Filter Member Attribute."
echo -e "\t$ snap set $SNAP_NAME LDAP_GROUP_FILTER_GROUP_MEMBER_ATTRIBUTE=''"
echo -e "\n"
echo -e "Ldap Group Filter Member Format."
echo -e "\t$ snap set $SNAP_NAME LDAP_GROUP_FILTER_GROUP_MEMBER_FORMAT=''"
echo -e "\n"
echo -e "Ldap Group Filter Group Name."
echo -e "\t$ snap set $SNAP_NAME LDAP_GROUP_FILTER_GROUP_NAME=''"
echo -e "\n"
echo -e "Ldap Unique Identifier Field."
echo -e "This field is sometimes class GUID (Globally Unique Identifier):"
echo -e "\t$ snap set $SNAP_NAME LDAP_UNIQUE_IDENTIFIER_FIELD=guid"
echo -e "\n"
echo -e "Ldap Utf8 Names Slugify."
echo -e "Convert the username to utf8:"
echo -e "\t$ snap set $SNAP_NAME LDAP_UTF8_NAMES_SLUGIFY='false'"
echo -e "\n"
echo -e "Ldap Username Field."
echo -e "Which field contains the ldap username:"
echo -e "\t$ snap set $SNAP_NAME LDAP_USERNAME_FIELD='username'"
echo -e "\n"
echo -e "Ldap Merge Existing Users."
echo -e "\t$ snap set $SNAP_NAME LDAP_MERGE_EXISTING_USERS='true'"
echo -e "\n"
echo -e "Ldap Sync User Data."
echo -e "Enable synchronization of user data:"
echo -e "\t$ snap set $SNAP_NAME LDAP_SYNC_USER_DATA='true'"
echo -e "\n"
echo -e "Ldap Sync User Data Fieldmap."
echo -e "A field map for the matching:"
echo -e "\t$ snap set $SNAP_NAME LDAP_SYNC_USER_DATA_FIELDMAP={"cn":"name", "mail":"email"}"
echo -e "\n"
echo -e "Ldap Sync Group Roles."
echo -e "\t$ snap set $SNAP_NAME LDAP_SYNC_GROUP_ROLES=''"
echo -e "\n"
echo -e "Ldap Default Domain."
echo -e "The default domain of the ldap it is used to create email if the field is not map correctly with the LDAP_SYNC_USER_DATA_FIELDMAP:"
echo -e "\t$ snap set $SNAP_NAME LDAP_DEFAULT_DOMAIN=''"
echo -e "\n"

xet7 added a commit that referenced this issue Oct 10, 2018
Thanks to Akuket !

Related #119
xet7 added a commit that referenced this issue Oct 10, 2018
Thanks to GitHub user Akuket for contributions.

Related #119
@xet7
Copy link
Member
xet7 commented Oct 10, 2018

Thanks @Akuket , added to Wekan.

Someone could add this remaining one:

b) Add LDAP options to this snap wiki page:
https://github.com/wekan/wekan-snap/wiki/Supported-settings-keys

@xet7 xet7 closed this as completed Oct 11, 2018
@maximeconnolly
Copy link

I can look into adding those information on the wiki. I am supposed to deploy the update to our internal Wekan today or tomorrow.

@xet7
Copy link
Member
xet7 commented Oct 11, 2018

@maximest-pierre

LDAP is at Wekan Edge Docker:
https://github.com/wekan/wekan/blob/edge/docker-compose.yml

Snap is still broken, because I could not get MongoDB working correctly. I will add info to Edge ChangeLog when it works.

@xet7
Copy link
Member
xet7 commented Oct 17, 2018

LDAP login works now by using this docker-compose.yml file:
https://raw.githubusercontent.com/wekan/wekan/edge/docker-compose.yml

  • adding ROOT_URL, LDAP settings etc to that file.

Using this docker-compose:
https://docs.docker.com/compose/install/

With this command:
docker-compose up -d --no-build

Bounty participants: Please check your email and accept bounty payment.

@xet7
Copy link
Member
xet7 commented Oct 17, 2018

Wiki page for LDAP: https://github.com/wekan/wekan/wiki/LDAP

@Vnimos
Copy link
Vnimos commented Oct 24, 2018

@xet7

LDAP_USER_SEARCH_SCOPE : Base (search only in the provided DN), one (search only in the provided DN and one level deep), or subtree (search the whole subtree)

no matter what the value is set,the error "'Base/one/subtree' is an invalid search scope" will return for logs

@Akuket
Copy link
Contributor
Akuket commented Oct 24, 2018

There is an error, it's base or one or sub.

< BC77 /include-fragment>
xet7 added a commit that referenced this issue Oct 24, 2018
…oes not affect change UI yet. Thanks to xet7 !

- Fix LDAP User Search Scope. Thanks to Vnimos and Akuket ! Related #119
- Fix Save Admin Panel STMP password. Thanks to saurabharch and xet7 ! Closes #1856
xet7 added a commit that referenced this issue Oct 24, 2018
- Custom Product Name in Admin Panel / Layout. In Progress, setting does not affect change UI yet. Thanks to xet7.

and fixes the following bugs:

- Fix LDAP User Search Scope. Thanks to Vnimos and Akuket. Related #119
- Fix Save Admin Panel STMP password. Thanks to saurabharch and xet7. Closes #1856
@xet7
Copy link
Member
xet7 commented Oct 24, 2018

@Vnimos

scope is now fixed in newest Wekan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0