Skip to content

OpenSAML dependency is resolved from a 3rd party repository #11966

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

Closed
bclozel opened this issue Oct 6, 2022 · 12 comments
Closed

OpenSAML dependency is resolved from a 3rd party repository #11966

bclozel opened this issue Oct 6, 2022 · 12 comments
Assignees
Labels
in: saml2 An issue in SAML2 modules status: invalid An issue that we don't feel is valid type: bug A general bug

Comments

@bclozel
Copy link
Member

bclozel commented Oct 6, 2022

As of #10556, support for OpenSAML 3 has been removed.

Spring Boot is currently upgrading to Spring Security SNAPSHOTs and ran into a dependency resolution problem; Spring Security depends on org.opensaml:opensaml-core:4.1.1 but this version is not available on Maven Central. This dependency seems to be resolved on purpose from a 3rd party repository, https://build.shibboleth.net/nexus/content/repositories/releases/ (see d39f737).

All dependencies resolved by the Spring Boot build are constrained to Maven Central. We understand that this dependency is not published on Maven Central and there's probably a particular reason for that.

There are several ways to resolve this issue:

  1. Spring Boot can selectively use that 3rd party repository, constraining it for the org.opensalm groupId and only in selected places. Is the Spring Security build ensuring that only this dependency is being resolved from the shibboleth repository? This outcome would not help users to upgrade as we can't declare an artifact repository for them.
  2. Spring Security can downgrade to 4.0.1 and still remain compatible with 4.1.1; compatibility testing was performed already with 3.x so this could be a good middle ground where users would get a recent versions (a year old or so) without declaring a 3rd party dependency. This would make the upgrade experience easier.
@bclozel bclozel added status: waiting-for-triage An issue we've not yet triaged type: bug A general bug labels Oct 6, 2022
@sjohnr sjohnr added the in: saml2 An issue in SAML2 modules label Oct 6, 2022
@sjohnr sjohnr added this to the 6.0.0-RC1 milestone Oct 6, 2022
@rwinch
Copy link
Member

rwinch commented Oct 7, 2022

Spring Security should use the latest version of OpenSAML and bring it in by default, so it would seem that 1 would be the best option.

Shibboleth has documented their thoughts on Maven Central here https://shibboleth.atlassian.net/wiki/spaces/DEV/pages/1123844333/Use+of+Maven+Central#Publishing-to-Maven-Central

@wilkinsona
Copy link
Member

wilkinsona commented Oct 7, 2022

From the Shibboleth wiki:

However, Maven Central does require that all the dependencies of an artifact also be in Maven Central and that is currently not the case for some of the Shibboleth products. So, for now, the Shibboleth product artifacts will not be published to Maven Central.

If this is true, Spring Security will be unable to publish its spring-security-saml2-service-provider to Maven Central. However, Maven's documentation would suggest that the Shibboleth team are incorrect:

we do strongly encourage making sure all your dependencies are included in the Central Repository. If you rely on sketchy repositories that have junk in them or disappear, it just creates havok for downstream users. Try to keep your dependencies among reliable repos like Central, Jboss, etc.

Whether the Shibboleth repository is sketchy or reliable is obviously subjective. I think it could be argued that we won't be aligning with the spirit of the Maven team's guidelines by publishing something to Central that depends on artifacts that are only available elsewhere.

@marcusdacoregio marcusdacoregio removed the status: waiting-for-triage An issue we've not yet triaged label Oct 7, 2022
@sjohnr sjohnr modified the milestones: 6.0.0-RC1, 6.0.x Oct 18, 2022
@stefanos-kalantzis
Copy link

any news here? why do we need to add a custom repo to use spring-security?

In maven world there's no good support for limiting/configuring which artifacts can be downloaded from which repo.

@ph33rtehgd
Copy link

I'm surprised there's been no comment on this. I understand that Spring does not control where the Shibboleth publishes their aritfacts, but having to add a new maven repository is disruptive in a corporate environment.

@flozano
Copy link

flozano commented Oct 20, 2023

what's the alternative? it's not like there are a ton of SAML implementations in Java...

@ph33rtehgd
Copy link

what's the alternative? it's not like there are a ton of SAML implementations in Java...

Not sure, I'm not a SAML library expert. If that's the case and the issue isn't going to be fixed they could at least put out of a statement on it and close the issue. With the issue open it makes it seem like we're waiting for them to provide an update/fix to the issue.

@sjohnr sjohnr removed this from the 6.0.x milestone Nov 27, 2023
@SpiReCZ
Copy link

SpiReCZ commented Dec 9, 2023

Life has led me back into this topic. Hope something will be done with it.

@marcusdacoregio marcusdacoregio added the for: team-attention This ticket should be discussed as a team before proceeding label Dec 9, 2023
@marcusdacoregio marcusdacoregio self-assigned this Dec 9, 2023
@marcusdacoregio marcusdacoregio removed the for: team-attention This ticket should be discussed as a team before proceeding label Dec 12, 2023
@marcusdacoregio marcusdacoregio removed their assignment Dec 12, 2023
@rwinch
Copy link
Member

rwinch commented Dec 12, 2023

OpenSAML is the best Java based SAML library & will remain the implementation for Spring Security. It isn't in anyone's best interest to use older versions of jars, so we will continue to rely on the latest version of OpenSAML.

Those that wish to have OpenSAML published in Maven Central need to discuss it with the OpenSAML team because the Spring Security team has no control over this.

Users requiring SAML support will need to include the Shibboleth Maven repository. I have created gh-14286 to document this requirement.

@rwinch rwinch closed this as completed Dec 12, 2023
@rwinch rwinch added the status: invalid An issue that we don't feel is valid label Dec 12, 2023
@SpiReCZ
Copy link

SpiReCZ commented Dec 13, 2023

I described my dissapointment in here: #14286

@wilkinsona
Copy link
Member

Wouldn't status: declined be a more appropriate resolution? In my opinion, it's perfectly valid to wish that all of a project's dependencies were in Maven Central.

Those that wish to have OpenSAML published in Maven Central need to discuss it with the OpenSAML team because the Spring Security team has no control over this.

Given Spring Security's prominence, I think any request that comes from the Security team has the best chance of succeeding. I think it's also in the interests of the Spring Security project to have all of its dependencies in Maven Central as it makes the SAML support easier to use.

@dafriz
Copy link

dafriz commented Apr 12, 2024

@wilkinsona
Copy link
Member

As is often that case, that's a reflection upon how up-to-date the mvnrepository.com index is and not the availability of the artifact. As you can see from https://build.shibboleth.net/maven/releases/org/opensaml/opensaml-core/4.3.1/, OpenSAML continues to be available from the https://build.shibboleth.net/maven/releases repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: saml2 An issue in SAML2 modules status: invalid An issue that we don't feel is valid type: bug A general bug
Projects
None yet
Development

No branches or pull requests

10 participants