@Anonymous @Anonymous
I'm still struggling with getting this to work.
I've discovered that I can get my local machine to connect to the Azure SQL DB when I have
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>12.8.1.jre11</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.15.1</version>
</dependency>
and I use Authentication=ActiveDirectoryIntegrated;
in my connection string. However, in this case, I found that I did have to also run kinit my.user@DOMAIN
in order to get the authentication to work. The az login
appears not to have been sufficient.
Now, my problem is: how do I deploy my app into Azure and use a managed identity to authenticate on my application's behalf?
ActiveDirectoryIntegrated
doesn't work
ActiveDirectoryServicePrincipal
requires a username and password to be set (which seems to defeat the point)
ActiveDirectoryManagedIdentity
says "managed identity is unavailable"
ActiveDirectoryDefault
doesn't work, though it looks like it's trying a bunch of options, which appears to match the documentation.
I'm pretty sure what I want is the Managed Identity option. I believe this is the approach where the application will use the system-assigned managed identity to authenticate to the sql database. What steps do I take to make that happen?