Buggy code:
public class ApplyRemoteMasterDomainModelHandler implements OperationStepHandler { public static final String OPERATION_NAME = "apply-remote-domain-model" ; public static final OperationDefinition DEFINITION = new SimpleOperationDefinitionBuilder ( ApplyRemoteMasterDomainModelHandler . OPERATION_NAME , null ) . withFlag ( HOST_CONTROLLER_ONLY ) . setPrivateEntry ( ) . build ( ) ; protected final DomainController domainController ; protected final HostControllerEnvironment hostControllerEnvironment ; protected final LocalHostControllerInfo localHostInfo ; protected final IgnoredDomainResourceRegistry ignoredResourceRegistry ; private final HostFileRepository fileRepository ; private final ContentRepository contentRepository ; private final WritableAuthorizerConfiguration authorizerConfiguration ; public ApplyRemoteMasterDomainModelHandler ( final DomainController domainController , final HostControllerEnvironment hostControllerEnvironment , final HostFileRepository fileRepository , final ContentRepository contentRepository , final LocalHostControllerInfo localHostInfo , final IgnoredDomainResourceRegistry ignoredResourceRegistry , final WritableAuthorizerConfiguration authorizerConfiguration ) { } public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final ModelNode domainModel = operation . get ( DOMAIN_MODEL ) ; final ModelNode startRoot = Tools . readModel ( context . readResourceFromRoot ( EMPTY_ADDRESS ) ) ; final Set < String > ourServerGroups = getOurServerGroups ( context ) ; final Map < String , Set < byte [ ] > > deploymentHashes = new HashMap < String , Set < byte [ ] > > ( ) ; final Set < String > relevantDeployments = new HashSet < String > ( ) ; final Set < byte [ ] > requiredContent = new HashSet < byte [ ] > ( ) ; final Resource rootResource = context . readResourceForUpdate ( EMPTY_ADDRESS ) ; clearDomain ( rootResource ) ; if ( ! ( context . isBooting ( ) ) ) { <START_BUG> authorizerConfiguration . domainReconnectReset ( ) ; <END_BUG> } List < ModelNode > addOps = new ArrayList < ModelNode > ( ) ; for ( final ModelNode resourceDescription : domainModel . asList ( ) ) { final PathAddress resourceAddress = PathAddress . pathAddress ( resourceDescription . require ( DOMAIN_RESOURCE_ADDRESS ) ) ; if ( ignoredResourceRegistry . isResourceExcluded ( resourceAddress ) ) { continue ; } if ( ( ( resourceAddress . size ( ) ) == 1 ) && ( resourceAddress . getElement ( 0 ) . getKey ( ) . equals ( EXTENSION ) ) ) { continue ; } ModelNode resourceModel = resourceDescription . get ( DOMAIN_RESOURCE_MODEL ) ; final Resource resource = getResource ( resourceAddress , rootResource , resourceModel , context , addOps ) ; if ( ( resource != null ) && ( ( resourceAddress . size ( ) ) == 1 ) ) { PathElement pe = resourceAddress . getElement ( 0 ) ; String peKey = pe . getKey ( ) ; if ( peKey . equals ( DEPLOYMENT ) ) { ModelNode model = resource . getModel ( ) ; String id = resourceAddress . getElement ( 0 ) . getValue ( ) ; if ( model . hasDefined ( CONTENT ) ) { for ( ModelNode contentItem : model . get ( CONTENT ) . asList ( ) ) { if ( contentItem . hasDefined ( HASH ) ) { Set < byte [ ] > hashes = deploymentHashes . get ( id ) ; if ( hashes == null ) { hashes = new HashSet < byte [ ] > ( ) ; deploymentHashes . put ( id , hashes ) ; } hashes . add ( contentItem . get ( HASH ) . asBytes ( ) ) ; } } } } else if ( peKey . equals ( MANAGEMENT_CLIENT_CONTENT ) ) { ModelNode model = resource . getModel ( ) ; if ( model . hasDefined ( HASH ) ) { requiredContent . add ( model . get ( HASH ) . asBytes ( ) ) ; } } } else if ( ( ( ( ( resourceAddress . size ( ) ) == 2 ) && ( resourceAddress . getElement ( 0 ) . getKey ( ) . equals ( SERVER_GROUP ) ) ) && ( ourServerGroups . contains ( resourceAddress . getElement ( 0 ) . getValue ( ) ) ) ) && ( resourceAddress . getElement ( 1 ) . getKey ( ) . equals ( DEPLOYMENT ) ) ) { relevantDeployments . add ( resourceAddress . getElement ( 1 ) . getValue ( ) ) ; } } for ( String id : relevantDeployments ) { Set < byte [ ] > hashes = deploymentHashes . remove ( id ) ; if ( hashes != null ) { requiredContent . addAll ( hashes ) ; } } for ( byte [ ] hash : requiredContent ) { fileRepository . getDeploymentFiles ( hash ) ; } if ( ! ( context . isBooting ( ) ) ) { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { makeAffectedServersRestartRequired ( context , startRoot ) ; context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; } } , MODEL , true ) ; } ImmutableManagementResourceRegistration registry = context . getResourceRegistration ( ) ; for ( int i = ( addOps . size ( ) ) - 1 ; i >= 0 ; i -- ) { ModelNode subOperation = addOps . get ( i ) ; PathAddress stepAddress = PathAddress . pathAddress ( subOperation . get ( OP_ADDR ) ) ; String stepOpName = subOperation . require ( OP ) . asString ( ) ; OperationStepHandler stepHandler = registry . getOperationHandler ( stepAddress , stepOpName ) ; if ( stepHandler == null ) { ImmutableManagementResourceRegistration child = registry . getSubModel ( stepAddress ) ; if ( child == null ) { throw new IllegalStateException ( MESSAGES . noSuchResourceType ( stepAddress ) ) ; } else { throw new IllegalStateException ( MESSAGES . noHandlerForOperation ( stepOpName , stepAddress ) ) ; } } context . addStep ( subOperation , stepHandler , MODEL , true ) ; } context . stepCompleted ( ) ; } private void clearDomain ( final Resource rootResource ) { }

Fix:
authorizerConfiguration . reset ( ) ;