0 Replies Latest reply on Oct 17, 2012 6:16 AM by ursudheesh

    How to enable SSL on a newly created realm in JBoss AS 7.1

    ursudheesh

      Hi,

       

      I have created a new realm called "MyRealm" and wanted to enable SSL on the realm in the standalone mode on JBoss AS 7.1  using the following link

       

       

      https://docs.jboss.org/author/display/AS71/Security+Realms "Enable SSL" topic.

       

       

      <security-realm name="MyRealm">

              <server-identities>

                <ssl>

                  <keystore path="foo.keystore" relative-to="jboss.server.config.dir" password="secret" />             

                </ssl>

              </server-identities>

              <authentication>

                 <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>

              </authentication>

        </security-realm>

       

        <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">

            <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

            <connector name="https"  protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true"  security-realm="MyRealm">

            <virtual-server name="default-host" enable-welcome-root="true">

                 <alias name="localhost"/>

                 <alias name="example.com"/>

            </virtual-server>

        </subsystem>

       

       

       

       

      However when I run the standalone.bat, we get the following error:

       

       

      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[277,4]

      Message: JBAS014788: Unexpected attribute 'security-realm' encountered

       

       

       

       

      Please let us know if the steps are correct.

       

      Regards

      Sudheesh