title: How to Add Authentication to JSP Page on Alfresco Share
body: <p>So for the project I'm currently working on, prior to taking the Alfresco developers course, we had created a custom JSP page that we call from within the course of our workflow that is located at: <code>C:\Alfresco\tomcat\webapps\share\custom</code>. Currently anyone can access this jsp page. However, when we move the location to <code>C:\Alfresco\tomcat\webapps\alfresco\jsp\custom</code>, a log on is always required to acces the page, which seems strange to me. However the issue here is we do not want to allow the user access to both Share and Explorer, thus we are not looking to configure an SSO here. We’d like to only allow people of group “Manager”, or the currently logged in user from the group "Manager" to access this page, while it is located on the share side. We’ve tried adding the following into the</p>
  
  <p><code>C:\Alfresco\tomcat\webapps\share\WEB-INF\web.xml</code> file:</p>
  
  <pre><code>&lt;security-constraint&gt;
          &lt;web-resource-collection&gt;
              &lt;web-resource-name&gt;All&lt;/web-resource-name&gt;
              &lt;url-pattern&gt;/custom /*&lt;/url-pattern&gt;
              &lt;http-method&gt;GET&lt;/http-method&gt;
              &lt;http-method&gt;POST&lt;/http-method&gt;
          &lt;/web-resource-collection&gt;
          &lt;auth-constraint&gt;
              &lt;role-name&gt;Manager&lt;/role-name&gt;
          &lt;/auth-constraint&gt;
      &lt;/security-constraint&gt;
  </code></pre>
  
  <p>But this did not work. Does anyone have a suggestion as to how we might get the desired authentication?</p>
  
  <p>Thanks</p>