Skip to content
This repository has been archived by the owner on Jul 10, 2022. It is now read-only.

Provide LDAP authentication #28

Closed
mrusme opened this issue Dec 13, 2014 · 15 comments
Closed

Provide LDAP authentication #28

mrusme opened this issue Dec 13, 2014 · 15 comments

Comments

@mrusme
Copy link
Member

mrusme commented Dec 13, 2014

Paperwork needs to be configurable to allow admins to integrate it with their existing LDAP/AD infrastructure. Therefor, the user authentication back-end needs to be adapted to use some sort of Laravel-Ldap extension.

@mrusme mrusme modified the milestone: Paperwork 1.0 Jan 6, 2015
@irl
Copy link

irl commented Jan 25, 2015

Hi, just wanted to register interest in this enhancement. I'd like to deploy this for our hackerspace members and would be happy to help with testing.

@mrusme
Copy link
Member Author

mrusme commented Jan 25, 2015

@irl sounds great! We'll get back, as soon as someone started implementing this. :-)

@mrusme mrusme added this to the Paperwork 2.0 milestone Feb 8, 2015
@KiPiCoOl
Copy link

👍

@ghost
Copy link

ghost commented Feb 19, 2015

Anybody tried this package? https://github.com/dsdevbe/ldap-connector

@KiPiCoOl
Copy link

i try it
i configure ad access, i delete

'Illuminate\Auth\AuthServiceProvider',

and i put

'Dsdevbe\LdapConnector\LdapConnectorServiceProvider',

but where make this part of change https://github.com/dsdevbe/ldap-connector#usage ?

I can bypass "sign up" with ldap connector ?

@ghost
Copy link

ghost commented Feb 20, 2015

What do you mean by "bypass sign up"? Your ldap server must provide logins and passwords as I understand and no sign up must be present(you hide it by removing).

@KiPiCoOl
Copy link

i want all users in LDAP can directly login (sign in) without sign up (if possible)

@ghost
Copy link

ghost commented Feb 20, 2015

Just go into the code and remove the signup button. We will provide better support for this in future.

In particular, you want to remove lines 31-35 of this file to remove the button: https://github.com/twostairs/paperwork/blob/master/frontend/app/views/user/login.blade.php

@KiPiCoOl
Copy link

Ok, thx :)
But for the moment, i don't hope support to configure ldap connector ?
I must wait the next version ?

@ghost
Copy link

ghost commented Feb 20, 2015

It should work out of the box by overriding the default auth, you just need to configure it as in their readme. Anyway this is not top priority right now.

@KiPiCoOl
Copy link

Ok, i understand.

if someone has some free time to help me :)

I install it (maybe not correctly) and it doesn't work oob.

Users must sign up even i configure ldap connector ?

how i can see (and enable) logs when i login ?
I must sign up with an email address, but with ldap connector, username is my login (not may email), no ?

Thx

@mrusme
Copy link
Member Author

mrusme commented Feb 21, 2015

Signup can be disabled through configuration. In app/config/paperwork.php set 'registration' => false. Please don't hack the code. :-)

//Edit: @Renofr, right now we don't provide LDAP authentication. That is why this issue is for. And of course, users won't need to sign up as soon as a proper LDAP implementation was built.

@snowbldr
Copy link
Contributor

I'm currently working on this. I gave ldap-connector a shot but it was having some problems that I could not figure out. I am now creating a userprovider that extends the eloquent user provider and does authentication checks using adldap. This makes it so that we can still use the same model that we have, but still be able to use ldap for authentication. I've got it most of the way done, but there's a few bits and pieces to finish up.

I still need to implement automatic registration with ldap, so that if a user successfully authenticates against ldap, but is a new user, it will create a new user and do the registration process.

After that, It should be more or less functional.

I propose that while ldap authentication is enabled, registration is automatically disabled, as I don't believe it would be reasonable to allow the paperwork application to create new users in the ldap directory. Although, this would be technically possible if paperwork was supplied with a domain administrator account. Input on this subject would be appreciated.

As a side note, currently we are using the user's email as the username, but this causes problems due to users in ldap not being emails. For now, I've simply removed the restriction that the username has to be an email on login, but will leave it in place for registration. This makes it so that the normal registration process will enforce the email, but we will be able to manually create users in code with whatever username we need. If there's a better way to handle this, I'd be happy to convert it.

My most recent changes are here: https://github.com/narcolepticsnowman/paperwork/tree/implement_ldap_auth

This was referenced Mar 17, 2015
@ghost
Copy link

ghost commented Mar 22, 2015

#297 needs testing

@ghost
Copy link

ghost commented Apr 29, 2015

Done in #292 #297 and #346 . Please file new issues on this topic as they appear.

@ghost ghost closed this as completed Apr 29, 2015
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants