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 to OpenSAML 5 #11658

Open
marcusdacoregio opened this issue Aug 2, 2022 · 17 comments
Open

Update to OpenSAML 5 #11658

marcusdacoregio opened this issue Aug 2, 2022 · 17 comments
Labels
type: dependency-upgrade A dependency upgrade

Comments

@marcusdacoregio
Copy link
Contributor

marcusdacoregio commented Aug 2, 2022

By removing OpenSAML3 support in Spring Security 6 we need to make sure that the OpenSAML dependency versions are updated and are compatible with JDK 17.

See:

@marcusdacoregio marcusdacoregio added the type: dependency-upgrade A dependency upgrade label Aug 2, 2022
@marcusdacoregio marcusdacoregio added this to the 6.0.0-M7 milestone Aug 2, 2022
@marcusdacoregio marcusdacoregio self-assigned this Aug 2, 2022
@marcusdacoregio marcusdacoregio modified the milestones: 6.0.0-M7, 6.0.x Aug 2, 2022
@marcusdacoregio
Copy link
Contributor Author

@phtyson can you help me understand how OpenSAML 4 is not working with Java 17 (based on this comment)? Our samples are running with Java 17 and Spring Security 6 and it seems to be working fine.

Perhaps a minimal, reproducible sample would be great to check that.

@leshalv
Copy link
Contributor

leshalv commented Oct 14, 2022

opensaml4 uses javax, while spring security6 uses Jakarta EE
@marcusdacoregio

@leshalv
Copy link
Contributor

leshalv commented Oct 14, 2022

I think opensaml5 should work better with springsecurity6

@marcusdacoregio
Copy link
Contributor Author

marcusdacoregio commented Oct 17, 2022

@leshalv I did not find the OpenSAML5 general availability release, can you help me to find it and understand how it would work better with Spring Security 6?

@leshalv
Copy link
Contributor

leshalv commented Oct 26, 2022

@leshalv I did not find the OpenSAML5 general availability release, can you help me to find it and understand how it would work better with Spring Security 6?

opensaml5 It is still under development, snapshot, Since the opensaml5 is based on Jakarta EE, it is more suitable for spring security6.

@leshalv
Copy link
Contributor

leshalv commented Nov 1, 2022

Pac4j has already started to support opensaml5, which I think is helpful for upgrading reference. pac4j-saml-opensamlv5

@marcusdacoregio marcusdacoregio changed the title Update OpenSAML dependency version Update to OpenSAML 5 May 2, 2023
@marcusdacoregio marcusdacoregio removed their assignment May 2, 2023
@marcusdacoregio marcusdacoregio removed this from the 6.0.x milestone May 2, 2023
@EugenMayer
Copy link

Opensaml 5.0 has finally been released, see

I'am currently not able to find any changelog at all, would be nice if someone could add those to the list of assets to work through for an possible adoption here.

@GDeen
Copy link

GDeen commented Sep 21, 2023

I don't see OpenSAML 5.0.0 in maven repository yet. I hope this gets available soon, as using spring boot 3 in combination with Java 17 and OpenSAML is an issue now.

@marcusdacoregio
Copy link
Contributor Author

marcusdacoregio commented Sep 21, 2023

@GDeen can you elaborate more on what’s the issue? Maybe with a sample?

@EugenMayer
Copy link

EugenMayer commented Sep 21, 2023

@GDeen you will never see any opensaml release in the maven repo, since those are not release to mvn at all. Since Shibooleth took over the development and maintenance, it is published only on their nexus. https://build.jc.net/maven/releases/org/opensaml/opensaml-parent/

Should you still use the versions from mvn - be aware, those are not only massively outdated but have severe security issues. Use https://build.shibboleth.net/maven/releases/ as your upstream. To my knowledge this is the official way to consume opensaml libs. Not sure i can find this in the spring security docs somewhere though.

@marcusdacoregio i do not think there needs to be an issue. We should follow up on the openSAML releases just to ensure people can use the maintained versions. Surely 4.x will receive updates for some time, maybe a year or more. But the road to 5 should be paved and established before 4 gets EOLed - right?

@GDeen
Copy link

GDeen commented Sep 21, 2023

Our issue is that spring boot 3 uses Jakarta EE over javax.servlet, see https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#jakarta-ee

OpenSAML 4.0 requires javax.servlet, see for example: AbstractHttpServletRequestMessageDecoder which requires you to pass a javax.servlet.http.HttpServletRequest

@wapkch
Copy link

wapkch commented Sep 22, 2023

Hi @marcusdacoregio Considering the following scenario, there is an application needs both Spring Security SAML service provider 6.x and SAML IdP, SAML IdP implementations like Shibboleth IdP 5 or CAS SAML IdP 7 (Java 17 and Spring 6 baseline) need OpenSAML 5, but Spring Security SAML is not compatiable with OpenSAML 5, so it don't work. We truely encountered this problem now.

@marcusdacoregio
Copy link
Contributor Author

Spring Security has a lot of tests and samples that assert that it works with OpenSAML 4. You may be using other components of OpenSAML that tie you to the javax.servlet package. Spring Security doesn't use any of those components. If you encounter any issues related to that, please put together a sample and file a separate ticket so we can take a look at that.

@GDeen
Copy link

GDeen commented Sep 25, 2023

We are indeed using other components of OpenSAML that tie us to the javax.servlet package. I do believe that this is a nuisance for many using OpenSAML though, because if in your application you wish to decode a SAML message using OpenSAML, then you may want to use org.opensaml.messaging.decoder.servlet.AbstractHttpServletRequestMessageDecoder or org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder

However, these expect javax.servlet.http.HttpServletRequest.

As of Spring boot 3, we need to use Jakarta EE over javax.servlet, see https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#jakarta-ee

We will, like others suggested, use OpenSAML 5.0 to tackle the issue (and hope/verify that it still works with Spring Security), but it would of course be nicer if OpenSAML 5.0 was supported by Spring Security.

@leshalv
Copy link
Contributor

leshalv commented Apr 22, 2024

Are there any updates planned at the moment? @marcusdacoregio

@OrangeDog
Copy link
Contributor

OrangeDog commented May 10, 2024

OpenSAML doesn't generally have release notes. The "changelog" for 5.0.0 is here but has no indication of what might be breaking.

I think you just have to email dev@shibboleth.net and ask. I already checked its (and announce@'s) archives.

@marcusdacoregio
Copy link
Contributor Author

Hi, @leshalv. There is no updates yet. I am not sure if we will update to a major version during a minor Spring Security version, we must see what it takes to do the update and if it will be transparent for users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: dependency-upgrade A dependency upgrade
Projects
None yet
Development

No branches or pull requests

6 participants