1 Reply Latest reply on Mar 27, 2018 4:49 AM by iagarwal

    Application security constraints

    iagarwal

      I am facing basic authentication issue while set up the security constraint in small web application. I have tested it with WildFly 8,11.

      Referring the artcile RESTEasy basic authentication example

       

      Application configuration of web.xml :-

       

      <security-constraint>

          <web-resource-collection>

              <web-resource-name>realmsecurity</web-resource-name>

              <description>application security constraints</description>

              <url-pattern>/*</url-pattern>

              <http-method>GET</http-method>

              <http-method>POST</http-method>

          </web-resource-collection>

          <auth-constraint>

              <role-name>Manager</role-name>

          </auth-constraint>

      </security-constraint>

       

       

      <login-config>

          <auth-method>BASIC</auth-method>

          <realm-name>UserRoles simple realm</realm-name>

      </login-config>

       

       

      <security-role>

          <role-name>Manager</role-name>

      </security-role>

       

      jboss-web.xml

      <jboss-web version="11.0"

                 xmlns="http://www.jboss.com/xml/ns/javaee"

                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                 xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_11_0.xsd">

       

       

          <context-root>/</context-root>

          <security-domain>java:/jaas/other</security-domain>

      </jboss-web>

       

      When i opened my application using http://localhost:8080/<app-context>/<servlet-url-pattern>. I always got Not Found response while authenticate from any browser(Chrome,Opera).

      Please help me out to resolve this.@