Skip to content

Consider removing com.nimbusds:oauth2-oidc-sdk dependency #14245

Open
@jgrandja

Description

@jgrandja

We should strongly consider removing the com.nimbusds:oauth2-oidc-sdk dependency as it has caused a number of issues over the years ever since we added it's usage in the OAuth2 support.

The root issue is the result of the out-of-sync release process used for the oauth2-oidc-sdk and nimbus-jose-jwt artifacts. Since oauth2-oidc-sdk depends on nimbus-jose-jwt, it's important to keep the versions of these artifacts in sync - only if oauth2-oidc-sdk is being used. However, there are cases where this poses to be a challenge, when artifacts are unexpectedly downgraded as described in this comment. As a result, we're also forced to downgrade versions to prevent dependency convergence, and this is not ideal as we should always strive to be using the latest versions as a best practice.

The support overhead that com.nimbusds:oauth2-oidc-sdk dependency has added over the years has outweighed the value of reuse of the library, so I recommend we remove the use of the library altogether and only depend on com.nimbusds:nimbus-jose-jwt and ensure we're always on the latest version.

We are currently using com.nimbusds:oauth2-oidc-sdk in the following classes:

  • OAuth2ErrorResponseErrorHandler
  • ClientRegistrations
  • DefaultReactiveOAuth2UserService
  • OAuth2AccessTokenResponseBodyExtractor
  • NimbusOpaqueTokenIntrospector
  • NimbusReactiveOpaqueTokenIntrospector

After reviewing the code in the above classes, I believe updating the code with our own implementation would be minimal effort and it ultimately would save us from any further support overhead.

Related gh-13843, gh-13990

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: breaks-passivityA change that breaks passivity with the previous release

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions