Skip to content

Dependency convergence on nimbus-jose-jwt #22947

@ThomasKasene

Description

@ThomasKasene

When I use spring-boot-starter 2.3.3.RELEASE as my project's parent and include org.springframework.boot:spring-boot-starter-oauth2-client:2.3.3.RELEASE as a dependency, my dependencyConvergence rule goes bananas over the version of com.nimbusds:nimbus-jose-jwt:

[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (default) @ my-project ---
[WARNING]
Dependency convergence error for com.nimbusds:nimbus-jose-jwt:8.8 paths to dependency are:
+-my.project:my-project:1.0-SNAPSHOT
  +-org.springframework.boot:spring-boot-starter-oauth2-client:2.3.3.RELEASE
    +-org.springframework.security:spring-security-oauth2-client:5.3.4.RELEASE
      +-com.nimbusds:oauth2-oidc-sdk:7.1.1
        +-com.nimbusds:nimbus-jose-jwt:8.8
and
+-my.project:my-project:1.0-SNAPSHOT
  +-org.springframework.boot:spring-boot-starter-oauth2-client:2.3.3.RELEASE
    +-org.springframework.security:spring-security-oauth2-jose:5.3.4.RELEASE
      +-com.nimbusds:nimbus-jose-jwt:8.19

I've been looking around for a bit, and noticed Spring Boot is behind on the com.nimbusds:oauth2-oidc-sdk så I bumped it up to 8.18 using the oauth2-oidc-sdk.version-property, but still the same issue:

[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (default) @ my-project ---
[WARNING]
Dependency convergence error for com.nimbusds:nimbus-jose-jwt:8.18 paths to dependency are:
+-my.project:my-project:1.0-SNAPSHOT
  +-org.springframework.boot:spring-boot-starter-oauth2-client:2.3.3.RELEASE
    +-org.springframework.security:spring-security-oauth2-client:5.3.4.RELEASE
      +-com.nimbusds:oauth2-oidc-sdk:8.18
        +-com.nimbusds:nimbus-jose-jwt:8.18
and
+-my.project:my-project:1.0-SNAPSHOT
  +-org.springframework.boot:spring-boot-starter-oauth2-client:2.3.3.RELEASE
    +-org.springframework.security:spring-security-oauth2-jose:5.3.4.RELEASE
      +-com.nimbusds:nimbus-jose-jwt:8.19

Another attempt with oauth2-oidc-sdk.version = 8.19:

[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (default) @ my-project ---
[WARNING]
Dependency convergence error for com.nimbusds:nimbus-jose-jwt:8.18 paths to dependency are:
+-my.project:my-project:1.0-SNAPSHOT
  +-org.springframework.boot:spring-boot-starter-oauth2-client:2.3.3.RELEASE
    +-org.springframework.security:spring-security-oauth2-client:5.3.4.RELEASE
      +-com.nimbusds:oauth2-oidc-sdk:8.19
        +-com.nimbusds:nimbus-jose-jwt:8.18
and
+-my.project:my-project:1.0-SNAPSHOT
  +-org.springframework.boot:spring-boot-starter-oauth2-client:2.3.3.RELEASE
    +-org.springframework.security:spring-security-oauth2-jose:5.3.4.RELEASE
      +-com.nimbusds:nimbus-jose-jwt:8.19

My point here is really just to show that Spring Security tries to use the most updated version of that artifact, while oauth2-oidc-sdk does not (always), effectively making the two artifacts oauth2-oidc-sdk and nimbus-jose-jwt two separate things.

So my question is - would it make sense to add com.nimbusds:nimbus-jose-jwt to Spring Boot's dependency management with its own version property?

I could give it a shot if the team deems it a good idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions