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

Update the Keycloak SAML adapter subsystem to no longer use the AttributeDefinition#getAttributeMarshaller method #22593

Closed
2 tasks done
fjuma opened this issue Aug 21, 2023 · 0 comments · Fixed by #22824
Closed
2 tasks done
Labels
area/adapter/jee-saml kind/bug Categorizes a PR related to a bug
Milestone

Comments

@fjuma
Copy link
Contributor

fjuma commented Aug 21, 2023

Before reporting an issue

Area

adapter/jee-saml

Describe the bug

The Keycloak SAML adapter subsystem currently references the AttributeDefinition#getAttributeMarshaller method that has been removed in WildFly Core 21.1.0.Final and later.

This means that attempting to use the keycloak-saml-adapter-galleon-pack with WildFly 29 and later results in the following exception when attempting to add subsystem resources:

 java.lang.NoSuchMethodError: 'org.jboss.as.controller.AttributeMarshaller org.jboss.as.controller.SimpleAttributeDefinition.getAttributeMarshaller()'
at org.keycloak.keycloak-saml-wildfly-jakarta-subsystem@22.0.1//org.keycloak.subsystem.adapter.saml.extension.KeycloakSubsystemParser.writeSps(KeycloakSubsystemParser.java:501)
at org.keycloak.keycloak-saml-wildfly-jakarta-subsystem@22.0.1//org.keycloak.subsystem.adapter.saml.extension.KeycloakSubsystemParser.writeSecureDeployment(KeycloakSubsystemParser.java:487)
at org.keycloak.keycloak-saml-wildfly-jakarta-subsystem@22.0.1//org.keycloak.subsystem.adapter.saml.extension.KeycloakSubsystemParser.writeContent(KeycloakSubsystemParser.java:474)

KeycloakSubsystemParser needs to be updated to make use of the AttributeDefinition#getMarshaller method instead.

Version

22.0.1

Expected behavior

It should be possible to successfully use the keycloak-saml-adapter-galleon-pack with WildFly 29 and later.

Actual behavior

It's currently not possible to use the keycloak-saml-adapter-galleon-pack with WildFly 29 and later when specifying the configuration required to secure SAML applications via the Keycloak SAML adapter subsystem.

How to Reproduce?

Using galleon.sh, attempt to provision a WildFly 29 server using the Keycloak SAML adapter feature pack:

galleon.sh install wildfly:current --layers=web-server,core-tools --dir=wildfly
galleon.sh install org.keycloak:keycloak-saml-adapter-galleon-pack:22.0.1 --layers=keycloak-client-saml --dir=wildfly

Execute the following WildFly CLI commands:

/subsystem=keycloak-saml/secure-deployment=saml-app.war:add()
/subsystem=keycloak-saml/secure-deployment=saml-app.war/SP=saml-app:add(sslPolicy=EXTERNAL)

The following error will occur:

 java.lang.NoSuchMethodError: 'org.jboss.as.controller.AttributeMarshaller org.jboss.as.controller.SimpleAttributeDefinition.getAttributeMarshaller()'
at org.keycloak.keycloak-saml-wildfly-jakarta-subsystem@22.0.1//org.keycloak.subsystem.adapter.saml.extension.KeycloakSubsystemParser.writeSps(KeycloakSubsystemParser.java:501)
at org.keycloak.keycloak-saml-wildfly-jakarta-subsystem@22.0.1//org.keycloak.subsystem.adapter.saml.extension.KeycloakSubsystemParser.writeSecureDeployment(KeycloakSubsystemParser.java:487)
at org.keycloak.keycloak-saml-wildfly-jakarta-subsystem@22.0.1//org.keycloak.subsystem.adapter.saml.extension.KeycloakSubsystemParser.writeContent(KeycloakSubsystemParser.java:474)

Anything else?

I will submit a PR to fix this.

@fjuma fjuma added kind/bug Categorizes a PR related to a bug status/triage labels Aug 21, 2023
pedroigor pushed a commit to fjuma/keycloak that referenced this issue Aug 22, 2023
@pedroigor pedroigor added this to the 22.0.2 milestone Aug 29, 2023
pskopek pushed a commit to pskopek/keycloak that referenced this issue Sep 7, 2023
…buteDefinition#getAttributeMarshaller method

Closes keycloak#22593

Signed-off-by: Peter Skopek <pskopek@redhat.com>
ahus1 pushed a commit that referenced this issue Sep 7, 2023
…buteDefinition#getAttributeMarshaller method

Closes #22593

Signed-off-by: Peter Skopek <pskopek@redhat.com>
@ghost ghost removed the status/triage label Sep 7, 2023
pskopek pushed a commit to pskopek/keycloak that referenced this issue Sep 7, 2023
…buteDefinition#getAttributeMarshaller method

Closes keycloak#22593

Signed-off-by: Peter Skopek <pskopek@redhat.com>
(cherry picked from commit ec08a7b)
ahus1 pushed a commit that referenced this issue Sep 7, 2023
…buteDefinition#getAttributeMarshaller method

Closes #22593

Signed-off-by: Peter Skopek <pskopek@redhat.com>
(cherry picked from commit ec08a7b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/adapter/jee-saml kind/bug Categorizes a PR related to a bug
Projects
None yet
2 participants