apache / apache/hop

[Feature Request]: Add Microsoft Authentication Library for Java (MSAL4J)

Open
#5,367 0 comments 0 reactions 0 assignees View on GitHub
awaiting triage Database P3
Dominant language
Java
Stars
1.5k
Forks
476
Avg merge
18h 32m
Merged PRs (30d)
216

Description

### What would you like to happen?

Please add the below dependency to plugins/tech/azure:

The Microsoft Authentication Library for Java gives you the ability to obtain tokens from Azure AD v2.
```

com.microsoft.azure
msal4j
1.20.1

```

If you try to connect to a Azure SQL Server with authentication=ActiveDirectoryPassword
the JDBC driver is not able to load the required MSAL4J Java library.

```
java.lang.NoSuchMethodError: 'com.microsoft.aad.msal4j.AbstractApplicationBase$Builder com.microsoft.aad.msal4j.PublicClientApplication$Builder.executorService(java.util.concurrent.ExecutorService)'
at com.microsoft.sqlserver.jdbc.SQLServerMSAL4JUtils.getSqlFedAuthToken(SQLServerMSAL4JUtils.java:112)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.getFedAuthToken(SQLServerConnection.java:6028)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.onFedAuthInfo(SQLServerConnection.java:5995)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.processFedAuthInfo(SQLServerConnection.java:5829)
at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onFedAuthInfo(tdsparser.java:335)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:130)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:42)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:6888)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:5434)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:5366)
at org.apache.hop.ui.core.database.DatabaseMetaEditor.test(DatabaseMetaEditor.java:766)
```

### Issue Priority

Priority: 3

### Issue Component

Component: Database

Contributor guide

Open the contributing guide

Research direction

In plugins/tech/azure, locate the dependency configuration and review the existing Azure database dependencies first. Add the requested MSAL4J version, then verify that an Azure SQL Server connection using authentication=ActiveDirectoryPassword no longer produces the reported NoSuchMethodError.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, java, sql
Domain
database
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.