RTC and GIT integration using Nodejs: authentication LDAP
Hi all,
please! Someone has been able to set up correctly the RTC integration with GIT using the new hooks based on Nodejs?
I need help!
I've RTC 6.0.2 on RHEL 6.2 and I've followed all wiki pages and official guides of RTC for 6.0.2.
My properties configuration of LDAP authorization for NodeJS doesn't work.
My RTC configuration for LDAP instead works always fine (since many years).
Nodejs starts well.
I would like to know if anyone has succed in it and get some advice from him.
Many thanks in advance
Alberto
Accepted answer
Hi Alberto
Yes we have got it working with different LDAP servers. What is your LDAP server? Microsoft AD?
Please share your ldap config from config.json.
Also, how are you testing if the LDAP configuration is successful?
When you access the Nodejs link and authenticate, if the login is successful a blank page comes up and if not the Login prompt re-appears.
Regards
Shubjit
Comments
showing 5 of 11
show 6 more comments
One other answer
{
"_Comment": "The is an example configuration file used by the Node application. This file is in JSON format and every property (say, X) has a corresponding description property (X-Description), which provides a simple explanation about the property itself. To start using this file, fill in the required fields and delete this property from the file.",
"Version": 1,
"Version-Description": "Version number of this config file",
"Server-Use-HTTPS": false,
"Server-Use-HTTPS-Description": "Boolean value that determines whether to use secure socket layer for HTTP communication",
"Server-Key-File-Path": "",
"Server-Key-File-Path-Description": "Absolute Path on the server to the server key file; MUST when HTTPS protocol is to be used",
"Server-Certificate-File-Path": "",
"Server-Certificate-File-Path-Description": "Absolute Path on the server to the certificate file; MUST when HTTPS protocol is to be used",
"Server-Setup-HTTP-Redirector": true,
"Server-Setup-HTTP-Redirector-Description": "Boolean value that determines if an HTTP listener has to be setup; this listener simply diverts the incoming requests to same endpoint over HTTPS",
"Server-Port": 80,
"Server-Port-Description": "Integer value that defines the port on which the server has to listen to",
"Server-Socket-Timeout": 180000,
"Server-Socket-Timeout-Description": "Timeout (in milliseconds) to be set for socket connection. Default is 3 minutes. Set to 0 for indefinite.",
"Git-Executable-Path": "git",
"Git-Executable-Path-Description": "Absolute path to the git executable on the server; provide the absolute path, if 'git' is not found on the PATH environment variable",
"Git-Repositories-Root-Dir": "/dati/git/almsvil/",
"Git-Repositories-Root-Dir-Description": "Absolute path to the directory on the server where the Git repositories are located",
"Git-Use-NodeGit": true,
"Git-Use-NodeGit-Description": "Boolean Value that determines if nodegit module is to be used for operating on Git repositories. Setting to true implies that nodegit module is installed and is available to this server.",
"Auth-Profiles": {
"Ldap-1": {
"type": "LDAP",
"url": "ldap://rete.test:389",
"bindDn": "CN=USR_LDAP,OU=Service Account,DC=rete,DC=test",
"bindCredentials": "LDAPpassword",
"searchBase": "DC=rete,DC=test",
"searchFilter": "(uid={{sAMAccountName}})",
"searchAttributes": null
},
"Basic-1": {
"type": "BASIC",
"method": "GET"
}
},
"Auth-Profiles-Description": "Set of authentication profiles available. It is a map - with the profile name itself being the key, and the properties being the value. The value object must contain 'type' property as one of 'LDAP', 'BASIC' (Please note that it is case-sensitive). In case of LDAP authentication, the value object should have properties pertaining LDAP authentication. Some basic properties are listed here. However, you can add others if needed. The list of properties is documented here: https://github.com/vesse/node-ldapauth-fork#ldapauth-config-options. In case of BASIC authentication, the value object should have 'url' and 'method' properties against which the HTTP Basic authentication is done. If 'method' property is absent, 'GET' is assumed.",
"Git-URL-Prefixes": {
"/git": {
"authProfile": "Ldap-1"
}
},
"Git-URL-Prefixes-Description": "Set of URL prefixes to be considered for the Git request. It is a map - with the prefix itself being the key, and the properties being the value. Right now the only supported property is 'authProfile' and its value can be one of the profile names in 'Auth-Profiles' configuration property. If 'authProfile' property is defined, the corresponding auth profile is applied; otherwise, no authentication is performed. In this case for example, the auth profile 'Ldap-1' will be applied for a Git repository having a url http://gitserver:9999/git/MyRepo.git since /git is the prefix to the git repository MyRepo.git"
}