JIRA to Azure MSSQL using Microsoft Entra Authentication

Zouhair Ouhdid February 16, 2024

hi Team,

i have some errors when trying to connect JIRA datacenter to Azure SQL using azure AD authentication , i followed the article : https://confluence.atlassian.com/jirakb/use-integrated-authentication-with-sql-server-in-jira-server-939494383.html

Version : Jira 9.11.0

 

 

  • When using mssql-jdbc_auth-12.6.0.x64.dll :

     

Caused by: java.lang.UnsatisfiedLinkError: no mssql-jdbc_auth-9.2.1.x64 in java.library.path: E:\Atlassian\Jira\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;E:\Atlassian\Jira\bin\..\jre\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;E:\Atlassian\Jira\jre\bin;C:\Users\WEZ-DITEJ-001SQL-D01\AppData\Local\Microsoft\WindowsApps;.

at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)

at java.base/java.lang.Runtime.loadLibrary0(Unknown Source)

 

  • When using no mssql-jdbc_auth-9.2.1.x64 :

 

com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:d386b6e9-83ca-4755-8877-3f935d3fbd85

at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:3206)

at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:72)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:4015)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:85)

at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:4004)

at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7418)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3272)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2768)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2418)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2265)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1291)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:881)

at java.sql/java.sql.DriverManager.getConnection(Unknown Source)

at java.sql/java.sql.DriverManager.getConnection(Unknown Source)

1 answer

0 votes
Ignacio Aredez GenAI Expert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 16, 2024

To address the issues you're encountering with connecting JIRA Data Center to Azure SQL using Azure AD authentication, let's simplify the troubleshooting steps:

Issue 1: UnsatisfiedLinkError for mssql-jdbc_auth-12.6.0.x64.dll
Verify DLL Placement: Make sure the mssql-jdbc_auth-12.6.0.x64.dll is in a directory listed in the java.library.path. The error indicates it might be missing or not correctly referenced.
Check Version Consistency: Ensure the version of the mssql-jdbc_auth DLL matches the one expected by your system and JIRA configuration. Update references if there's a mismatch.


Issue 2: Driver Not Configured for Integrated Authentication
Correct Connection String: Ensure your dbconfig.xml for JIRA correctly specifies the use of integrated authentication, fitting the requirements for Azure AD.
JDBC Driver Support: Make sure you're using a JDBC driver version that supports Azure AD authentication. Update if necessary.


General Steps:
Update Environment Variables: If you added or updated the DLL, add its directory to your system's PATH and restart JIRA.
Review Documentation: Double-check Atlassian and Microsoft's documentation to ensure all steps for Azure AD authentication are correctly followed.

Zouhair Ouhdid February 19, 2024

hi, thanks for your feedback 

i have a new error with mssql-jdbc_auth-9.2.1.x64.dll:

2024-02-19 10:42:31,402+0000 JIRA-Bootstrap ERROR [c.a.config.bootstrap.DefaultAtlassianBootstrapManager] Could not successfully test your database:
com.microsoft.sqlserver.jdbc.SQLServerException: Windows logins are not supported in this version of SQL Server. ClientConnectionId:7f685a0b-2282-4bce-9827-cc0c61763de3
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)


below my dbconfig.xml :

<?xml version="1.0" encoding="UTF-8"?>

<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>mssql</database-type>
<schema-name>dbo</schema-name>
<jdbc-datasource>
<url>jdbc:sqlserver://wezditejsdsp0001.database.windows.net:1433;databaseName=DITEJ-jira-db01;integratedsecurity=true;</url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<username>dummyuser</username>
<password>dummypassword</password>
<pool-min-size>40</pool-min-size>
<pool-max-size>40</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<validation-query>select 1</validation-query>
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>
<pool-max-idle>40</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
<pool-test-on-borrow>false</pool-test-on-borrow>
<pool-test-while-idle>true</pool-test-while-idle>
</jdbc-datasource>
</jira-database-config>

 

PI : we are using azure MSSQL with Microsoft Entra authentication for the DB
so may be how to implement Microsoft Azure Entra authentication for Jira

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.11.0
TAGS
AUG Leaders

Atlassian Community Events