Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I figured I'd post the solution for anyone who had the same problem.</p> <p>Step 1: Create a filter that will be executed when someone tries to hit one of your URLs. Once the filter is created, compile and package it in a jar, and then place that jar inside of the alfresco.war and share.war (in the location "WEB-INF/lib"). Here is a skeleton version of what the filter code will look like:</p> <pre><code>package sample.filter; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpSession; public class SSOIntegrationFilter implements Filter { private static final String PARAM_REMOTE_USER = "remoteUser"; private static final String SESS_PARAM_REMOTE_USER = SSOIntegrationFilter.class.getName() + '.' + PARAM_REMOTE_USER; @Override public void init(FilterConfig arg0) throws ServletException {} @Override public void destroy() {} @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpServletRequest = (HttpServletRequest) req; String remoteUser = proprieterayUserIdValidationAndExtractionMethod(req.getParameter(PARAM_REMOTE_USER)); // We've successfully authenticated the user. Remember their ID for next time. if (remoteUser != null) { HttpSession session = httpServletRequest.getSession(); session.setAttribute(SESS_PARAM_REMOTE_USER, remoteUser); } chain.doFilter(new HttpServletRequestWrapper(httpServletRequest) { @Override public String getRemoteUser() { return (String) getSession().getAttribute(SESS_PARAM_REMOTE_USER); } }, res); } private String proprieterayUserIdValidationAndExtractionMethod(String param) { return "admin"; // who to login as, replace with your cookie login code } } </code></pre> <p>Step 2: Configure the web.xml file for tomcat to recognize this filter (mine was located in /usr/share/tomcat/conf).</p> <pre><code>&lt;filter&gt; &lt;filter-name&gt;Demo Filter&lt;/filter-name&gt; &lt;filter-class&gt;sample.filter.SSOIntegrationFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;Demo Filter&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/filter-mapping&gt; </code></pre> <p>Step 3: Make the following changes to your share-config-custom.xml file (should be located in the shared directory): <a href="http://docs.alfresco.com/3.4/index.jsp?topic=%2Fcom.alfresco.Enterprise_3_4_0.doc%2Ftasks%2Fauth-alfrescontlm-sso.html" rel="nofollow">http://docs.alfresco.com/3.4/index.jsp?topic=%2Fcom.alfresco.Enterprise_3_4_0.doc%2Ftasks%2Fauth-alfrescontlm-sso.html</a></p> <p>Step 4: Update your alfresco-global.properties file with the following information:</p> <pre><code>authentication.chain=external1:external,alfrescoNtlm1:alfrescoNtlm external.authentication.proxyUserName=X-Alfresco-Remote-User </code></pre> <p>Then start up Alfresco and try it out. Hopefully this will put you on the right track.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload