Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

Include support for LDAP authentication to web interface - #14

Closed
twinfield (tylerwinfield) wants to merge 8 commits into
jamf:masterfrom
tylerwinfield:master
Closed

twinfield (tylerwinfield) wants to merge 8 commits into
jamf:masterfrom
tylerwinfield:master

Conversation

@tylerwinfield

Copy link
Copy Markdown

Adds LDAP authentication support to the NetSUS web appliance. A section to configure the LDAP connectivity has been added to the Settings screen of the appliance. All data required for LDAP authentication are stored in the WebadminConfig object.

image
image

tylerwinfield added 8 commits January 28, 2014 14:20
add login support for LDAP credentials.  stores logged on username in session for correct display in web interface.
return the username value from the session data for the current web user if has been set
included lookup functions for administrators from an LDAP directory using the sAMAccountName and UserPrincipalName directory attributes.
included settings page to configure LDAP connectivity
Included support for LDAP connectivity settings and administrative users/groups
Included link and image for LDAP settings
Included link image for LDAP settings
Removed unnecessary code

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

not necessary, since ldap_unbind equals ldap_connect and just gives warnings :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

you are correct, ldap_close is an alias of ldap_unbind; the call is redundant the line for ldap_close($conn) can be removed

@jamf

Copy link
Copy Markdown
Collaborator

I believe there is a way we could accomplish the same thing using the username and password of the user logging in to attempt the bind. If we were able to go this route there would not be a need for storing the credentials in clear text to initiate the bind. Have you tried that work flow?

@tylerwinfield

Copy link
Copy Markdown
Author

I have not tried that, but you are correct; that workflow should work. I'll give that a try.

@jamf

Copy link
Copy Markdown
Collaborator

If you can make that work please resubmit the pull request. I will close this out for now. Thanks.

ChrOst (ChrOst) added a commit to ChrOst/NetSUS that referenced this pull request Nov 19, 2014
Thanks to Tylor Winfield! I adopted the configure section layout
and some some other little things from jamf#14

This implementation doesn't need an proxy user for authentication.
Things you have to setup are stated in LDAP settings
- searchdn
- domainname
- admin groups. yes. only groups. (but nested is allowed ofc)

added files:
images/settings/ldap.png:
as provided by Tylor Winfield - came with jss some versions ago I guess

inc/auth.activedirectory.php:
an authentication class for activedirectory. may works with other ldap's too.

ldap.php:
settings page, slightly changed but mainly from Tylor Winfield

accounts.php:
ldap users don't have to enter "webadmins" password to change it.
(they even can't enter it anyway now).
webadmin itself still has to enter the current password to change it.

inc/config.php:
adding ldap functions for storing and retrieving out of the config.
get and set filter for their configureable variables

inc/functions.php:
we return the correct user now. since it alway return the webadmin's name
for active directory this wouldn't have been correct.
The current name is stored inside it's session

index.php:
store the username which authenticates within the session.
add active directory as "fallback" authentication.

settings.php:
see Tyler Winfields commit - add LDAP settings.

If you find any bug, please report it or pull request :)
@ChrOst

Copy link
Copy Markdown

All commits I made to my master include those things you required - you're free to merge it (or not).

Maybe some more will come too, depending on my workload ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants