<div dir="ltr"><div>We are using Apache TOMCAT v. 8.0.18. We have a Javascript application that we would like to configure web.xml using KEYCLOAK to protect all root URI&#39;s &#39;/&#39; except &#39;/tracking&#39;. Is there a way to exclude &#39;/tracking&#39; from being protected either in the KEYCLOAK admin console or in the WEB.XML itself. Some additional information is for the tracking URL we will use both HTTP and WEBSOCKETS protocols. Our current approach was to specifically protect all URI except for &#39;/tracking&#39; but that doesn&#39;t seem to be working as a solution.</div><div><br></div><div>We have attached our example WEB.XML attempting to specifically protect URLs:</div><div><br></div><div><div>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</div><div>&lt;web-app xmlns=&quot;<a href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a>&quot;</div><div>         xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot;</div><div>         xsi:schemaLocation=&quot;<a href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a> <a href="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd</a>&quot;</div><div>         version=&quot;3.0&quot;&gt;</div><div>    &lt;module-name&gt;ROOT&lt;/module-name&gt;</div><div>    &lt;security-constraint&gt;</div><div>        &lt;web-resource-collection&gt;</div><div>            &lt;web-resource-name&gt;APP&lt;/web-resource-name&gt;</div><div>            &lt;url-pattern&gt;/app/*&lt;/url-pattern&gt;</div><div>        &lt;/web-resource-collection&gt;</div><div>        &lt;!--API--&gt;</div><div>        &lt;web-resource-collection&gt;</div><div>            &lt;web-resource-name&gt;API&lt;/web-resource-name&gt;</div><div>            &lt;url-pattern&gt;/api/*&lt;/url-pattern&gt;</div><div>        &lt;/web-resource-collection&gt;</div><div>        &lt;!--HTML--&gt;</div><div>        &lt;web-resource-collection&gt;</div><div>            &lt;web-resource-name&gt;HTML&lt;/web-resource-name&gt;</div><div>            &lt;url-pattern&gt;*.html&lt;/url-pattern&gt;</div><div>        &lt;/web-resource-collection&gt;</div><div>&lt;auth-constraint&gt;</div><div>            &lt;role-name&gt;user&lt;/role-name&gt;</div><div>        &lt;/auth-constraint&gt;</div><div>    &lt;/security-constraint&gt;</div><div> &lt;login-config&gt;</div><div>        &lt;auth-method&gt;KEYCLOAK&lt;/auth-method&gt;</div><div>        &lt;realm-name&gt;worktrac&lt;/realm-name&gt;</div><div>    &lt;/login-config&gt;</div><div>    &lt;security-role&gt;</div><div>        &lt;role-name&gt;user&lt;/role-name&gt;</div><div>    &lt;/security-role&gt;</div><div>&lt;/web-app&gt;</div></div><div><br></div><div>We appreciate your feedback and thoughts on a solution.</div><div>- Chris</div>







</div>