JDBC URL connection to SQL Server using Windows Authentication in JIRA plugin
<p>I am currently at my wits end. I am trying to connect a JIRA plugin (Atlassian Java SDK) to a SQL Server 2012 database. It's required that I use Windows Authentication, but JIRA is logging:</p>

<blockquote>
  <p>com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.</p>
</blockquote>

<p>I've read that this can be combatted by adding the <code>sqljdbc_auth.dll</code> file to the program's library path, but there are no references specifically for JIRA plugins on how to do this other than for the base JIRA <code>dbconfig.xml</code>, which I am not using. This is a connection made within the plugin using the code:</p>

<pre><code>String url = String.format("jdbc:sqlserver://%s:1433;databaseName=%s;integratedSecurity=true;domain=XXXX;", server, database);
</code></pre>

<p>I have tried to add the dll file to the following locations, all to no avail:</p>

<ul>
<li><code>C:/{JIRA INSTALL PATH}/bin</code></li>
<li><code>C:/{JIRA INSTALL PATH}/jre/bin</code></li>
<li><code>C:/{JAVA INSTALL PATH}/jre_8.x.x/bin</code></li>
</ul>

<p>What gives?</p>

<p><strong>UPDATE:</strong>
I have gone in and added the JDBC JAR/DLL to the classpath/library path respectively in the JIRA Windows service configuration tool. Still getting the same error.</p>

<p><a href="https://i.stack.imgur.com/H8N2i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H8N2i.png" alt="JIRA Windows Service Configuration Tool"></a></p>

<p><strong>UPDATE 2:</strong><br>
I have switched to using the JTDS driver to see if JIRA was just not able to use the standard JDBC driver for some reason, but getting a similar error:</p>

<blockquote>
  <p>java.sql.SQLException: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.  </p>
</blockquote>

<p>I have also created a new Java app to test this in a controlled environment, but do not get this error after adding the <code>ntlmauth.dll</code> file to the <code>C:\Windows\System32</code> directory. This leads me to believe this may be a bug within JIRA or I have something configured improperly.</p>