QueueMetrics > Scripting QueueMetrics
Using LDAP for AUTH
framirez:
Thanks for the reply. Now I got past that hurdle and am encountered with another issue.
In the file: /WEB-INF/configuration.properties we need to make an entry for it to call the xmlrpc_auth_server.php file.
We had to set it up to run through apache as it would not work in tomcat.
So our entry is:
default.authRpcServerUrl=http://<servername>/apache2-default/xmlrpc_auth_server.php
When we try to login we get the following:
Alert:
Problems contacting the XML-RPC auth source. - http://<servername>/apache2-default/xmlrpc_auth_server.php
If I use the url http://<servername>/apache2-default/xmlrpc_auth_server.php I get the same results you got:
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>105</int></value>
</member>
<member>
<name>faultString</name>
<value><string>XML error: Invalid document end at line 1</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>
Can you provide any assistance with this part? Is there an easier way of doing this?
marcos:
I can rise some idea useful to debug your setup.
1. Are you sure that QM is really calling your script? Do you see on the apache log the call?
2. If yes, did you tried to write to a temporary file the parameters you received in your script when QM calls it?
3. Did you try to raise the debug on PHP XML_RPC_Server? (Please refers to http://pear.php.net/package/XML_RPC/docs/latest/XML_RPC/XML_RPC_Server.html)
Regards,
Marco Signorini.
John Mizuno:
This is really old thread but I could not find helpful info on how to implement ldap login for QM, and this thread is not giving an answer so I decided to reply with solution.
1. Install web server (apache or nginx) and php. Make sure phpinfo() will display properly on your browser.
2. Install php-ldap (yum install php-ldap for CentOS).
3. Install pear (yum install php-pear for CentOS).
4. Install XML_RPC (wget http://download.pear.php.net/package/XML_RPC-1.5.5.tgz) *Don't use XML_RPC2, it won't work.
Extract tgz and locate XML directory under web root. (My web root is /var/www/html so you will see something like /var/www/html/XML/RPC/Server.php)
5. Copy xmlrpc_auth_server.php to your web root. (cp WEB-INF/mysql-utils/xml-rpc/xmlrpc_auth_server.php /var/www/html/)
6. Add default.authRpcServerUrl into QM configuration.properties file.
default.authRpcServerUrl=http://127.0.0.1/xmlrpc_auth_server.php
7. Edit xmlrpc_auth_server.php
line 19;
require_once '/var/www/html/XML/RPC/Server.php';
line 53-69;
function doAuth_ldap( $serviceId, $username, $password ) {
global $RESPONSE_AUTH, $RESPONSE_SUCC, $RESPONSE_DELE, $RESPONSE_FORB;
global $R_STATUS, $R_REALNAME, $R_EMAIL, $R_CLASS, $R_KEYS;
// set the following parameters according to your environment:
$_ldap_hosts = "your.ldap.server"; // Edit this
$_ldap_port = 389;
//$_ldap_bdn = "uid=$username,ou=Users,dc=mycompany,dc=com";
$_ldap_bdn = "uid=$username,ou=xxx,dc=yyyy,dc=com"; // Edit this
$ds = ldap_connect($_ldap_hosts, $_ldap_port) or die("Could not connect to $ldaphost");
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); //Add this
if (ldap_bind($ds, $_ldap_bdn, $password))
$R_STATUS = $RESPONSE_SUCC;
else
$R_STATUS = $RESPONSE_DELE;
}
line 88;
doAuth_ldap( $p0, $p1, $p2 ); // change to doAuth_ldap
8. Edit /var/www/html/XML/RPC/Server.php
Line 29;
require_once '/var/www/html/XML/RPC.php';
9. Give exec permission.
chmod 755 -Rf /var/www/html/XML
10. Now try logging on with ldap user&password. Note: Once ldap is enabled local users are no longer available in my case.. so to make first ldap user admin, I needed to edit mysql table directory.
Mausabot:
Hi there,
recently we integrate it. You can find our tutorial here
https://www.queuemetrics.com/blog/2021/10/20/Active-Directory-Domain-Integration/
Navigation
[0] Message Index
[*] Previous page
Go to full version