<?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 External authentication with a userIdPattern in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/external-authentication-with-a-useridpattern/m-p/229758#M182888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been following the instructions here:-&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems#External" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems#External&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;…to set up Alfresco to trust headers set by the upstream Apache.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got:-&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;alfresco-global.properties&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;authentication.chain=ssl-headers:external&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;alfresco/extension/subsystems/Authentication/external/ssl-headers/ssl-headers.properties&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;external.authentication.enabled=1&lt;BR /&gt;external.authentication.proxyUserName=&lt;BR /&gt;external.authentication.defaultAdministratorUserNames=jamie&lt;BR /&gt;external.authentication.proxyHeader=HTTP_SSLCLIENTCERTSUBJECT&lt;BR /&gt;external.authentication.userIdPattern=^(jamie)&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Which allows me to log in depending on the value of HTTP_SSLCLIENTCERTSUBJECT, however userIdPattern seems to be ignored.&amp;nbsp; It doesn't extract "jamie" from a longer string, nor does login fail if the header value is something other than jamie.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm guessing other instructions that talk about modifying web.xml filters are talking about Alfresco &amp;lt; 3.2r2, or am I wrong and should be doing more than just the above?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jan 2010 18:00:57 GMT</pubDate>
    <dc:creator>lentinj</dc:creator>
    <dc:date>2010-01-15T18:00:57Z</dc:date>
    <item>
      <title>External authentication with a userIdPattern</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/external-authentication-with-a-useridpattern/m-p/229758#M182888</link>
      <description>Hi,I've been following the instructions here:-http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems#External…to set up Alfresco to trust headers set by the upstream Apache.I've got:-alfresco-global.propertiesauthentication.chain=ssl-headers:external‍‍alfresco/extension/subsystems/Authenti</description>
      <pubDate>Fri, 15 Jan 2010 18:00:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/external-authentication-with-a-useridpattern/m-p/229758#M182888</guid>
      <dc:creator>lentinj</dc:creator>
      <dc:date>2010-01-15T18:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: External authentication with a userIdPattern</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/external-authentication-with-a-useridpattern/m-p/229759#M182889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hrm, on closer investigation I think a bug renders this option useless.&amp;nbsp; Tracing the execution the regex does make it's way to the relevant code, however:-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Matcher matcher = this.userIdPattern.matcher(userId);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (matcher.matches())&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&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; userId = matcher.group().trim();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;.group() returns the section of userId that userIdPattern matched.&amp;nbsp; However, matches() will only succeed if it matches the entirety of the string, in which case matcher.group() == userId, and it's achieved nothing.&amp;nbsp; I'd interpret the documentation as meaning:-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Matcher matcher = this.userIdPattern.matcher(userId);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(matcher.find()) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; userId = matcher.groupCount() &amp;gt; 0 ? matcher.group(1) : null;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;…and would be more useful if matcher.group() was returned instead of null.&amp;nbsp; Any comments?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 18:31:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/external-authentication-with-a-useridpattern/m-p/229759#M182889</guid>
      <dc:creator>lentinj</dc:creator>
      <dc:date>2010-01-21T18:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: External authentication with a userIdPattern</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/external-authentication-with-a-useridpattern/m-p/229760#M182890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I agree it should have used group(1). I have logged &lt;/SPAN&gt;&lt;A href="https://issues.alfresco.com/jira/browse/ETHREEOH-4036" rel="nofollow noopener noreferrer"&gt;https://issues.alfresco.com/jira/browse/ETHREEOH-4036&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jan 2010 17:43:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/external-authentication-with-a-useridpattern/m-p/229760#M182890</guid>
      <dc:creator>dward</dc:creator>
      <dc:date>2010-01-25T17:43:17Z</dc:date>
    </item>
  </channel>
</rss>

