How to disable/enable admin console in EAP 6 or 7

Solution Unverified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
    • 7.x

Issue

  • How to disable/enable admin console in EAP 6 or 7?
  • Is there a way to disable the admin console in JBoss EAP 6 or 7?
  • How the management console is installed in EAP 6 or 7? Where is the location of it (is it a WAR) ? Is it possible to remove that war? Is it located in the modules directory?

Resolution

There are two way to achieve it.

  1. Add console-enabled="false" to <http-interface> in standalone.xml (or host.xml):

        <management>
            ...(snip)...
            <management-interfaces>
                <native-interface security-realm="ManagementRealm">
                    <socket-binding native="management-native"/>
                </native-interface>
                <http-interface security-realm="ManagementRealm" console-enabled="false">
                    <socket-binding http="management-http"/>
                </http-interface>
            </management-interfaces>
        </management>
    

        
    To change the above setting via jboss-cli.sh in standalone mode like:

    • Enable console: /core-service=management/management-interface=http-interface:write-attribute(name=console-enabled,value=true)
    • Disable console: /core-service=management/management-interface=http-interface:write-attribute(name=console-enabled,value=false)

    To change the above setting via jboss-cli.sh in domain mode like:

    • Enable console: /host=master/core-service=management/management-interface=http-interface:write-attribute(name=console-enabled,value=true)
    • Disable console: /host=master/core-service=management/management-interface=http-interface:write-attribute(name=console-enabled,value=false)
  2. Remove or comment out <http-interface> under <management-interfaces> in standalone.xml (or host.xml):

       <management>
            ...(snip)...
            <management-interfaces>
                <native-interface security-realm="ManagementRealm">
                    <socket-binding native="management-native"/>
                </native-interface>
                <!--
                <http-interface security-realm="ManagementRealm">
                    <socket-binding http="management-http"/>
                </http-interface>
                -->
            </management-interfaces>
        </management>
    

        
    To change the above setting via jboss-cli.sh (the following example requires socket-binding is already defined.):

    • Add <http-interface>: /core-service=management/management-interface=http-interface:add(socket-binding=management-http,security-realm=ManagementRealm)
    • Remove <http-interface>: /core-service=management/management-interface=http-interface:remove
  • The console is not a WAR (like the equivalents where in previous version of EAP), as EAP 6 have separated user deployments and configuration from system components, and it is not implemented using normal Servlets. It is in the org.jboss.as.console module, but you should not remove that in the same way that you should remove the JMS modules if you do not want JMS support.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments