Skip to content

Remove third-party dependencies from msal4j package #982

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

Merged
merged 59 commits into from
Aug 18, 2025

Conversation

Avery-Dunn
Copy link
Contributor

This PR represents the work done for #909, and all of the changes were already approved in the various PRs linked to that issue.

As can be seen on Maven, once merged the msal4j package will no longer be reliant on any package except for Azure SDK's azure-json and the very popular logging framework slf4j-api: https://mvnrepository.com/artifact/com.microsoft.azure/msal4j/1.30.0-beta

All of the behavior from other dependencies were replaced with our own implementations. Despite the large number of changes, as found in our own testing and testing by Azure SDK there are only two groups known breaking changes:

  • Removal of protected APIs that returned or used ClientAuthentication, which was a class from com.nimbusds
    • We could not remove this package without removing this reference so a breaking change was unavoidable, however - Refactor JSON parsing to return a more appropriate MsalClientException or MsalServiceException when a JSON was blank, rather than a JsonParsingException or similar
    • No API promised JSON parse exceptions and the MSAL exceptions have more details about the underlying issue

Normally breaking changes to public/protected APIs would warrant a major version bump, however these changes should affect few customers (if any) and were closer to bugfixes than changes to the overall design as they should never have been publicly available:

  • The return values of APIs that referenced ClientAuthentication were never used by any other public msal4j API, and we could couldn't think of any scenario where another project would need the instance we produced
  • They were protected methods in very fundamental MSAL classes that customers are unlikely to extend, so few would have even known about them

Avery-Dunn and others added 30 commits March 26, 2025 17:09
…tion-library-for-java into avdunn/nimbus-grants

# Conflicts:
#	msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/OnBehalfOfRequest.java
Remove usage of com.nimbusds.oauth2's Token classes
Remove usage of com.nimbusds.oauth2's HTTP classes
…tion-library-for-java into avdunn/nimbus-grants

# Conflicts:
#	msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/TokenRequestExecutor.java
Remove usage of com.nimbusds.oauth2 from grant-related classes
Represent query parameters with Map<String, String>
…crosoft-authentication-library-for-java into avdunn/nimbus-utils

# Conflicts:
#	msal4j-sdk/src/test/java/com/microsoft/aad/msal4j/HelperAndUtilityTests.java
Avery-Dunn and others added 24 commits May 7, 2025 14:53
Replace com.fasterxml.jackson with com.azure.json
Remove final usages of com.nimbusds from the packaged codebase
…nn/json-removal

# Conflicts:
#	msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/JsonHelper.java
Merge JSON and Nimbus feature branches
Dependency removal for beta release
# Conflicts:
#	README.md
#	changelog.txt
#	msal4j-sdk/README.md
#	msal4j-sdk/bnd.bnd
#	msal4j-sdk/pom.xml
#	msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/HttpHelper.java
#	msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/ManagedIdentityRequest.java
#	msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/StringHelper.java
#	msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/TokenRequestExecutor.java
#	msal4j-sdk/src/test/java/com/microsoft/aad/msal4j/CacheFormatTests.java
#	msal4j-sdk/src/test/java/com/microsoft/aad/msal4j/ClientCertificateTest.java
#	msal4j-sdk/src/test/java/com/microsoft/aad/msal4j/ManagedIdentityTests.java
#	msal4j-sdk/src/test/java/com/microsoft/aad/msal4j/TokenRequestExecutorTest.java
Sync dependency removal branch with latest dev branch
@Avery-Dunn Avery-Dunn requested a review from a team as a code owner August 12, 2025 17:16
@@ -1,3 +1,9 @@
Version 1.30.0-beta
=============
- Replace org.projectlombok dependencies with implementations of generated code (#946)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention about breaking changes from exception changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally we just make a separate changelog/version update PR once everything is merged to clearly mark the cutoff for changes that we release, so I didn't include them here

But this is kind of a special case due to it already being released. I just set up this PR to make it easier to review the changelog, and will either merge into this branch or the main branch depending on which gets approved first: #983

@Avery-Dunn Avery-Dunn merged commit 1f68791 into dev Aug 18, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants