2 Replies Latest reply on Aug 2, 2006 12:35 PM by coolio

    Access denied error

    jingatspm

      Hello,
      I just started trying out JBoss. Got a problem when I configure the security service.

      I uncommented the security-constraint part in the web.xml file according to the start guide so the last part of the file looks like this:
      <security-constraint>
      <web-resource-collection>
      <web-resource-name>HtmlAdaptor</web-resource-name>
      An example security config that only allows users with the
      role JBossAdmin to access the HTML JMX console web application

      <url-pattern>/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      </web-resource-collection>
      <auth-constraint>
      <role-name>JBossAdmin</role-name>
      </auth-constraint>
      </security-constraint>

      <!--
      <security-constraint>
      <web-resource-collection>
      <web-resource-name>Public</web-resource-name>
      <url-pattern>/public/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      </web-resource-collection>
      </security-constraint>
      -->

      <security-role>
      <role-name>JBossAdmin</role-name>
      </security-role>


      I also configured security domain in jboss-web.xml, application policy in conf/login-config.xml and changed username and password in conf/prop/jmx-console-users.properties

      after I've done all that I'm expecting JBoss to ask me username and password when I reconnect to the JMX console. Instead I get the following error message:

      Message Access to the requested resource has been denied

      description Access to the specified resource (Access to the requested resource has been denied) has been forbidden.


      What have I done wrong? Why isn't JBoss prompting me for entering login information? Thanks in advance for help.

        • 1. Re: Access denied error
          sunesh

          I am facing exactly the same problem now. Were you able to fix it ?

          • 2. Re: Access denied error
            coolio

            I compared deploy/jmx-console.war/WEB-INF/web.xml from both the 4.0.4 and 4.0.2
            downloads.

            I found that the 4.0.4 web.xml is missing the following login-config element.

             <login-config>
             <auth-method>BASIC</auth-method>
             <realm-name>JBoss JMX Console</realm-name>
             </login-config>
            


            Adding this element to the 4.0.4 web.xml causes the web server to prompt me for login as advertised.