Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1215244

Summary: console-enabled="false" does not work in domain mode to disable web access to admin console
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Marc Shirley <mshirley>
Component: Domain ManagementAssignee: baranowb <bbaranow>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Simka <msimka>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.4, 6.3.3CC: bbaranow, brian.stansberry, cdewolf, dandread, hpehl, jawilson, jkudrnac, pjelinek, rhatlapa
Target Milestone: CR1   
Target Release: EAP 6.4.2   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The handler for the core-service=managment/management-interface=http resource's "add" operation is ignoring the "console-enabled" attribute when it sets up the runtime services for the interface. Consequence: The admin console cannot be disabled on the master Domain Controller. Fix: The handler now uses the value of the console-enabled attribute when deciding whether to install the console. Result: The console can be disabled by setting the "console-enabled" attribute to "false".
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 10:12:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1219165    

Description Marc Shirley 2015-04-24 18:25:54 UTC
Description of problem:
Disabling the web interface of the admin console using the console-enabled attribute does not work in domain mode.  

Version-Release number of selected component (if applicable):
EAP 6.3.3

How reproducible:
Very

Steps to Reproduce:
1. Set up domain installation
2. Set console-enabled="false" attribute on http management interface in host.xml [1] or using CLI [2]
3. Log into admin console ( http://localhost:9990/console )

[1] Set console-enabled in host.xml:
 <http-interface security-realm="ManagementRealm" console-enabled="false">
    <socket interface="management" port="${jboss.management.http.port:9990}" secure-port="9443"/>
 </http-interface>

[2] Set console-enabled through CLI:
/host=master/core-service=management/management-interface=http-interface/:write-attribute(name=console-enabled,value=false)

Actual results:
Able to access and log into web admin console.

Expected results:
Empty or no page is displayed as in standalone mode.

Additional info:

Comment 1 Brian Stansberry 2015-04-24 19:04:23 UTC
I just added docs text, written as if this were already fixed. It's not, but it's easy.

The org.jboss.as.host.controller.operations.HttpManagementAddHandler class should be more like the org.jboss.as.server.operations.HttpManagementAddHandler class, and handle this attribute.

Note the server class isn't perfect either as it does this:

boolean consoleEnabled = model.get(ModelDescriptionConstants.CONSOLE_ENABLED).asBoolean(true);

instead of using the correct idiom and delegating to the AttributeDefinition:

boolean consoleEnabled = CONSOLE_ENABLED.resolveModelAttribute(console, model).asBoolean();

That flaw doesn't harm anything, but might as well correct it.

Comment 2 Ken Wills 2015-05-07 17:14:50 UTC
Fix pending merge: WFCORE-678

Comment 6 Pavel Jelinek 2015-06-19 10:12:43 UTC
Verified for EAP 6.4.2.CP.CR1.

Comment 7 Petr Penicka 2017-01-17 10:12:46 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.