[jboss-jira] [JBoss JIRA] (AS7-6710) Configuring security realm throws NullPointerException when operational header allow-resource-service-restart is used

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Mon Mar 11 18:22:41 EDT 2013


Brian Stansberry created AS7-6710:
-------------------------------------

             Summary: Configuring security realm throws NullPointerException when operational header allow-resource-service-restart is used
                 Key: AS7-6710
                 URL: https://issues.jboss.org/browse/AS7-6710
             Project: Application Server 7
          Issue Type: Bug
          Components: Domain Management, Security
    Affects Versions: EAP 6.1.0.Alpha (7.2.0.Final)
            Reporter: Brian Stansberry
            Assignee: Tomaz Cerar
             Fix For: 8.0.0.Alpha1


Josef Cacek reports:

Several methods in the SecurityRealmAddHandler class don't handle null value of List<ServiceController<?>> newControllers (c.f. SecurityRealmParentRestartHandler.recreateParentService), and therefor they fail when allow-resource-service-restart==true.

For instance if you run following commands using console:

[standalone at localhost:9999 /] /core-service=management/security-realm=JBossTest:add
{"outcome" => "success"}
[standalone at localhost:9999 /] /core-service=management/security-realm=JBossTest/authentication=local:add(allowed-users="*", default-user="$local")  {allow-resource-service-restart=true}
{
    "outcome" => "failed",
    "failure-description" => "JBAS014749: Operation handler failed: null",
    "rolled-back" => true
}

Throws NPE in the server:

12:17:21,839 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 6) JBAS014612: Operation ("add") failed - address: ([
    ("core-service" => "management"),
    ("security-realm" => "test"),
    ("authentication" => "local")
]): java.lang.NullPointerException
	at org.jboss.as.domain.management.security.SecurityRealmAddHandler.addLocalService(SecurityRealmAddHandler.java:275) [jboss-as-domain-management-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
	at org.jboss.as.domain.management.security.SecurityRealmAddHandler.installServices(SecurityRealmAddHandler.java:133) [jboss-as-domain-management-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
	at org.jboss.as.domain.management.security.SecurityRealmParentRestartHandler.recreateParentService(SecurityRealmParentRestartHandler.java:64) [jboss-as-domain-management-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
	at org.jboss.as.controller.RestartParentResourceHandlerBase$1.execute(RestartParentResourceHandlerBase.java:73) [jboss-as-controller-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440) [jboss-as-controller-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list