-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Dependency convergence failed: nimbus-jose-jwt #13843
Comments
Originally reported at spring-projects/spring-boot#37437, but cross reported here after this comment from @wilkinsona |
Probably related to #13333 |
Note that the problem can be reproduced without involving Boot: <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.test</groupId>
<artifactId>dependency-convergence</artifactId>
<version>0.0.1</version>
<dependencies>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-client</artifactId>
<version>6.1.3</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-jose</artifactId>
<version>6.1.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<phase>validate</phase>
<configuration>
<rules>
<DependencyConvergence/>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
There's an additional problem here with |
Thanks for reporting this @matsev, and thanks for the additional info @wilkinsona. I opened gh-13333 for this, but wasn't clear on what happened to get us to this point. With some research, I now see what happened. Our dependency management updates are designed to keep the version of When we updated to However, in the very next release of So I believe we need to simply apply the same downgrade ourselves. Anything you folks see that I'm missing? |
@sjohnr I am sorry, I don't have much to add to this issue. I was just surprised when I discovered the conflicting versions after we added Spring Boot Oauth2 Starter as a dependency to our project. We do not plan to implement any Oauth2 logic ourselves so we are happy as long as the Oauth2 abstractions provided by Spring Boot / Spring Security works as expected. That said, perhaps there is a better way? Questions:
|
I've opened an issue on the connect2id issue tracker. |
Another question: I'm no Gradle expert, but it seems like there's an available alternative for Gradle too. |
@sjohnr Any thoughts about #13843 (comment) and adding something to prevent future convergence? |
@philwebb @ThomasKasene thanks for the input! Yes, I agree and I've opened gh-13990 to address this. |
This is now causing my dependency checker to light up about https://nvd.nist.gov/vuln/detail/CVE-2023-52428 guys. I like the idea of #14245 as well. |
Dependency convergence conflict for
com.nimbusds:nimbus-jose-jwt
using Spring Boot version 3.1.3 / Spring Security version 6.1.3Step by step:
pom.xml
file:mvn validate
Expected result
The dependencies should converge, i.e. every (transitive) dependency should have exactly one version specified.
Actual result
Two different versions of the
nimbus-jose-jwt
are imported transitively:The text was updated successfully, but these errors were encountered: