Getting started Community Training Tutorials Documentation APIs, AI & Tools
1.x
Upgrade OAuth2 Provider Module from version 1.x to version 2.x.
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.
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 |
Before you perform the upgrade, you must:
Create a backup of your files, data, and configuration in case you need to restore to the previous version.
Ensure that your environment meets the version 2.x requirements.
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.
Confirm that custom Spring-based extensions that use the module are compatible with Spring Framework 7 and Spring Security 7.
Install OAuth2 Provider Module 2.x to replace the module that was previously included in version 1.x.
Follow these steps to perform the upgrade from OAuth2 Provider Module 1.x to OAuth2 Provider Module 2.x:
In Anypoint Studio, create a Mule project.
In the Mule Palette view, click Search in Exchange.
In the Add Dependencies to Project window, enter oauth2 provider in the search field.
In the Available modules section, select OAuth2 Provider Module - Mule 4 and click Add.
Click Finish.
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.
After you install the latest version of the module, follow these steps to verify the upgrade:
In Studio, verify that there are no errors in the Problems or Console views.
Check the project pom.xml file and verify that there are no problems.
Test the module configuration and verify that the operations work.
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.