{"id":2617,"date":"2015-10-26T15:20:40","date_gmt":"2015-10-26T15:20:40","guid":{"rendered":"https:\/\/twproject.com\/support\/?page_id=2617"},"modified":"2021-08-30T10:28:50","modified_gmt":"2021-08-30T10:28:50","slug":"ldap-active-directory","status":"publish","type":"page","link":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/","title":{"rendered":"LDAP\/Active Directory"},"content":{"rendered":"<p>Native LDAP integration allows several operations:<\/p>\n<p>1) user import \u201cby hand\u201d: there is a procedure for importing users from an LDAP server (including Microsoft Active Directory \u00a9), which may be used even if authentication through LDAP is not enabled; it is of course necessary if it is enabled, because the users in Twproject must exist in all cases.<\/p>\n<p>2) user import from a scheduled job:<\/p>\n<p>3) authentication from the LDAP server<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2620\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1083.jpg\" alt=\"screen1083\" width=\"1236\" height=\"69\" \/><\/p>\n<p>Since version 4.5, you can now enable LDAP with fallback to Twproject internal authentication in case of LDAP login failure.<\/p>\n<h2>LDAP basic parameters<\/h2>\n<p>First of all, you must setup the LDAP basic parameters; go to \u201cLdap integration\u201d from the administration page:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2621\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1084.jpg\" alt=\"screen1084\" width=\"1240\" height=\"521\" \/><\/p>\n<p>By checking LDAP radio button you will have to configure LDAP parameters.<\/p>\n<p>Note: LDAP is a language with several dialects. Hence we provide out of the box some variants on the language, in different configuration files. The variants provided are:<\/p>\n<p>\u00b7<strong> Active Directory (\u00a9Microsoft Corp.)<\/strong>:<br \/>\nin the file[web app root]\/commons\/settings\/ldap\/activeDirectory.properties<\/p>\n<p>\u00b7 <strong>Apache Directory Server<\/strong>:<br \/>\nin the file[web app root]\/commons\/settings\/ldap\/apacheDirectory.properties<\/p>\n<p>\u00b7 <strong>OpenLdap<\/strong>:<br \/>\nin the file[web app root]\/commons\/settings\/ldap\/openLdap.properties<\/p>\n<p>One may add properties files here, and they will be available in the global configuration combo.<\/p>\n<p>Notice also that both \u201c1.0\u201d and \u201c2.0\u201d LDAP queries should work.<\/p>\n<p>A nice feature is:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/02\/clip_image0073.jpg\" alt=\"\" width=\"665\" height=\"30\" border=\"0\" \/><\/p>\n<p>That allows Twproject to create LDAP validated user at its first login.<\/p>\n<p>Example configuration with Active Directory:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/02\/clip_image0094.jpg\" alt=\"\" width=\"374\" height=\"351\" border=\"0\" \/><\/p>\n<p>Example configuration with Apache Directory:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/02\/clip_image0113.jpg\" alt=\"\" width=\"380\" height=\"324\" border=\"0\" \/><\/p>\n<p>Example configuration with OpenLDAP:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/02\/clip_image0131.jpg\" alt=\"\" width=\"471\" height=\"195\" border=\"0\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-2622 alignright\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1085.jpg\" alt=\"screen1085\" width=\"367\" height=\"113\" \/><br \/>\nOnce you have inserted values you can check the configuration by using the test button.<\/p>\n<p>In order to enable authentication you MUST have users created in Twproject. You may proceed by importing them manually or by scheduling an import.<\/p>\n<h2>Importing users by hand<\/h2>\n<p>There is a comfortable procedure for importing users by hand, which also lets you configure the imported users rights from the point of view of Twproject: if you\u2019ve set up the LDAP parameters, then go to admin page an follow \u201cLDAP integration &#8211; import users\u201d.<\/p>\n<p>Here you can select the CN groups in which to search users, and once found some, pick those you want to import.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5077\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/ldap-import-user.png\" alt=\"\" width=\"1599\" height=\"901\" \/><\/p>\n<p>For every picked user, you can decide whether to make it a Twproject administrator, or set on her\/him other area-global roles.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2624\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1087.jpg\" alt=\"screen1087\" width=\"1528\" height=\"326\" \/><\/p>\n<p>LDAP roles are not mapped into Twproject as the business logic behind them is quite different; customized behavior can be developed on demand.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2625\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1088.jpg\" alt=\"screen1088\" width=\"1376\" height=\"375\" \/><\/p>\n<p>Users will be put on the area you pick.<\/p>\n<p><b>\u201cupdate existing users\u201d<\/b> will update non security related data on existing users.<\/p>\n<p><b>\u201cset password for import users\u201d<\/b>: this is the Twproject password that will be set on imported users, in case LDAP authentication is off. If leaved empty, a password equal to the login name will be set.<\/p>\n<p>Consider that complex LDAP structure could be &#8220;complex&#8221; to filter, you could use a LDAP explorer tools to navigate the structure and identify the wanted users.<br \/>\nHere some tools:<br \/>\na free generic one: \u00a0<a href=\"http:\/\/jxplorer.org\/\">http:\/\/jxplorer.org\/<\/a><br \/>\nor for Active Directory:\u00a0<a href=\"http:\/\/technet.microsoft.com\/en-us\/sysinternals\/bb963907.aspx\">http:\/\/technet.microsoft.com\/en-us\/sysinternals\/bb963907.aspx<br \/>\n<\/a><span style=\"line-height: 1.5;\">There are several resources available online for helping with filter syntax.<br \/>\n<\/span>Here some starting points:<br \/>\n<a href=\"http:\/\/www.google.com\/support\/enterprise\/static\/postini\/docs\/admin\/en\/dss_admin\/prep_ldap.html\">http:\/\/www.google.com\/support\/enterprise\/static\/postini\/docs\/admin\/en\/dss_admin\/prep_ldap.html<br \/>\n<\/a><a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa746475(v=vs.85).aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/aa746475(v=vs.85).aspx<\/a><\/p>\n<h2>Additional properties<\/h2>\n<p>The eventually mapped additional properties are listed in a ldap.properties file, in<\/p>\n<p>[web app root]\/commons\/settings\/ldap\/[the chosen one].properties<\/p>\n<p>The sample ones mapped are:<\/p>\n<p>PHONE=telephoneNumber<\/p>\n<p>COUNTRY=co<\/p>\n<p>STATE=st<\/p>\n<p>CITY=l<\/p>\n<p>ZIP=postalCode<\/p>\n<p>MOBILE=mobile<\/p>\n<p>You can add your own, compliant with your LDAP dialect.<\/p>\n<h2>Scheduling user import<\/h2>\n<p>From LDAP user import click on button &#8220;see\/add scheduled import&#8221;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2626\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1089.jpg\" alt=\"screen1089\" width=\"387\" height=\"142\" \/><\/p>\n<p>Click on \u201ccreate schedule\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5079\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/import-ldap-job.png\" alt=\"\" width=\"1600\" height=\"598\" \/><\/p>\n<p>First box contains data about job scheduling the right box data about your LDAP.<\/p>\n<p>default pwd: this is the Twproject password that will be set on imported users, in case LDAP authentication is off. If leaved empty, a password equal to the login name will be set.<\/p>\n<p>Change the repetition on your needs<\/p>\n<p>&nbsp;<\/p>\n<h2><i>HELP! I can\u2019t login into Twproject anymore!<\/i><\/h2>\n<p>1) You may have enabled LDAP authentication, but didn\u2019t import any user. Proceed as follows:<\/p>\n<p>2) stop Twproject<\/p>\n<p>3) go to [your root]webapps\/ROOT\/commons\/settings, open the file global.properties, remove the property<br \/>\nAUTHENTICATION_TYPE=ENABLE_LDAP_AUTHENTICATION<\/p>\n<p>4) restart Twproject<\/p>\n<p><i>We login with our LDAP accounts, but nobody is administrator any more.<\/i><\/p>\n<p>If you imported the users \u201cby hand\u201d, not with the scheduled job, you should have selected the \u201cadministrator\u201d checkbox for at least one user. To fix this, you must temporarily disable LDAP authentication, as in the FAQ above, enter with the original Twproject administrator login, enable the administrator checkbox on some users, and then re-enable LDAP authentication.<\/p>\n<h2><i>HELP! I\u2019ve setup LDAP parameters and successfully imported the users, but they can\u2019t login!<\/i><\/h2>\n<p>You may have forgot to set LDAP as authentication modality: log in with the original Twproject administrator login, go to tools -&gt; administration -&gt; global settings, select the LDAP authentication radio:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2620\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1083.jpg\" alt=\"screen1083\" width=\"1236\" height=\"69\" \/><\/p>\n<p>and then save.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Native LDAP integration allows several operations: 1) user import \u201cby hand\u201d: there is a procedure for importing users from an LDAP server (including Microsoft Active Directory \u00a9), which may be used even if authentication through LDAP is not enabled; it is of course necessary if it is enabled, because the users in Twproject must exist [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2383,"menu_order":26,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-2617","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>LDAP\/Active Directory | Twproject support<\/title>\n<meta name=\"description\" content=\"Native LDAP integration allows several operations: 1) user import \u201cby hand\u201d: there is a procedure for importing users from an LDAP server (including\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LDAP\/Active Directory | Twproject support\" \/>\n<meta property=\"og:description\" content=\"Native LDAP integration allows several operations: 1) user import \u201cby hand\u201d: there is a procedure for importing users from an LDAP server (including\" \/>\n<meta property=\"og:url\" content=\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/\" \/>\n<meta property=\"og:site_name\" content=\"Twproject support\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/twproject\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-30T10:28:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1083.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1236\" \/>\n\t<meta property=\"og:image:height\" content=\"69\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/\",\"url\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/\",\"name\":\"LDAP\/Active Directory | Twproject support\",\"isPartOf\":{\"@id\":\"https:\/\/twproject.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1083.jpg\",\"datePublished\":\"2015-10-26T15:20:40+00:00\",\"dateModified\":\"2021-08-30T10:28:50+00:00\",\"description\":\"Native LDAP integration allows several operations: 1) user import \u201cby hand\u201d: there is a procedure for importing users from an LDAP server (including\",\"breadcrumb\":{\"@id\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/#primaryimage\",\"url\":\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1083.jpg\",\"contentUrl\":\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1083.jpg\",\"width\":1236,\"height\":69},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/twproject.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Advanced usage\",\"item\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Import \/ Export\",\"item\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"LDAP\/Active Directory\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/twproject.com\/support\/#website\",\"url\":\"https:\/\/twproject.com\/support\/\",\"name\":\"Twproject support\",\"description\":\"Twproject documentation online\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/twproject.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LDAP\/Active Directory | Twproject support","description":"Native LDAP integration allows several operations: 1) user import \u201cby hand\u201d: there is a procedure for importing users from an LDAP server (including","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/","og_locale":"en_US","og_type":"article","og_title":"LDAP\/Active Directory | Twproject support","og_description":"Native LDAP integration allows several operations: 1) user import \u201cby hand\u201d: there is a procedure for importing users from an LDAP server (including","og_url":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/","og_site_name":"Twproject support","article_publisher":"https:\/\/www.facebook.com\/twproject","article_modified_time":"2021-08-30T10:28:50+00:00","og_image":[{"width":1236,"height":69,"url":"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1083.jpg","type":"image\/jpeg"}],"twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/","url":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/","name":"LDAP\/Active Directory | Twproject support","isPartOf":{"@id":"https:\/\/twproject.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/#primaryimage"},"image":{"@id":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/#primaryimage"},"thumbnailUrl":"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1083.jpg","datePublished":"2015-10-26T15:20:40+00:00","dateModified":"2021-08-30T10:28:50+00:00","description":"Native LDAP integration allows several operations: 1) user import \u201cby hand\u201d: there is a procedure for importing users from an LDAP server (including","breadcrumb":{"@id":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/#primaryimage","url":"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1083.jpg","contentUrl":"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen1083.jpg","width":1236,"height":69},{"@type":"BreadcrumbList","@id":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/ldap-active-directory\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/twproject.com\/support\/"},{"@type":"ListItem","position":2,"name":"Advanced usage","item":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/"},{"@type":"ListItem","position":3,"name":"Import \/ Export","item":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/"},{"@type":"ListItem","position":4,"name":"LDAP\/Active Directory"}]},{"@type":"WebSite","@id":"https:\/\/twproject.com\/support\/#website","url":"https:\/\/twproject.com\/support\/","name":"Twproject support","description":"Twproject documentation online","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/twproject.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/pages\/2617","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/comments?post=2617"}],"version-history":[{"count":0,"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/pages\/2617\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/pages\/2383"}],"wp:attachment":[{"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/media?parent=2617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}