Saml2 Core upgrade fails when upgraded spring-security-saml2-core from 1.0.10.RELEASE to 2.0.0.M31

Viewed 462

I recently tried to upgrade saml2-core from 1.0.10 to 2.0.0.M31. When I tried building the project it fails with many "cannot find symbol" and "package does not exists" exceptions.

[ERROR] /C:/restproject/restsecurity/restsaml2/src/main/java/security/entry/AbstractSaml2AuthEntryPoint.java:[33,99] cannot find symbol
  symbol:   class SAMLEntryPoint
  location: package org.springframework.security.saml
[ERROR] /C:/restproject/restsecurity/restsaml2/src/main/java/security/binding/RestHTTPArtifactEncoder.java:[35,46] cannot find symbol
  symbol: class BaseSAML2MessageEncoder
[ERROR] /C:/restproject/restsecurity/restsaml2/src/main/java/security/discovery/Saml2AuthDiscovery.java:[16,41] cannot find symbol
  symbol:   class SAMLDiscovery
  location: package org.springframework.security.saml
[ERROR] /C:/restproject/restsecurity/restsaml2/src/main/java/security/ticket/Saml2UserDetails.java:[33,34] cannot find symbol
  symbol:   class SAMLCredential
  location: package org.springframework.security.saml

When I compared the package structure of both the version the structure and classes are different which is why It cannot find the required classes. What are replacement classes for these or is there any other new jar introduced which contains these missing classes.

1 Answers

So I found this issue looking for something else, but I think I can point you in the right direction here.

So in this commit, you can see that some of the classes that your error mentions. The classes missing their symbols have been deleted from the project.

It appears they have been deleted in a "clean up" commit after implementing OpenSAML 3.3 into the spring SAML extension for version 2.0.0-M1. So if you upgraded to 2.0.0-M1, I'd assume you get the same errors, which you can confirm.

I'd assume you will have to re-implement your code to work with this version of the Spring SAML extension 2.0.0-M31. Although, you should really be using the Spring security core SAML libraries and not the extension, since the extension is considered "end of life". Either way, you will need to re-implement your code.

Note: I've not seen any document or guide on how to migrate from version 1.0.10 to any version of 2.0. There is a request for a guide here on the extensions github and another here on the integrated spring security core github.

Related