Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFCORE-6802 [Preview] OCSP stapling support #5999

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions elytron/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@
<exclude>jacc-with-providers.xml</exclude>
<exclude>legacy*.xml</exclude>
<exclude>elytron-subsystem-community*.xml</exclude>
<exclude>elytron-subsystem-preview*.xml</exclude>
</excludes>
<systemId>src/main/resources/schema/wildfly-elytron_18_0.xsd</systemId>
</validationSet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/
interface ElytronDescriptionConstants {

String ACCEPT_OCSP_STAPLING = "accept-ocsp-stapling";
String ACCOUNT_KEY = "account-key";
String ACTION = "action";
String ACTIVE_SESSION_COUNT = "active-session-count";
Expand Down Expand Up @@ -73,6 +74,8 @@ interface ElytronDescriptionConstants {
String BCRYPT_MAPPER = "bcrypt-mapper";

String CAA_IDENTITIES = "caa-identities";
String CACHE_SIZE = "cache-size";
String CACHE_LIFETIME = "cache-lifetime";
String CACHING_REALM = "caching-realm";
String CASE_PRINCIPAL_TRANSFORMER = "case-principal-transformer";
String CALLBACK_HANDLER = "callback-handler";
Expand Down Expand Up @@ -246,6 +249,7 @@ interface ElytronDescriptionConstants {
String IDENTITY_MAPPING = "identity-mapping";
String IDENTITY_REALM = "identity-realm";
String IGNORE_UNAVAILABLE_REALMS = "ignore-unavailable-realms";
String IGNORE_EXTENSIONS = "ignore-extensions";
String IMPLEMENTATION = "implementation";
String IMPLEMENTATION_PROPERTIES = "implementation-properties";
String IMPORT_CERTIFICATE = "import-certificate";
Expand Down Expand Up @@ -366,6 +370,8 @@ interface ElytronDescriptionConstants {
String OBTAIN_CERTIFICATE = "obtain-certificate";
String OBTAIN_KERBEROS_TICKET = "obtain-kerberos-ticket";
String OCSP = "ocsp";
String OCSP_STAPLING = "ocsp-stapling";
String OCSP_STAPLING_SOFT_FAIL = "ocsp-stapling-soft-fail";
String OID = "oid";
String ONLY_LEAF_CERT = "only-leaf-cert";
String OPERATIONS = "operations";
Expand Down Expand Up @@ -467,6 +473,9 @@ interface ElytronDescriptionConstants {
String RESPONDER = "responder";
String RESPONDER_CERTIFICATE = "responder-certificate";
String RESPONDER_KEYSTORE = "responder-keystore";
String RESPONDER_OVERRIDE = "responder-override";
String RESPONDER_URI = "responder-uri";
String RESPONSE_TIMEOUT = "response-timeout";
String REVERSE = "reverse";
String REVOKE_CERTIFICATE = "revoke-certificate";
String RIGHT = "right";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ public class ElytronExtension implements Extension {
static final ModelVersion ELYTRON_17_0_0 = ModelVersion.create(17);
static final ModelVersion ELYTRON_18_0_0 = ModelVersion.create(18);
static final ModelVersion ELYTRON_19_0_0 = ModelVersion.create(19);
static final ModelVersion ELYTRON_20_0_0 = ModelVersion.create(20);

private static final ModelVersion ELYTRON_CURRENT = ELYTRON_19_0_0;
private static final ModelVersion ELYTRON_CURRENT = ELYTRON_20_0_0;

static final String ISO_8601_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ public enum ElytronSubsystemSchema implements PersistentSubsystemSchema<ElytronS
VERSION_17_0(17),
VERSION_18_0(18),
VERSION_18_0_COMMUNITY(18, Stability.COMMUNITY),
VERSION_18_0_PREVIEW(18, Stability.PREVIEW),
;
static final Map<Stability, ElytronSubsystemSchema> CURRENT = Feature.map(EnumSet.of(VERSION_18_0, VERSION_18_0_COMMUNITY));
static final Map<Stability, ElytronSubsystemSchema> CURRENT = Feature.map(EnumSet.of(VERSION_18_0, VERSION_18_0_COMMUNITY, VERSION_18_0_PREVIEW));

private final VersionedNamespace<IntVersion, ElytronSubsystemSchema> namespace;

Expand Down Expand Up @@ -192,7 +193,9 @@ private void addCredentialStoreParser(PersistentResourceXMLDescription.Persisten

private void addTlsParser(PersistentResourceXMLDescription.PersistentResourceXMLBuilder builder) {
TlsParser tlsParser = new TlsParser();
if (this.since(ElytronSubsystemSchema.VERSION_18_0_COMMUNITY) && this.enables(getDynamicClientSSLContextDefinition())) {
if (this.since(ElytronSubsystemSchema.VERSION_18_0_PREVIEW) && this.enables(SSLDefinitions.OCSP_STAPLING)) {
builder.addChild(tlsParser.tlsParserPreview_18_0);
} else if (this.since(ElytronSubsystemSchema.VERSION_18_0_COMMUNITY) && this.enables(getDynamicClientSSLContextDefinition())) {
builder.addChild(tlsParser.tlsParserCommunity_18_0);
} else if (this.since(ElytronSubsystemSchema.VERSION_14_0)) {
builder.addChild(tlsParser.tlsParser_14_0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ public String getSubsystemName() {
public void registerTransformers(SubsystemTransformerRegistration registration) {
ChainedTransformationDescriptionBuilder chainedBuilder = TransformationDescriptionBuilder.Factory.createChainedSubystemInstance(registration.getCurrentSubsystemVersion());

// 20.0.0 (WildFly 34) to 19.0.0 (WildFly 32)
from20(chainedBuilder);
// 19.0.0 (WildFly 32) to 18.0.0 (WildFly 29)
from19(chainedBuilder);
// 18.0.0 (WildFly 29) to 17.0.0 (WildFly 28)
Expand Down Expand Up @@ -145,10 +147,15 @@ public void registerTransformers(SubsystemTransformerRegistration registration)
// 2.0.0 (WildFly 12) to 1.2.0, (WildFly 11 and EAP 7.1.0)
from2(chainedBuilder);

chainedBuilder.buildAndRegister(registration, new ModelVersion[] { ELYTRON_18_0_0, ELYTRON_17_0_0, ELYTRON_16_0_0, ELYTRON_15_1_0, ELYTRON_15_0_0, ELYTRON_14_0_0, ELYTRON_13_0_0, ELYTRON_12_0_0, ELYTRON_11_0_0, ELYTRON_10_0_0, ELYTRON_9_0_0,
chainedBuilder.buildAndRegister(registration, new ModelVersion[] { ELYTRON_19_0_0, ELYTRON_18_0_0, ELYTRON_17_0_0, ELYTRON_16_0_0, ELYTRON_15_1_0, ELYTRON_15_0_0, ELYTRON_14_0_0, ELYTRON_13_0_0, ELYTRON_12_0_0, ELYTRON_11_0_0, ELYTRON_10_0_0, ELYTRON_9_0_0,
ELYTRON_8_0_0, ELYTRON_7_0_0, ELYTRON_6_0_0, ELYTRON_5_0_0, ELYTRON_4_0_0, ELYTRON_3_0_0, ELYTRON_2_0_0, ELYTRON_1_2_0 });
}

private static void from20(ChainedTransformationDescriptionBuilder chainedBuilder) {
ResourceTransformationDescriptionBuilder builder = chainedBuilder.createBuilder(ELYTRON_19_0_0, ELYTRON_18_0_0);

}

private static void from19(ChainedTransformationDescriptionBuilder chainedBuilder) {
ResourceTransformationDescriptionBuilder builder = chainedBuilder.createBuilder(ELYTRON_19_0_0, ELYTRON_18_0_0);

Expand Down
Loading
Loading