@Override void secureRemoteDomain(OperationContext context, ModelNode operation, ModelNode remoteDC) throws OperationFailedException { ModelNode parameters = operation.get(VALUE, REMOTE); if (parameters.has(AUTHENTICATION_CONTEXT.getName())) { AUTHENTICATION_CONTEXT.validateAndSet(parameters, remoteDC); final String authenticationContext = AUTHENTICATION_CONTEXT.resolveModelAttribute(context, parameters).asString(); context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { hostControllerInfo.setAuthenticationContext(context.getCapabilityServiceName( "org.wildfly.security.authentication-context", authenticationContext, AuthenticationContext.class)); } }, Stage.RUNTIME); } else { remoteDC.get(DomainControllerWriteAttributeHandler.AUTHENTICATION_CONTEXT.getName()).clear(); } if (parameters.has(DomainControllerWriteAttributeHandler.SECURITY_REALM.getName())) { DomainControllerWriteAttributeHandler.SECURITY_REALM.validateAndSet(parameters, remoteDC); hostControllerInfo.setRemoteDomainControllerSecurityRealm(DomainControllerWriteAttributeHandler.SECURITY_REALM.resolveModelAttribute(context, parameters).asString()); } else { remoteDC.get(DomainControllerWriteAttributeHandler.SECURITY_REALM.getName()).clear(); } }
@Override void secureRemoteDomain(OperationContext context, ModelNode operation, ModelNode remoteDC) throws OperationFailedException { ModelNode parameters = operation.get(VALUE, REMOTE); if (parameters.has(AUTHENTICATION_CONTEXT.getName())) { AUTHENTICATION_CONTEXT.validateAndSet(parameters, remoteDC); final String authenticationContext = AUTHENTICATION_CONTEXT.resolveModelAttribute(context, parameters).asString(); context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { hostControllerInfo.setAuthenticationContext(context.getCapabilityServiceName( "org.wildfly.security.authentication-context", authenticationContext, AuthenticationContext.class)); } }, Stage.RUNTIME); } else { remoteDC.get(DomainControllerWriteAttributeHandler.AUTHENTICATION_CONTEXT.getName()).clear(); } if (parameters.has(DomainControllerWriteAttributeHandler.SECURITY_REALM.getName())) { DomainControllerWriteAttributeHandler.SECURITY_REALM.validateAndSet(parameters, remoteDC); hostControllerInfo.setRemoteDomainControllerSecurityRealm(DomainControllerWriteAttributeHandler.SECURITY_REALM.resolveModelAttribute(context, parameters).asString()); } else { remoteDC.get(DomainControllerWriteAttributeHandler.SECURITY_REALM.getName()).clear(); } }
if (operation.has(SECURITY_REALM.getName())) { SECURITY_REALM.validateAndSet(operation, remoteDC); hostControllerInfo.setRemoteDomainControllerSecurityRealm(SECURITY_REALM.resolveModelAttribute(context, operation).asString()); } else { remoteDC.get(SECURITY_REALM.getName()).clear();
hostControllerInfo.setRemoteDomainControllerSecurityRealm(SECURITY_REALM.resolveModelAttribute(context, operation).asString()); } else { remoteDC.get(SECURITY_REALM.getName()).clear();
hostControllerInfo.setRemoteDomainControllerSecurityRealm(SECURITY_REALM.resolveModelAttribute(context, operation).asString()); } else { remoteDC.get(SECURITY_REALM.getName()).clear();