Thanks to Sergey - Tested by him, verified by me against multiple JumpCloud users.
Here is what you need to do to get the LDAP login working.
- Modify the runnerldap.php file in the <PHPRunner directory>\source\classes directory.
Locate the ldap_DomainToDN function and modify it this way:
------------------------------------------------------
function ldap_DomainToDN($aDomain)
{
return "o=INSERTYOURJUMPCLOUDORGIDHERE,dc=jumpcloud,dc=com";
}
------------------------------------------------------
- Insert this code into the After application initialized event:
// customLDAP - set to true if working with non-AD server
$globalSettings["customLDAP"] = true;
// LDAP query to get the current user record.
// Here and below PHPRunner will do the following replacements in the query strings:
// %u - user login name.
// %d - the domain name specified in PHPRunner. E.g. xlinesoft.com
// %e - LDAP-encoded domain name. E.g. DC=xlinesoft,DC=com
// Alternative query: "cn=%u"
$customLDAPSettings["loginFilter"] = "uid=%u";
// LDAP field name that holds the user login name.
$customLDAPSettings["displayNameAttr"] = "cn";
// LDAP query to get the list of groups the user belongs to.
// Alternative query: "(&(objectClass=groupOfNames)(member=cn=%u,%e))"
$customLDAPSettings["groupFilter"] = "(uid=%u)";
// LDAP field name that holds the usergroup name.
$customLDAPSettings["groupNameAttr"] = "cn";
// List of LDAP-server login strings. The application will try these logins in turn until succeed.
$customLDAPSettings["usernames"] = array( "uid=%u,ou=Users,o=INSERTYOURJUMPCLOUDORGIDHERE,dc=jumpcloud,dc=com" );
// The following data is used with Dynamic Permissions only.
// LDAP query to search for users and groups in the server by the part of the name.
// %s will be replaced with the user-entered search string.
$customLDAPSettings["memberFilter"] = "";
// The application will display found users and groups in four columns:
// name, email, displayname and category (user or group)
// Specify which LDAP fields correspond for name, email, displayname and category in user and group objects.
$customLDAPSettings["memberAttrMap"] = array(
"name" => array( "uid", "cn" ),
"email" => array( "email", "emailCustom" ),
"displayname" => array( "cn", "uid"),
"category" => "objectclass"
);
- On the Security screen use the Domain and Server you used:
Domain: jumpcloud.com
Server: ldap.jumpcloud.com