Contact Us 1-800-596-4880

Upgrading and Migrating OAuth2 Provider Module to Version 2.x

Upgrade OAuth2 Provider Module from version 1.x to version 2.x.

Supported Upgrade Paths

From Version To Version

1.x

2.x

Changes in This Release

2.0

  • This connector is now compatible with Java 17 only.

  • The module uses Spring Framework 7.0.9 and Spring Security 7.1.1. These libraries are no longer shaded into the module, and the module no longer uses the Atlassian-forked Spring Security build. The application must provide Spring Framework 7 and Spring Security 7. Custom Spring-based extensions that use the module must be compatible with those versions.

    For more information, see Security Providers.

  • When the module authenticates a resource owner, it copies the HTTP request headers onto the authentication received by the security provider named in Resource Owner Security Provider. This applies when the resource owner signs in at the authorization endpoint and when the token request uses the resource owner password credentials grant. It doesn’t apply to the client credentials grant. For a Spring authentication provider, the module copies the headers onto the Spring authentication details only when those details are empty.

    For more information, see Security Providers.

  • These libraries are upgraded to address reported security vulnerabilities:

    • The commons-collections4 library is upgraded to version 4.6.0.

    • The commons-lang3 library is upgraded to version 3.21.0.

    • The commons-text library is upgraded to version 1.15.0.

    • The commons-io library is upgraded to version 2.22.0.

    • The gson library is upgraded to version 2.14.0.

    • The velocity-engine-core library is upgraded to version 2.4.1.

    • The log4j library is upgraded to version 2.26.1.

Requirements

Ensure your system meets the following compatibility requirements before you perform the upgrade:

Application/Service Version

Mule runtime

4.9.0 and later

Java

17

Upgrade Prerequisites

Before you perform the upgrade, you must:

  1. Create a backup of your files, data, and configuration in case you need to restore to the previous version.

  2. Ensure that your environment meets the version 2.x requirements.

  3. Provide Spring Framework 7.0.9 and Spring Security 7.1.1 in the application. Version 2.0 doesn’t shade those libraries into the module.

  4. Confirm that custom Spring-based extensions that use the module are compatible with Spring Framework 7 and Spring Security 7.

  5. Install OAuth2 Provider Module 2.x to replace the module that was previously included in version 1.x.

Upgrade Steps

Follow these steps to perform the upgrade from OAuth2 Provider Module 1.x to OAuth2 Provider Module 2.x:

  1. In Anypoint Studio, create a Mule project.

  2. In the Mule Palette view, click Search in Exchange.

  3. In the Add Dependencies to Project window, enter oauth2 provider in the search field.

  4. In the Available modules section, select OAuth2 Provider Module - Mule 4 and click Add.

  5. Click Finish.

  6. Verify that the mule-oauth2-provider-module dependency version is 2.x.x in the pom.xml file, where x.x is the minor release and patch version number. For example, if you are upgrading to version 2.0, the dependency version in the pom.xml file should be 2.0.0.

Studio upgrades the module automatically.

Verify the Upgrade

After you install the latest version of the module, follow these steps to verify the upgrade:

  1. In Studio, verify that there are no errors in the Problems or Console views.

  2. Check the project pom.xml file and verify that there are no problems.

  3. Test the module configuration and verify that the operations work.

Troubleshooting

If there are problems with caching the parameters and caching the metadata, try restarting Studio.

For logging and common error messages, see Troubleshooting OAuth2 Provider Module.

Revert the Upgrade

If it is necessary to revert to the previous version of OAuth2 Provider Module, change the mule-oauth2-provider-module dependency version in the project’s pom.xml file to the previous version.

You must update the project’s pom.xml file in Anypoint Studio.