-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into WFCORE-7094
- Loading branch information
Showing
119 changed files
with
646 additions
and
213 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
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
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
26 changes: 26 additions & 0 deletions
26
...urces/modules/system/layers/base/org/wildfly/security/elytron-dynamic-ssl/main/module.xml
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
~ Copyright The WildFly Authors | ||
~ SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
<module xmlns="urn:jboss:module:1.9" name="org.wildfly.security.elytron-dynamic-ssl"> | ||
|
||
<properties> | ||
<property name="jboss.api" value="private"/> | ||
<property name="jboss.stability" value="community"/> | ||
</properties> | ||
|
||
<resources> | ||
<artifact name="${org.wildfly.security:wildfly-elytron-dynamic-ssl}"/> | ||
</resources> | ||
|
||
<dependencies> | ||
<module name="java.logging"/> | ||
<module name="org.jboss.logging" /> | ||
<module name="org.jboss.logmanager" /> | ||
<module name="org.wildfly.security.elytron-base"/> | ||
<module name="org.wildfly.common"/> | ||
<module name="org.wildfly.client.config"/> | ||
</dependencies> | ||
</module> |
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
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
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 |
---|---|---|
|
@@ -14,58 +14,89 @@ | |
import org.jboss.as.core.model.bridge.impl.LegacyControllerKernelServicesProxy; | ||
import org.jboss.as.core.model.test.LegacyModelInitializerEntry; | ||
import org.jboss.as.model.test.ModelTestOperationValidatorFilter; | ||
import org.jboss.as.version.Stability; | ||
import org.jboss.dmr.ModelNode; | ||
|
||
/** | ||
* | ||
* @author <a href="[email protected]">Kabir Khan</a> | ||
*/ | ||
public class ScopedKernelServicesBootstrap { | ||
Stability stability; | ||
ClassLoader legacyChildFirstClassLoader; | ||
ClassLoaderObjectConverter objectConverter; | ||
|
||
public ScopedKernelServicesBootstrap(ClassLoader legacyChildFirstClassLoader) { | ||
public ScopedKernelServicesBootstrap(ClassLoader legacyChildFirstClassLoader, Stability stability) { | ||
this.legacyChildFirstClassLoader = legacyChildFirstClassLoader; | ||
this.objectConverter = new ClassLoaderObjectConverterImpl(this.getClass().getClassLoader(), legacyChildFirstClassLoader); | ||
this.stability = stability; | ||
} | ||
|
||
|
||
public LegacyControllerKernelServicesProxy createKernelServices(List<ModelNode> bootOperations, ModelTestOperationValidatorFilter validateOpsFilter, ModelVersion legacyModelVersion, List<LegacyModelInitializerEntry> modelInitializerEntries) throws Exception { | ||
|
||
Object childClassLoaderKernelServices = createChildClassLoaderKernelServices(bootOperations, validateOpsFilter, legacyModelVersion, modelInitializerEntries); | ||
return new LegacyControllerKernelServicesProxy(legacyChildFirstClassLoader, childClassLoaderKernelServices, objectConverter); | ||
} | ||
|
||
private Object createChildClassLoaderKernelServices(List<ModelNode> bootOperations, ModelTestOperationValidatorFilter validateOpsFilter, ModelVersion legacyModelVersion, List<LegacyModelInitializerEntry> modelInitializerEntries){ | ||
private Object createChildClassLoaderKernelServices(List<ModelNode> bootOperations, ModelTestOperationValidatorFilter validateOpsFilter, ModelVersion legacyModelVersion, List<LegacyModelInitializerEntry> modelInitializerEntries) { | ||
try { | ||
Class<?> clazz = legacyChildFirstClassLoader.loadClass(ChildFirstClassLoaderKernelServicesFactory.class.getName()); | ||
List<Object> convertedBootOps = getConvertedBootOps(bootOperations); | ||
List<Object> convertedModelInitializerEntries = convertModelInitializer(modelInitializerEntries); | ||
|
||
Method m = clazz.getMethod("create", | ||
List.class, | ||
legacyChildFirstClassLoader.loadClass(ModelTestOperationValidatorFilter.class.getName()), | ||
legacyChildFirstClassLoader.loadClass(ModelVersion.class.getName()), | ||
List.class); | ||
|
||
List<Object> convertedBootOps = new ArrayList<Object>(); | ||
for (int i = 0 ; i < bootOperations.size() ; i++) { | ||
ModelNode node = bootOperations.get(i); | ||
if (node != null) { | ||
convertedBootOps.add(objectConverter.convertModelNodeToChildCl(node)); | ||
} | ||
} | ||
Object convertedValidationFilter = objectConverter.convertValidateOperationsFilterToChildCl(validateOpsFilter); | ||
Object convertedLegacyModelVersion = objectConverter.convertModelVersionToChildCl(legacyModelVersion); | ||
|
||
List<Object> convertedModelInitializerEntries = null; | ||
if (modelInitializerEntries != null) { | ||
convertedModelInitializerEntries = new ArrayList<Object>(); | ||
for (LegacyModelInitializerEntry entry : modelInitializerEntries) { | ||
convertedModelInitializerEntries.add(objectConverter.convertLegacyModelInitializerEntryToChildCl(entry)); | ||
} | ||
} | ||
if (!Stability.DEFAULT.equals(stability)) { | ||
Method m = clazz.getMethod("create", | ||
List.class, | ||
legacyChildFirstClassLoader.loadClass(ModelTestOperationValidatorFilter.class.getName()), | ||
legacyChildFirstClassLoader.loadClass(ModelVersion.class.getName()), | ||
List.class, | ||
String.class); | ||
|
||
return m.invoke(null, convertedBootOps, objectConverter.convertValidateOperationsFilterToChildCl(validateOpsFilter), objectConverter.convertModelVersionToChildCl(legacyModelVersion), convertedModelInitializerEntries); | ||
return m.invoke(null, | ||
convertedBootOps, | ||
convertedValidationFilter, | ||
convertedLegacyModelVersion, | ||
convertedModelInitializerEntries, | ||
stability.toString()); | ||
} else { | ||
Method m = clazz.getMethod("create", | ||
List.class, | ||
legacyChildFirstClassLoader.loadClass(ModelTestOperationValidatorFilter.class.getName()), | ||
legacyChildFirstClassLoader.loadClass(ModelVersion.class.getName()), | ||
List.class); | ||
|
||
return m.invoke(null, | ||
convertedBootOps, | ||
convertedValidationFilter, | ||
convertedLegacyModelVersion, | ||
convertedModelInitializerEntries); | ||
} | ||
} catch (Exception e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
|
||
private List<Object> convertModelInitializer(List<LegacyModelInitializerEntry> modelInitializerEntries) { | ||
List<Object> converted = null; | ||
if (modelInitializerEntries != null) { | ||
converted = new ArrayList<>(); | ||
for (LegacyModelInitializerEntry entry : modelInitializerEntries) { | ||
converted.add(objectConverter.convertLegacyModelInitializerEntryToChildCl(entry)); | ||
} | ||
} | ||
return converted; | ||
} | ||
|
||
private List<Object> getConvertedBootOps(List<ModelNode> bootOperations) { | ||
List<Object> converted = new ArrayList<>(); | ||
for (ModelNode node : bootOperations) { | ||
if (node != null) { | ||
converted.add(objectConverter.convertModelNodeToChildCl(node)); | ||
} | ||
} | ||
return converted; | ||
} | ||
} | ||
|
Oops, something went wrong.