SAML Adapter fix for EAP8 and WF29
Signed-off-by: Peter Skopek <pskopek@redhat.com>
This commit is contained in:
parent
f086e008dc
commit
ef272f7668
12 changed files with 133 additions and 47 deletions
|
@ -64,7 +64,7 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wildfly</groupId>
|
||||
<groupId>${ee.maven.groupId}</groupId>
|
||||
<artifactId>wildfly-web-common</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -36,7 +36,7 @@ abstract class AbstractAdapterConfigurationAddHandler extends AbstractAddStepHan
|
|||
private final boolean elytronEnabled;
|
||||
|
||||
AbstractAdapterConfigurationAddHandler(RuntimeCapability<Void> runtimeCapability, List<SimpleAttributeDefinition> attributes) {
|
||||
super(runtimeCapability, attributes);
|
||||
super(attributes);
|
||||
elytronEnabled = runtimeCapability != null;
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wildfly</groupId>
|
||||
<groupId>${ee.maven.groupId}</groupId>
|
||||
<artifactId>wildfly-web-common</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wildfly</groupId>
|
||||
<groupId>${ee.maven.groupId}</groupId>
|
||||
<artifactId>wildfly-web-common</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -498,7 +498,7 @@ class KeycloakSubsystemParser implements XMLStreamConstants, XMLElementReader<Li
|
|||
writer.writeAttribute(Constants.XML.ENTITY_ID, sp.getName());
|
||||
ModelNode spAttributes = sp.getValue();
|
||||
for (SimpleAttributeDefinition attr : ServiceProviderDefinition.ATTRIBUTES) {
|
||||
attr.getAttributeMarshaller().marshallAsAttribute(attr, spAttributes, false, writer);
|
||||
attr.marshallAsAttribute(spAttributes, false, writer);
|
||||
}
|
||||
writeKeys(writer, spAttributes.get(Constants.Model.KEY));
|
||||
writePrincipalNameMapping(writer, spAttributes);
|
||||
|
@ -521,7 +521,7 @@ class KeycloakSubsystemParser implements XMLStreamConstants, XMLElementReader<Li
|
|||
|
||||
ModelNode idpAttributes = idp.getValue();
|
||||
for (SimpleAttributeDefinition attr : IdentityProviderDefinition.ATTRIBUTES) {
|
||||
attr.getAttributeMarshaller().marshallAsAttribute(attr, idpAttributes, false, writer);
|
||||
attr.marshallAsAttribute(idpAttributes, false, writer);
|
||||
}
|
||||
|
||||
writeSingleSignOn(writer, idpAttributes.get(Constants.Model.SINGLE_SIGN_ON));
|
||||
|
@ -539,7 +539,7 @@ class KeycloakSubsystemParser implements XMLStreamConstants, XMLElementReader<Li
|
|||
}
|
||||
writer.writeStartElement(Constants.XML.SINGLE_SIGN_ON);
|
||||
for (SimpleAttributeDefinition attr : SingleSignOnDefinition.ATTRIBUTES) {
|
||||
attr.getAttributeMarshaller().marshallAsAttribute(attr, model, false, writer);
|
||||
attr.marshallAsAttribute(model, false, writer);
|
||||
}
|
||||
writer.writeEndElement();
|
||||
}
|
||||
|
@ -550,7 +550,7 @@ class KeycloakSubsystemParser implements XMLStreamConstants, XMLElementReader<Li
|
|||
}
|
||||
writer.writeStartElement(Constants.XML.SINGLE_LOGOUT);
|
||||
for (SimpleAttributeDefinition attr : SingleLogoutDefinition.ATTRIBUTES) {
|
||||
attr.getAttributeMarshaller().marshallAsAttribute(attr, model, false, writer);
|
||||
attr.marshallAsAttribute(model, false, writer);
|
||||
}
|
||||
writer.writeEndElement();
|
||||
}
|
||||
|
@ -569,10 +569,10 @@ class KeycloakSubsystemParser implements XMLStreamConstants, XMLElementReader<Li
|
|||
|
||||
ModelNode keyAttributes = key.getValue();
|
||||
for (SimpleAttributeDefinition attr : KeyDefinition.ATTRIBUTES) {
|
||||
attr.getAttributeMarshaller().marshallAsAttribute(attr, keyAttributes, false, writer);
|
||||
attr.marshallAsAttribute(keyAttributes, false, writer);
|
||||
}
|
||||
for (SimpleAttributeDefinition attr : KeyDefinition.ELEMENTS) {
|
||||
attr.getAttributeMarshaller().marshallAsElement(attr, keyAttributes, false, writer);
|
||||
attr.marshallAsElement(keyAttributes, false, writer);
|
||||
}
|
||||
writeKeyStore(writer, keyAttributes.get(Constants.Model.KEY_STORE));
|
||||
|
||||
|
@ -599,7 +599,7 @@ class KeycloakSubsystemParser implements XMLStreamConstants, XMLElementReader<Li
|
|||
return;
|
||||
}
|
||||
writer.writeStartElement(Constants.XML.ALLOWED_CLOCK_SKEW);
|
||||
AllowedClockSkew.ALLOWED_CLOCK_SKEW_UNIT.getAttributeMarshaller().marshallAsAttribute(AllowedClockSkew.ALLOWED_CLOCK_SKEW_UNIT, allowedClockSkew, false, writer);
|
||||
AllowedClockSkew.ALLOWED_CLOCK_SKEW_UNIT.marshallAsAttribute(allowedClockSkew, false, writer);
|
||||
ModelNode allowedClockSkewValue = allowedClockSkew.get(Constants.Model.ALLOWED_CLOCK_SKEW_VALUE);
|
||||
char[] chars = allowedClockSkewValue.asString().toCharArray();
|
||||
writer.writeCharacters(chars, 0, chars.length);
|
||||
|
@ -612,7 +612,7 @@ class KeycloakSubsystemParser implements XMLStreamConstants, XMLElementReader<Li
|
|||
}
|
||||
writer.writeStartElement(Constants.XML.KEY_STORE);
|
||||
for (SimpleAttributeDefinition attr : KeyStoreDefinition.ATTRIBUTES) {
|
||||
attr.getAttributeMarshaller().marshallAsAttribute(attr, model, false, writer);
|
||||
attr.marshallAsAttribute(model, false, writer);
|
||||
}
|
||||
writePrivateKey(writer, model);
|
||||
writeCertificate(writer, model);
|
||||
|
@ -626,7 +626,7 @@ class KeycloakSubsystemParser implements XMLStreamConstants, XMLElementReader<Li
|
|||
}
|
||||
writer.writeStartElement(Constants.XML.CERTIFICATE);
|
||||
SimpleAttributeDefinition attr = KeyStoreCertificateDefinition.CERTIFICATE_ALIAS;
|
||||
attr.getAttributeMarshaller().marshallAsAttribute(attr, model, false, writer);
|
||||
attr.marshallAsAttribute(model, false, writer);
|
||||
writer.writeEndElement();
|
||||
}
|
||||
|
||||
|
@ -639,7 +639,7 @@ class KeycloakSubsystemParser implements XMLStreamConstants, XMLElementReader<Li
|
|||
}
|
||||
writer.writeStartElement(Constants.XML.PRIVATE_KEY);
|
||||
for (SimpleAttributeDefinition attr : KeyStorePrivateKeyDefinition.ATTRIBUTES) {
|
||||
attr.getAttributeMarshaller().marshallAsAttribute(attr, model, false, writer);
|
||||
attr.marshallAsAttribute(model, false, writer);
|
||||
}
|
||||
writer.writeEndElement();
|
||||
}
|
||||
|
|
|
@ -31,10 +31,6 @@
|
|||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<wildfly.version>27.0.0.Final</wildfly.version>
|
||||
<wildfly.build-tools.version>1.2.13.Final</wildfly.build-tools.version>
|
||||
<wildfly.core.version>19.0.0.Final</wildfly.core.version>
|
||||
|
||||
<feature-pack.resources.directory>${basedir}/../../saml-adapters/wildfly-adapter/wildfly-jakarta-modules/src/main/resources</feature-pack.resources.directory>
|
||||
<version.org.wildfly.galleon-plugins>6.4.0.Final</version.org.wildfly.galleon-plugins>
|
||||
<xmlFileSource>${basedir}/src/main/resources/licenses/keycloak/licenses.xml</xmlFileSource>
|
||||
|
@ -185,7 +181,7 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wildfly</groupId>
|
||||
<groupId>${ee.maven.groupId}</groupId>
|
||||
<artifactId>wildfly-ee-galleon-pack</artifactId>
|
||||
<version>${wildfly.version}</version>
|
||||
<type>zip</type>
|
||||
|
@ -261,4 +257,25 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>eap8-adapters</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>eap8-adapters</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.wildfly.galleon-plugins</groupId>
|
||||
<artifactId>wildfly-galleon-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<config-file>wildfly-feature-pack-build-eap.xml</config-file>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
|
@ -0,0 +1,38 @@
|
|||
<!--
|
||||
~ Copyright 2022 Red Hat, Inc.
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<build xmlns="urn:wildfly:feature-pack-build:3.1" producer="org.keycloak:keycloak-saml-adapter-galleon-pack">
|
||||
<dependencies>
|
||||
<dependency group-id="org.jboss.eap" artifact-id="wildfly-ee-galleon-pack">
|
||||
<name>org.jboss.eap:wildfly-ee-galleon-pack</name>
|
||||
<packages inherit="false">
|
||||
<exclude name="product.conf"/>
|
||||
</packages>
|
||||
<default-configs inherit="false"/>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<default-packages>
|
||||
<package name="modules.all"/>
|
||||
<package name="licenses"/>
|
||||
</default-packages>
|
||||
<generate-feature-specs>
|
||||
<extensions>
|
||||
<standalone>
|
||||
<extension>org.keycloak.keycloak-saml-adapter-subsystem</extension>
|
||||
</standalone>
|
||||
</extensions>
|
||||
</generate-feature-specs>
|
||||
</build>
|
|
@ -33,6 +33,11 @@
|
|||
|
||||
<properties>
|
||||
<keycloak.provisioning.xml>server-provisioning.xml</keycloak.provisioning.xml>
|
||||
|
||||
<!-- Wildfly Community Related Properties -->
|
||||
|
||||
<!-- EAP8 Related Properties -->
|
||||
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
|
@ -42,7 +47,6 @@
|
|||
<module>galleon-feature-packs</module>
|
||||
<module>licenses-common</module>
|
||||
<module>maven-plugins</module>
|
||||
<!--<module>server-overlay</module>-->
|
||||
</modules>
|
||||
|
||||
<repositories>
|
||||
|
@ -73,18 +77,6 @@
|
|||
</repositories>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>wildfly-dist</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>includeWildFly</name>
|
||||
</property>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>galleon-feature-packs</module>
|
||||
<module>server-dist</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>distribution-downloads</id>
|
||||
<modules>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<!-- Needed for externalizers in package "org.keycloak.models.sessions.infinispan.entities.wildfly" .
|
||||
Hopefully can be removed once we start to use the protobuf marshalling -->
|
||||
<dependency>
|
||||
<groupId>org.wildfly</groupId>
|
||||
<groupId>${ee.maven.groupId}</groupId>
|
||||
<artifactId>wildfly-clustering-infinispan-marshalling</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
|
59
pom.xml
59
pom.xml
|
@ -48,14 +48,20 @@
|
|||
|
||||
<project.build-time>${timestamp}</project.build-time>
|
||||
|
||||
<wildfly.version>27.0.1.Final</wildfly.version>
|
||||
<wildfly.build-tools.version>1.2.13.Final</wildfly.build-tools.version>
|
||||
<wildfly.core.version>19.0.1.Final</wildfly.core.version>
|
||||
<!-- Upstream WildFly Versions -->
|
||||
<upstream.wildfly.version>27.0.1.Final</upstream.wildfly.version>
|
||||
<upstream.wildfly.build-tools.version>1.2.13.Final</upstream.wildfly.build-tools.version>
|
||||
<upstream.wildfly.core.version>21.1.0.Final</upstream.wildfly.core.version>
|
||||
|
||||
<!-- Downstream Builds WildFly Versions Override -->
|
||||
<eap8.version>8.0.0.GA-redhat-00007</eap8.version> <!-- G:A = org.jboss.eap:jboss-eap-parent -->
|
||||
<eap8.wildfly.version>${eap8.version}</eap8.wildfly.version>
|
||||
<eap8.wildfly.core.version>21.1.0.Final</eap8.wildfly.core.version>
|
||||
<eap8.wildfly.build-tools.version>1.2.13.Final</eap8.wildfly.build-tools.version>
|
||||
|
||||
<wildfly.jakarta.adapters>true</wildfly.jakarta.adapters>
|
||||
<apache.httpcomponents.fuse.version>4.5.2</apache.httpcomponents.fuse.version>
|
||||
<apache.httpcomponents.httpcore.fuse.version>4.4.4</apache.httpcomponents.httpcore.fuse.version>
|
||||
<ee.maven.groupId>org.wildfly</ee.maven.groupId>
|
||||
<ee.maven.version>${wildfly.version}</ee.maven.version>
|
||||
|
||||
<jboss.as.version>7.2.0.Final</jboss.as.version>
|
||||
<jboss.as.subsystem.test.version>7.5.22.Final-redhat-1</jboss.as.subsystem.test.version>
|
||||
|
@ -198,8 +204,8 @@
|
|||
<org.apache.kerby.kerby-asn1.version>2.0.3</org.apache.kerby.kerby-asn1.version>
|
||||
|
||||
<!-- WildFly Galleon Build related properties -->
|
||||
<org.wildfly.galleon-plugins.version>5.2.7.Final</org.wildfly.galleon-plugins.version>
|
||||
<org.jboss.galleon.version>4.2.8.Final</org.jboss.galleon.version>
|
||||
<org.wildfly.galleon-plugins.version>6.4.2.Final</org.wildfly.galleon-plugins.version>
|
||||
<org.jboss.galleon.version>5.1.0.Final</org.jboss.galleon.version>
|
||||
|
||||
<!-- Galleon -->
|
||||
<galleon.fork.embedded>true</galleon.fork.embedded>
|
||||
|
@ -723,7 +729,7 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wildfly</groupId>
|
||||
<groupId>${ee.maven.groupId}</groupId>
|
||||
<artifactId>wildfly-undertow</artifactId>
|
||||
<version>${wildfly.version}</version>
|
||||
<scope>test</scope>
|
||||
|
@ -794,12 +800,12 @@
|
|||
<version>${wildfly.core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wildfly</groupId>
|
||||
<groupId>${ee.maven.groupId}</groupId>
|
||||
<artifactId>wildfly-web-common</artifactId>
|
||||
<version>${wildfly.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wildfly</groupId>
|
||||
<groupId>${ee.maven.groupId}</groupId>
|
||||
<artifactId>wildfly-clustering-infinispan-marshalling</artifactId>
|
||||
<version>${wildfly.version}</version>
|
||||
</dependency>
|
||||
|
@ -1946,6 +1952,39 @@
|
|||
</modules>
|
||||
</profile>
|
||||
|
||||
<!-- Profile to activate EAP8 Adapters Build -->
|
||||
<profile>
|
||||
<id>eap8-adapters</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>eap8-adapters</name>
|
||||
</property>
|
||||
</activation>
|
||||
<properties>
|
||||
<ee.maven.groupId>org.jboss.eap</ee.maven.groupId>
|
||||
<ee.maven.version>${eap8.version}</ee.maven.version>
|
||||
<wildfly.version>${eap8.version}</wildfly.version>
|
||||
<wildfly.build-tools.version>${eap8.wildfly.build-tools.version}</wildfly.build-tools.version>
|
||||
<wildfly.core.version>${eap8.wildfly.core.version}</wildfly.core.version>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>upstream-adapters</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>!eap8-adapters</name>
|
||||
</property>
|
||||
</activation>
|
||||
<properties>
|
||||
<ee.maven.groupId>org.wildfly</ee.maven.groupId>
|
||||
<ee.maven.version>${upstream.wildfly.version}</ee.maven.version>
|
||||
<wildfly.version>${upstream.wildfly.version}</wildfly.version>
|
||||
<wildfly.build-tools.version>${upstream.wildfly.build-tools.version}</wildfly.build-tools.version>
|
||||
<wildfly.core.version>${upstream.wildfly.core.version}</wildfly.core.version>
|
||||
</properties>
|
||||
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>distribution</id>
|
||||
<modules>
|
||||
|
|
|
@ -30,13 +30,13 @@
|
|||
<name>App Server - Wildfly</name>
|
||||
|
||||
<properties>
|
||||
<wildfly.version>23.0.2.Final</wildfly.version>
|
||||
<wildfly.server.version>23.0.2.Final</wildfly.server.version>
|
||||
<app.server.jboss>wildfly</app.server.jboss>
|
||||
|
||||
<app.server.jboss.groupId>org.wildfly</app.server.jboss.groupId>
|
||||
<app.server.jboss.artifactId>wildfly-dist</app.server.jboss.artifactId>
|
||||
<app.server.jboss.version>${wildfly.version}</app.server.jboss.version>
|
||||
<app.server.jboss.unpacked.folder.name>wildfly-${wildfly.version}</app.server.jboss.unpacked.folder.name>
|
||||
<app.server.jboss.version>${wildfly.server.version}</app.server.jboss.version>
|
||||
<app.server.jboss.unpacked.folder.name>wildfly-${wildfly.server.version}</app.server.jboss.unpacked.folder.name>
|
||||
|
||||
<app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
|
||||
<app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
|
||||
|
|
|
@ -258,7 +258,7 @@
|
|||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.wildfly</groupId>
|
||||
<groupId>${ee.maven.groupId}</groupId>
|
||||
<artifactId>wildfly-undertow</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
|
Loading…
Reference in a new issue