<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Making explorer multi tenant aware - Pointing explorer to multiple LDAPs in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/making-explorer-multi-tenant-aware-pointing-explorer-to-multiple/m-p/188860#M141990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have done the following changes to make explorer multi tenant aware as I needed very much.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; Extended DefaultLoginHandler java class and injected from activiti-standalone-context.xml and did the following customizations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.1)&amp;nbsp; Changed the definition of injection of DefaultLoginHandler&amp;nbsp; in activiti-standalone-context.xml file as below&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean id="activitiLoginHandler" class="MyLoginHandler"&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="identityService" ref="identityService" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="myProcessEngineConfiguration" ref="processEngineConfiguration" /&amp;gt; &amp;lt;newline - injecting process engine&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="tenantList" value="TENANT1,TENANT2,TENANT3"/&amp;gt; &amp;lt;new line - setting tenant ids&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.2)&amp;nbsp; In the setter method of MyLoginHandler, written the following lines to update the LDAP properties in run time. On engine bootstrap explorer connects to LDAP defined in the&amp;nbsp; activiti-standalone-context.xml. The following allows to change the LDAP connection at runtime&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;ProcessEngineConfigurator&amp;gt; processEngineConfigurator = processEngineConfiguration.getAllConfigurators();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int i=0; i &amp;lt; processEngineConfigurator.size(); i++){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldapConfigurator = (LDAPConfigurator) processEngineConfigurator.get(i);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.3) Defined the same set of tenant ids in a separate file in my local system and their LDAP configuration details against each tenant id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.4) In the method public LoggedInUserImpl authenticate(String userName, String password), reading the tenant LDAP details and setting the same to setter methods of LDAP object extracted in step 1.2. Fetching the right LDAP details for the tenant is determined through step 1.5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; 1.5)&amp;nbsp; Typically using the link &lt;/SPAN&gt;&lt;A href="http://localhost:8080/activiti-explorer/ui/" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/activiti-explorer/ui/&lt;/A&gt;&lt;SPAN&gt; to access the explorer. But to enforce tenant here, I am using the &lt;/SPAN&gt;&lt;A href="http://localhost:8080/activiti-explorer/ui?tenantID=TENANT1" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/activiti-explorer/ui?tenantID=TENANT1&lt;/A&gt;&lt;SPAN&gt;. Fetching the tenant ID from the request in public void onRequestStart(HttpServletRequest request, HttpServletResponse response) { method and setting to a global tenant id variable&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 1.6) So tenant id extracted from explorer url is used to determine the right LDAP config details from the property file&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This way it's working fine for me and I want some Activiti experts validate my approach and looking for suggestions. I am not sure about the implications of injecting processEngineConfiguration object into my loginhandler class and using it there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need the explorer to work in multi tenant aware way for one of my use case.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jan 2015 13:27:09 GMT</pubDate>
    <dc:creator>penusila611621</dc:creator>
    <dc:date>2015-01-20T13:27:09Z</dc:date>
    <item>
      <title>Making explorer multi tenant aware - Pointing explorer to multiple LDAPs</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/making-explorer-multi-tenant-aware-pointing-explorer-to-multiple/m-p/188860#M141990</link>
      <description>I have done the following changes to make explorer multi tenant aware as I needed very much.1.&amp;nbsp; Extended DefaultLoginHandler java class and injected from activiti-standalone-context.xml and did the following customizations.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.1)&amp;nbsp; Changed the definition of injection of DefaultLoginHandler&amp;nbsp; in act</description>
      <pubDate>Tue, 20 Jan 2015 13:27:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/making-explorer-multi-tenant-aware-pointing-explorer-to-multiple/m-p/188860#M141990</guid>
      <dc:creator>penusila611621</dc:creator>
      <dc:date>2015-01-20T13:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Making explorer multi tenant aware - Pointing explorer to multiple LDAPs</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/making-explorer-multi-tenant-aware-pointing-explorer-to-multiple/m-p/188861#M141991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sounds allright. Don't like the fact you need tenantId in the url, but I see why. Other option could be to try all the ldap's one by one until one matches … that would give you your tenant id too. And you could cache that info (which user belongs to which tenant) too.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 13:44:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/making-explorer-multi-tenant-aware-pointing-explorer-to-multiple/m-p/188861#M141991</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-01-21T13:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Making explorer multi tenant aware - Pointing explorer to multiple LDAPs</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/making-explorer-multi-tenant-aware-pointing-explorer-to-multiple/m-p/188862#M141992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Most probably it works then. I actually did not try the upgrade mechanism, just looked at the code if it should work, and found no evidence, because I was expecting activiti to return with the activiti.mysql55.*.sql files in getResourceForDbOperation method, but now I can see you choose another solution.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 07:28:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/making-explorer-multi-tenant-aware-pointing-explorer-to-multiple/m-p/188862#M141992</guid>
      <dc:creator>atifraza</dc:creator>
      <dc:date>2015-01-30T07:28:37Z</dc:date>
    </item>
  </channel>
</rss>

