-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WFCORE-5279] Update capabilities, dependencies/dep processor
[WFCORE-5279] commented out keystore/manager objects, added missing capability references [WFCORE-5279] Add missing deps, correct capability names [WFCORE-5279] Correct subsystem name for test cases [WFCORE-5279] Correct feature-pack ssl dep, test error codes [WFCORE-5279] Add processor for default SSL context
- Loading branch information
1 parent
e06afe6
commit 988b171
Showing
24 changed files
with
306 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
*/ | ||
package org.wildfly.extension.elytron.tls.subsystem; | ||
|
||
import static org.wildfly.extension.elytron.tls.subsystem.Capabilities.ELYTRON_CAPABILITY; | ||
import static org.wildfly.extension.elytron.tls.subsystem.Capabilities.ELYTRON_TLS_SUBSYSTEM_CAPABILITY_NAME; | ||
|
||
import java.util.Collections; | ||
import java.util.Set; | ||
|
@@ -36,7 +36,7 @@ | |
* | ||
* @author <a href="mailto:[email protected]">Darran Lofthouse</a> | ||
*/ | ||
class BaseAddHandler extends AbstractAddStepHandler implements org.wildfly.extension.elytron.tls.subsystem.ElytronOperationStepHandler { | ||
class BaseAddHandler extends AbstractAddStepHandler implements ElytronOperationStepHandler { | ||
|
||
private final Set<RuntimeCapability> runtimeCapabilities; | ||
|
||
|
@@ -81,7 +81,7 @@ protected void recordCapabilitiesAndRequirements(OperationContext context, Model | |
super.recordCapabilitiesAndRequirements(context, operation, resource); | ||
final String pathValue = context.getCurrentAddressValue(); | ||
for (RuntimeCapability r : runtimeCapabilities) { | ||
context.registerAdditionalCapabilityRequirement(ELYTRON_CAPABILITY, r.isDynamicallyNamed() ? r.getDynamicName(pathValue) : r.getName(), null); | ||
context.registerAdditionalCapabilityRequirement(ELYTRON_TLS_SUBSYSTEM_CAPABILITY_NAME, r.isDynamicallyNamed() ? r.getDynamicName(pathValue) : r.getName(), null); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,10 @@ | |
|
||
import static org.jboss.as.controller.OperationContext.Stage.RUNTIME; | ||
import static org.jboss.as.server.deployment.Phase.DEPENDENCIES; | ||
import static org.jboss.as.server.deployment.Phase.STRUCTURE; | ||
import static org.jboss.as.server.deployment.Phase.STRUCTURE_ELYTRON_EXPRESSION_RESOLVER; | ||
import static org.jboss.as.server.deployment.Phase.CONFIGURE_DEFAULT_SSL_CONTEXT; | ||
import static org.jboss.as.server.deployment.Phase.CONFIGURE_MODULE; | ||
import static org.wildfly.extension.elytron.tls.subsystem.Capabilities.ELYTRON_TLS_RUNTIME_CAPABILITY; | ||
import static org.wildfly.extension.elytron.tls.subsystem.Capabilities.PROVIDERS_CAPABILITY; | ||
import static org.wildfly.extension.elytron.tls.subsystem.Capabilities.SSL_CONTEXT_CAPABILITY; | ||
|
@@ -66,9 +70,11 @@ | |
import org.jboss.msc.service.ServiceTarget; | ||
import org.wildfly.extension.elytron.tls.subsystem._private.ElytronTLSLogger; | ||
import org.wildfly.extension.elytron.tls.subsystem.deployment.DependencyProcessor; | ||
import org.wildfly.extension.elytron.tls.subsystem.expression.DeploymentExpressionResolverProcessor; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Kabir Khan</a> | ||
* @author <a href="mailto:[email protected]">Cameron Rodriguez</a> | ||
*/ | ||
public class ElytronTlsSubsystemDefinition extends PersistentResourceDefinition { | ||
|
||
|
@@ -254,12 +260,21 @@ protected void performBoottime(OperationContext context, ModelNode operation, Mo | |
serviceBuilder.setInstance(defaultSSLContextService).install(); | ||
} | ||
|
||
context.addStep(new AbstractDeploymentChainStep() { | ||
public void execute(DeploymentProcessorTarget processorTarget) { | ||
final int DEPENDENCIES_TEMPLATE = 6304; | ||
processorTarget.addDeploymentProcessor(ElytronTlsExtension.SUBSYSTEM_NAME, DEPENDENCIES, DEPENDENCIES_TEMPLATE, new DependencyProcessor()); | ||
} | ||
}, RUNTIME); | ||
if(context.isNormalServer()){ | ||
context.addStep(new AbstractDeploymentChainStep() { | ||
@Override | ||
public void execute(DeploymentProcessorTarget processorTarget) { | ||
final int DEPENDENCIES_ELYTRON_TLS = 0x0C60; | ||
final int STRUCTURE_ELYTRON_TLS_EXPRESSION_RESOLVER = 0x0490; | ||
|
||
processorTarget.addDeploymentProcessor(ElytronTlsExtension.SUBSYSTEM_NAME, STRUCTURE, STRUCTURE_ELYTRON_TLS_EXPRESSION_RESOLVER, new DeploymentExpressionResolverProcessor()); | ||
processorTarget.addDeploymentProcessor(ElytronTlsExtension.SUBSYSTEM_NAME, DEPENDENCIES, DEPENDENCIES_ELYTRON_TLS, new DependencyProcessor()); | ||
if (defaultSSLContext != null) { | ||
processorTarget.addDeploymentProcessor(ElytronTlsExtension.SUBSYSTEM_NAME, CONFIGURE_MODULE, CONFIGURE_DEFAULT_SSL_CONTEXT, new SSLContextDependencyProcessor()); | ||
} | ||
} | ||
}, RUNTIME); | ||
} | ||
|
||
ElytronTLSLogger.LOGGER.activatingSubsystem(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,10 @@ | |
import org.jboss.as.controller.PersistentResourceXMLParser; | ||
|
||
/** | ||
* A parser for the Elytron TLS subsystem. | ||
* | ||
* @author <a href="mailto:[email protected]">Kabir Khan</a> | ||
* @author <a href="mailto:[email protected]">Cameron Rodriguez</a> | ||
*/ | ||
public class ElytronTlsSubsystemParser_1_0 extends PersistentResourceXMLParser { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.