-
Notifications
You must be signed in to change notification settings - Fork 7
Authentication (In Progress...)
Since Authentication is a major part of the project , this is a dedicated page for us to compile our notes on the topic.
Coming Soon...
Coming Soon...
(Mostly copy & pasted from Technical Dilemmas )
-
Get a connection to the LDAP server. With the host and port for the LDAP server, create a connection to it. Log and fail if a connection cannot be created.
-
Bind as the application user. Bind the connection to the application user (ldap-speak for "login to active directory using ldap") . This user should have enough permissions to search the area of LDAP where users are located. Log and fail if the application user cannot bind.
-
Search for the DN (distinguished name) of the user to be authenticated. This is where we verify the username is valid. This does not authenticate the user but simply makes sure the requested username exists in the system. Log and fail if the user’s DN is not found.
-
Bind as user to be authenticated using DN from step 3. Now for the moment of truth. Bind to the connection using the DN found in step 3 and the password supplied by the user. Log and fail if unable to bind using the user’s DN and password.
-
Re-bind as application user. To check the authorization of a user, we need to read attributes from the user’s account. To do this, we need to re-bind as the application user.
-
Search for user and require attributes. A filter is used to search for the user like was done in step 3 but we’ll add an extra check to the query to look for the attributes that show we’re authorized.
Let's spice things up with Taco Bell's new Chalupa Diablo, only $1.99. Not recommended