Merge pull request #895 from ssilvert/KEYCLOAK-880-props-in-subsys
KEYCLOAK-880 Fix use of ${..} props in subsystem XML
This commit is contained in:
commit
519d051eb0
10 changed files with 14 additions and 13 deletions
|
@ -40,7 +40,7 @@ public class CredentialAddHandler extends AbstractAddStepHandlerWithAttributes {
|
|||
@Override
|
||||
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
|
||||
KeycloakAdapterConfigService ckService = KeycloakAdapterConfigService.find(context);
|
||||
ckService.addCredential(operation, model);
|
||||
ckService.addCredential(operation, context.resolveExpressions(model));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -61,6 +61,6 @@ public final class RealmAddHandler extends AbstractAddStepHandler {
|
|||
@Override
|
||||
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
|
||||
KeycloakAdapterConfigService ckService = KeycloakAdapterConfigService.find(context);
|
||||
ckService.addRealm(operation, model);
|
||||
ckService.addRealm(operation, context.resolveExpressions(model));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,6 +56,6 @@ public final class SecureDeploymentAddHandler extends AbstractAddStepHandler {
|
|||
@Override
|
||||
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
|
||||
KeycloakAdapterConfigService ckService = KeycloakAdapterConfigService.find(context);
|
||||
ckService.addSecureDeployment(operation, model);
|
||||
ckService.addSecureDeployment(operation, context.resolveExpressions(model));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public class CredentialAddHandler extends AbstractAddStepHandler {
|
|||
@Override
|
||||
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
|
||||
KeycloakAdapterConfigService ckService = KeycloakAdapterConfigService.find(context);
|
||||
ckService.addCredential(operation, model);
|
||||
ckService.addCredential(operation, context.resolveExpressions(model));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,15 +35,15 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* Pass authentication data (keycloak.json) as a servlet context param so it can be read by the KeycloakServletExtension.
|
||||
* This is used for AS7/EAP6.
|
||||
* This is used for EAP6.
|
||||
*
|
||||
* @author Stan Silvert ssilvert@redhat.com (C) 2014 Red Hat Inc.
|
||||
*/
|
||||
|
||||
// Note: Even though this class closely resembles the WildFly KeycloakAdapterConfigDeploymentProcessor
|
||||
// it can not be easily refactored because the WarMetaData classes are of different types.
|
||||
public class KeycloakAdapterConfigDeploymentProcessorAS7 implements DeploymentUnitProcessor {
|
||||
protected Logger log = Logger.getLogger(KeycloakAdapterConfigDeploymentProcessorAS7.class);
|
||||
public class KeycloakAdapterConfigDeploymentProcessorEAP6 implements DeploymentUnitProcessor {
|
||||
protected Logger log = Logger.getLogger(KeycloakAdapterConfigDeploymentProcessorEAP6.class);
|
||||
|
||||
@Override
|
||||
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
|
|
@ -23,11 +23,11 @@ import org.jboss.modules.ModuleIdentifier;
|
|||
import org.jboss.modules.ModuleLoader;
|
||||
|
||||
/**
|
||||
* Adds platform-specific modules for AS7
|
||||
* Adds platform-specific modules for EAP6
|
||||
*
|
||||
* @author Stan Silvert ssilvert@redhat.com (C) 2014 Red Hat Inc.
|
||||
*/
|
||||
public class KeycloakDependencyProcessorAS7 extends KeycloakDependencyProcessor {
|
||||
public class KeycloakDependencyProcessorEAP6 extends KeycloakDependencyProcessor {
|
||||
|
||||
private static final ModuleIdentifier KEYCLOAK_AS7_ADAPTER = ModuleIdentifier.create("org.keycloak.keycloak-as7-adapter");
|
||||
|
|
@ -70,7 +70,7 @@ class KeycloakSubsystemAdd extends AbstractBoottimeAddStepHandler {
|
|||
if (Environment.isWildFly()) {
|
||||
return new KeycloakDependencyProcessorWildFly();
|
||||
} else {
|
||||
return new KeycloakDependencyProcessorAS7();
|
||||
return new KeycloakDependencyProcessorEAP6();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ class KeycloakSubsystemAdd extends AbstractBoottimeAddStepHandler {
|
|||
if (Environment.isWildFly()) {
|
||||
return new KeycloakAdapterConfigDeploymentProcessor();
|
||||
} else {
|
||||
return new KeycloakAdapterConfigDeploymentProcessorAS7();
|
||||
return new KeycloakAdapterConfigDeploymentProcessorEAP6();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,6 +61,6 @@ public final class RealmAddHandler extends AbstractAddStepHandler {
|
|||
@Override
|
||||
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
|
||||
KeycloakAdapterConfigService ckService = KeycloakAdapterConfigService.find(context);
|
||||
ckService.addRealm(operation, model);
|
||||
ckService.addRealm(operation, context.resolveExpressions(model));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,6 +56,6 @@ public final class SecureDeploymentAddHandler extends AbstractAddStepHandler {
|
|||
@Override
|
||||
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
|
||||
KeycloakAdapterConfigService ckService = KeycloakAdapterConfigService.find(context);
|
||||
ckService.addSecureDeployment(operation, model);
|
||||
ckService.addSecureDeployment(operation, context.resolveExpressions(model));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ public final class AuthServerAddHandler extends AbstractAddStepHandler {
|
|||
for (AttributeDefinition attr : AuthServerDefinition.ALL_ATTRIBUTES) {
|
||||
attr.validateAndSet(operation, model);
|
||||
}
|
||||
model = context.resolveExpressions(model);
|
||||
|
||||
// returns early if on domain controller
|
||||
if (!requiresRuntime(context)) return;
|
||||
|
|
Loading…
Reference in a new issue