Skip to content

Commit 921abb7

Browse files
Jeffery-Wastylilgreenbirdtkyc
authored
Update 11.2 servicing branch to run on test pipelines + dependency update (#2602)
* Update build.gradle * Update pom.xml * Update pom.xml * Update pom.xml * Update pom.xml * Update pom.xml * Update pom.xml * Update pom.xml * ManagedIdentity I Signed-off-by: Jeff Wasty <[email protected]> * Updates for running tests with managed identity (#2416) Signed-off-by: Jeff Wasty <[email protected]> # Conflicts: # src/test/java/com/microsoft/sqlserver/jdbc/SQLServerConnectionTest.java # src/test/java/com/microsoft/sqlserver/jdbc/TestResource.java # src/test/java/com/microsoft/sqlserver/jdbc/TestUtils.java # src/test/java/com/microsoft/sqlserver/jdbc/connection/TimeoutTest.java # src/test/java/com/microsoft/sqlserver/jdbc/databasemetadata/DatabaseMetaDataTest.java # src/test/java/com/microsoft/sqlserver/jdbc/unit/statement/BatchExecutionTest.java * Delete mistakenly added files * Delete mistakenly added files * Revert "Delete mistakenly added files" This reverts commit 19abc22. * Revert "Delete mistakenly added files" This reverts commit 04f8c82. * Revert "Updates for running tests with managed identity (#2416)" This reverts commit b727a96. * Revert "ManagedIdentity I" This reverts commit 6d5c519. * Delete garbage * Fixed Managed Identity tests (#1935) Signed-off-by: Jeff Wasty <[email protected]> # Conflicts: # src/test/java/com/microsoft/sqlserver/jdbc/AlwaysEncrypted/MSITest.java * Managed Identity dev experience improvements #1936 Signed-off-by: Jeff Wasty <[email protected]> * Updates for running tests with managed identity #2416 Signed-off-by: Jeff Wasty <[email protected]> * cleanup Signed-off-by: Jeff Wasty <[email protected]> * Update tests for Kerberos Signed-off-by: Jeff Wasty <[email protected]> * Remove unused test * tsc=true for ae Signed-off-by: Jeff Wasty <[email protected]> * Add tags for testDefaultRetry * Remove unstable test Signed-off-by: Jeff Wasty <[email protected]> * Add throttling error message to tests (#2044) Signed-off-by: Jeff Wasty <[email protected]> * Updated fedauth tests to run on diff test server (#2062) Signed-off-by: Jeff Wasty <[email protected]> * Update fedauth tests to use cached tokens and retry if throttled (#2077) Signed-off-by: Jeff Wasty <[email protected]> * Add back missing import Signed-off-by: Jeff Wasty <[email protected]> * Resolve static issue with IOBuffer Signed-off-by: Jeff Wasty <[email protected]> * Add back a missing import * Fixed TestUtils * Remove mistakenly added code * Cleanup * Cleanup testutils * More cleanup * Add more time for 'testDefaultRetry' & Fix tests for testing encrypt options (#2215) * Update setAEConnectionString * Updated fedauth error tests (#2538) Signed-off-by: Jeff Wasty <[email protected]> # Conflicts: # src/test/java/com/microsoft/sqlserver/jdbc/fedauth/ErrorMessageTest.java # src/test/java/com/microsoft/sqlserver/jdbc/fedauth/FedauthCommon.java * Update fedAuth tests * Revert "Updated fedauth error tests (#2538)" This reverts commit dfb4b77. * Revert "Update fedAuth tests" This reverts commit da5c58b. * Added ActiveDirectoryServicePrincipalCertificate for tests * Add 'requireSecret' exclude tag for tests which require adding a secret to app registration * Version update * Add connection retry changes from 2513 to ensure existing timing tests pass * Adjust timings on tests as the fix requires code changes we should not incorporate for this release * Changelog * Update dependency versions --------- Signed-off-by: Jeff Wasty <[email protected]> Co-authored-by: lilgreenbird <[email protected]> Co-authored-by: Terry Chow <[email protected]>
1 parent c915fa0 commit 921abb7

File tree

64 files changed

+1622
-891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1622
-891
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55

6+
## [11.2.4] HotFix & Stable Release
7+
### Added
8+
- Added support for Azure Active Directory Service Principal Certificate Authentication [2128](https://github.com/microsoft/mssql-jdbc/pull/2128)
9+
### Changed
10+
- Made jdk.net optional OSGi import [2069](https://github.com/microsoft/mssql-jdbc/pull/2069)
11+
- Upgraded to latest OSGi JDBC specification [2017](https://github.com/microsoft/mssql-jdbc/pull/2017)
12+
- Managed Identity authentication uses Azure Identity library instead [1936](https://github.com/microsoft/mssql-jdbc/pull/1936)
13+
- Updated azure-security-keyvault-keys, azure-identity, antlr4, bouncycastle, junit, slf4j, gemini, gson, and h2 library versions
14+
615
## [11.2.3] HotFix & Stable Release
716
### Fixed issues
817
- Fixed null SQL state and zero error code when database exception is thrown [2022](https://github.com/microsoft/mssql-jdbc/pull/2022)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ We're now on the Maven Central Repository. Add the following to your POM file to
8282
<dependency>
8383
<groupId>com.microsoft.sqlserver</groupId>
8484
<artifactId>mssql-jdbc</artifactId>
85-
<version>11.2.1.jre18</version>
85+
<version>11.2.4.jre18</version>
8686
</dependency>
8787
```
8888
The driver can be downloaded from [Microsoft](https://aka.ms/downloadmssqljdbc).
@@ -93,7 +93,7 @@ To get the latest version of the driver, add the following to your POM file:
9393
<dependency>
9494
<groupId>com.microsoft.sqlserver</groupId>
9595
<artifactId>mssql-jdbc</artifactId>
96-
<version>11.2.1.jre18</version>
96+
<version>11.2.4.jre18</version>
9797
</dependency>
9898
```
9999

@@ -128,7 +128,7 @@ Projects that require either of the two features need to explicitly declare the
128128
<dependency>
129129
<groupId>com.microsoft.sqlserver</groupId>
130130
<artifactId>mssql-jdbc</artifactId>
131-
<version>11.2.1.jre18</version>
131+
<version>11.2.4.jre18</version>
132132
<scope>compile</scope>
133133
</dependency>
134134

@@ -146,7 +146,7 @@ Projects that require either of the two features need to explicitly declare the
146146
<dependency>
147147
<groupId>com.microsoft.sqlserver</groupId>
148148
<artifactId>mssql-jdbc</artifactId>
149-
<version>11.2.1.jre18</version>
149+
<version>11.2.4.jre18</version>
150150
<scope>compile</scope>
151151
</dependency>
152152

@@ -173,7 +173,7 @@ When setting 'useFmtOnly' property to 'true' for establishing a connection or cr
173173
<dependency>
174174
<groupId>com.microsoft.sqlserver</groupId>
175175
<artifactId>mssql-jdbc</artifactId>
176-
<version>11.2.1.jre18</version>
176+
<version>11.2.4.jre18</version>
177177
</dependency>
178178

179179
<dependency>

build.gradle

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
apply plugin: 'java'
1313

14-
version = '11.2.3'
14+
version = '11.2.4'
1515
def jreVersion = ""
1616
def testOutputDir = file("build/classes/java/test")
1717
def archivesBaseName = 'mssql-jdbc'
@@ -128,31 +128,30 @@ repositories {
128128

129129
dependencies {
130130
implementation 'org.osgi:org.osgi.core:6.0.0',
131-
'org.osgi:org.osgi.compendium:5.0.0'
132-
compileOnly 'com.azure:azure-security-keyvault-keys:4.2.8',
133-
'com.azure:azure-identity:1.7.0-beta.2',
134-
'org.antlr:antlr4-runtime:4.9.2',
135-
'com.google.code.gson:gson:2.8.7',
136-
'org.bouncycastle:bcprov-jdk15on:1.69',
137-
'org.bouncycastle:bcpkix-jdk15on:1.69'
138-
testImplementation 'org.junit.platform:junit-platform-console:1.5.2',
139-
'org.junit.platform:junit-platform-commons:1.5.2',
140-
'org.junit.platform:junit-platform-engine:1.5.2',
141-
'org.junit.platform:junit-platform-launcher:1.5.2',
142-
'org.junit.platform:junit-platform-runner:1.5.2',
131+
'org.osgi:org.osgi.service.jdbc:1.1.0'
132+
compileOnly 'com.azure:azure-security-keyvault-keys:4.9.2',
133+
'com.azure:azure-identity:1.15.3',
134+
'org.antlr:antlr4-runtime:4.9.3',
135+
'com.google.code.gson:gson:2.11.0',
136+
'org.bouncycastle:bcprov-jdk18on:1.79',
137+
'org.bouncycastle:bcpkix-jdk18on:1.79'
138+
testImplementation 'org.junit.platform:junit-platform-console:1.11.4',
139+
'org.junit.platform:junit-platform-commons:1.11.4',
140+
'org.junit.platform:junit-platform-engine:1.11.4',
141+
'org.junit.platform:junit-platform-launcher:1.11.4',
142+
'org.junit.platform:junit-platform-runner:1.11.4',
143143
'org.junit.platform:junit-platform-surefire-provider:1.3.2',
144-
'org.junit.jupiter:junit-jupiter-api:5.6.0',
145-
'org.junit.jupiter:junit-jupiter-engine:5.6.0',
146-
'org.junit.jupiter:junit-jupiter-params:5.6.0',
144+
'org.junit.jupiter:junit-jupiter-api:5.11.4',
145+
'org.junit.jupiter:junit-jupiter-engine:5.11.4',
146+
'org.junit.jupiter:junit-jupiter-params:5.11.4',
147147
'com.zaxxer:HikariCP:3.4.2',
148-
'org.apache.commons:commons-dbcp2:2.7.0',
149-
'org.slf4j:slf4j-nop:1.7.30',
150-
'org.antlr:antlr4-runtime:4.9.2',
151-
'org.eclipse.gemini.blueprint:gemini-blueprint-mock:2.1.0.RELEASE',
152-
'com.google.code.gson:gson:2.8.7',
153-
'org.bouncycastle:bcprov-jdk15on:1.69',
154-
'com.azure:azure-security-keyvault-keys:4.2.8',
155-
'com.azure:azure-identity:1.7.0-beta.2',
156-
'com.microsoft.azure:adal4j:1.6.7',
157-
'com.h2database:h2:1.4.200'
148+
'org.apache.commons:commons-dbcp2:2.13.0',
149+
'org.slf4j:slf4j-nop:1.7.36',
150+
'org.antlr:antlr4-runtime:4.9.3',
151+
'org.eclipse.gemini.blueprint:gemini-blueprint-mock:3.0.0.M01',
152+
'com.google.code.gson:gson:2.11.0',
153+
'org.bouncycastle:bcprov-jdk18on:1.79',
154+
'com.azure:azure-security-keyvault-keys:4.9.1',
155+
'com.azure:azure-identity:1.15.0',
156+
'com.h2database:h2:2.2.220'
158157
}

mssql-jdbc_auth_LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MICROSOFT SOFTWARE LICENSE TERMS
2-
MICROSOFT JDBC DRIVER 11.2.3 FOR SQL SERVER
2+
MICROSOFT JDBC DRIVER 11.2.4 FOR SQL SERVER
33

44
These license terms are an agreement between you and Microsoft Corporation (or one of its affiliates). They apply to the software named above and any Microsoft services or software updates (except to the extent such services or updates are accompanied by new or additional terms, in which case those different terms apply prospectively and do not alter your or Microsoft’s rights relating to pre-updated software or services). IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW. BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS.
55

pom.xml

Lines changed: 53 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.microsoft.sqlserver</groupId>
88
<artifactId>mssql-jdbc</artifactId>
9-
<version>11.2.3</version>
9+
<version>11.2.4</version>
1010
<packaging>jar</packaging>
1111

1212
<name>Microsoft JDBC Driver for SQL Server</name>
@@ -50,37 +50,36 @@
5050
xAzureSQLDB - - - - For tests not compatible with Azure SQL Database - -
5151
xAzureSQLDW - - - - For tests not compatible with Azure Data Warehouse -
5252
xAzureSQLMI - - - - For tests not compatible with Azure SQL Managed Instance
53-
NTLM - - - - - - For tests using NTLM Authentication mode (excluded by default)
54-
reqExternalSetup - For tests requiring external setup (excluded by default)
53+
NTLM - - - - - - - For tests using NTLM Authentication mode (excluded by default)
54+
Kerberos - - - - - For tests using Kerberos authentication (excluded by default)
55+
reqExternalSetup - For tests requiring external setup (excluded by default)
5556
clientCertAuth - - For tests requiring client certificate authentication
5657
setup (excluded by default) - - - - - - - - - - - - - - - - - - - - - - -
58+
requireSecret - For tests requiring setting up secrets manually
5759
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
5860
Default testing enabled with SQL Server 2019 (SQLv15) -->
59-
<excludedGroups>xSQLv12,xSQLv15,NTLM,MSI,reqExternalSetup,clientCertAuth,fedAuth</excludedGroups>
60-
61+
<excludedGroups>xSQLv12,xSQLv15,NTLM,MSI,reqExternalSetup,clientCertAuth,fedAuth,kerberos,requireSecret</excludedGroups>
6162
<!-- Use -preview for preview release, leave empty for official release. -->
6263
<releaseExt></releaseExt>
63-
64+
6465
<!-- Driver Dependencies -->
6566
<org.osgi.core.version>6.0.0</org.osgi.core.version>
66-
<azure-security-keyvault-keys.version>4.4.4</azure-security-keyvault-keys.version>
67-
<azure-identity.version>1.5.3</azure-identity.version>
68-
<msal.version>1.13.0</msal.version>
69-
<org.osgi.compendium.version>5.0.0</org.osgi.compendium.version>
67+
<azure-security-keyvault-keys.version>4.9.2</azure-security-keyvault-keys.version>
68+
<azure-identity.version>1.15.3</azure-identity.version>
69+
<msal.version>1.17.2</msal.version>
70+
<osgi.jdbc.version>1.1.0</osgi.jdbc.version>
7071
<antlr-runtime.version>4.9.3</antlr-runtime.version>
71-
<com.google.code.gson.version>2.9.0</com.google.code.gson.version>
72-
<bcprov-jdk15on.version>1.70</bcprov-jdk15on.version>
73-
<bcpkix-jdk15on.version>1.70</bcpkix-jdk15on.version>
74-
72+
<com.google.code.gson.version>2.11.0</com.google.code.gson.version>
73+
<bcprov-jdk18on.version>1.79</bcprov-jdk18on.version>
74+
<bcpkix-jdk18on.version>1.79</bcpkix-jdk18on.version>
7575
<!-- JUnit Test Dependencies -->
76-
<junit.platform.version>[1.3.2, 1.9.0]</junit.platform.version>
77-
<junit.jupiter.version>5.8.2</junit.jupiter.version>
76+
<junit.platform.version>[1.3.2, 1.11.4]</junit.platform.version>
77+
<junit.jupiter.version>5.11.4</junit.jupiter.version>
7878
<hikaricp.version>3.4.2</hikaricp.version>
79-
<dbcp2.version>2.7.0</dbcp2.version>
80-
<slf4j.nop.version>1.7.30</slf4j.nop.version>
81-
<gemini.mock.version>2.1.0.RELEASE</gemini.mock.version>
82-
<h2.version>2.1.210</h2.version>
83-
79+
<dbcp2.version>2.13.0</dbcp2.version>
80+
<slf4j.nop.version>1.7.36</slf4j.nop.version>
81+
<gemini.mock.version>3.0.0.M01</gemini.mock.version>
82+
<h2.version>2.2.220</h2.version>
8483
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
8584
<project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>
8685
<enforcer.skip>false</enforcer.skip>
@@ -109,7 +108,7 @@
109108
<dependency>
110109
<groupId>com.microsoft.azure</groupId>
111110
<artifactId>msal4j</artifactId>
112-
<version>1.13.0</version>
111+
<version>${msal.version}</version>
113112
<optional>true</optional>
114113
</dependency>
115114

@@ -130,15 +129,15 @@
130129
</dependency>
131130
<dependency>
132131
<groupId>org.bouncycastle</groupId>
133-
<artifactId>bcprov-jdk15on</artifactId>
134-
<version>${bcprov-jdk15on.version}</version>
132+
<artifactId>bcprov-jdk18on</artifactId>
133+
<version>${bcprov-jdk18on.version}</version>
135134
<optional>true</optional>
136135
</dependency>
137136
<!-- dependencies for Client Certificate Authentication -->
138137
<dependency>
139138
<groupId>org.bouncycastle</groupId>
140-
<artifactId>bcpkix-jdk15on</artifactId>
141-
<version>${bcpkix-jdk15on.version}</version>
139+
<artifactId>bcpkix-jdk18on</artifactId>
140+
<version>${bcpkix-jdk18on.version}</version>
142141
<optional>true</optional>
143142
</dependency>
144143
<!-- dependencies provided by an OSGi-Framework -->
@@ -150,8 +149,8 @@
150149
</dependency>
151150
<dependency>
152151
<groupId>org.osgi</groupId>
153-
<artifactId>org.osgi.compendium</artifactId>
154-
<version>${org.osgi.compendium.version}</version>
152+
<artifactId>org.osgi.service.jdbc</artifactId>
153+
<version>${osgi.jdbc.version}</version>
155154
<scope>provided</scope>
156155
</dependency>
157156

@@ -241,7 +240,30 @@
241240
<scope>test</scope>
242241
</dependency>
243242
</dependencies>
244-
243+
<repositories>
244+
<repository>
245+
<id>central</id>
246+
<url>https://sqlclientdrivers.pkgs.visualstudio.com/public/_packaging/mssql-jdbc/maven/v1</url>
247+
<releases>
248+
<enabled>true</enabled>
249+
</releases>
250+
<snapshots>
251+
<enabled>true</enabled>
252+
</snapshots>
253+
</repository>
254+
</repositories>
255+
<pluginRepositories>
256+
<pluginRepository>
257+
<id>central</id>
258+
<url>https://sqlclientdrivers.pkgs.visualstudio.com/public/_packaging/mssql-jdbc/maven/v1</url>
259+
<releases>
260+
<enabled>true</enabled>
261+
</releases>
262+
<snapshots>
263+
<enabled>true</enabled>
264+
</snapshots>
265+
</pluginRepository>
266+
</pluginRepositories>
245267
<profiles>
246268
<profile>
247269
<id>jre8</id>
@@ -495,7 +517,7 @@
495517
com.microsoft.sqlserver.jdbc.dataclassification,
496518
microsoft.sql
497519
</_exportcontents>
498-
<Import-Package>!microsoft.sql,*</Import-Package>
520+
<Import-Package>!microsoft.sql,jdk.net;resolution:=optional,*</Import-Package>
499521
<Bundle-Activator>com.microsoft.sqlserver.jdbc.osgi.Activator</Bundle-Activator>
500522
</instructions>
501523
</configuration>
@@ -539,7 +561,7 @@
539561
<plugin>
540562
<groupId>org.jacoco</groupId>
541563
<artifactId>jacoco-maven-plugin</artifactId>
542-
<version>0.8.8</version>
564+
<version>0.8.12</version>
543565
<executions>
544566
<execution>
545567
<id>pre-test</id>

src/main/java/com/microsoft/sqlserver/jdbc/IOBuffer.java

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import java.io.Reader;
1616
import java.io.Serializable;
1717
import java.io.UnsupportedEncodingException;
18+
import java.lang.reflect.InvocationTargetException;
1819
import java.math.BigDecimal;
1920
import java.math.BigInteger;
2021
import java.math.RoundingMode;
@@ -196,12 +197,17 @@ final class TDS {
196197
static final int TDS_FEDAUTH_LIBRARY_SECURITYTOKEN = 0x01;
197198
static final int TDS_FEDAUTH_LIBRARY_ADAL = 0x02;
198199
static final int TDS_FEDAUTH_LIBRARY_RESERVED = 0x7F;
200+
201+
// workflows
199202
static final byte ADALWORKFLOW_ACTIVEDIRECTORYPASSWORD = 0x01;
200203
static final byte ADALWORKFLOW_ACTIVEDIRECTORYINTEGRATED = 0x02;
201-
static final byte ADALWORKFLOW_ACTIVEDIRECTORYMSI = 0x03;
204+
static final byte ADALWORKFLOW_ACTIVEDIRECTORYMANAGEDIDENTITY = 0x03;
202205
static final byte ADALWORKFLOW_ACTIVEDIRECTORYINTERACTIVE = 0x03;
206+
static final byte ADALWORKFLOW_ACTIVEDIRECTORYDEFAULT = 0x03;
203207
static final byte ADALWORKFLOW_ACTIVEDIRECTORYSERVICEPRINCIPAL = 0x01; // Using the Password byte as that is the
204-
// closest we have.
208+
// closest we have
209+
static final byte ADALWORKFLOW_ACTIVEDIRECTORYSERVICEPRINCIPALCERTIFICATE = 0x01;
210+
205211
static final byte FEDAUTH_INFO_ID_STSURL = 0x01; // FedAuthInfoData is token endpoint URL from which to acquire fed
206212
// auth token
207213
static final byte FEDAUTH_INFO_ID_SPN = 0x02; // FedAuthInfoData is the SPN to use for acquiring fed auth token
@@ -795,6 +801,28 @@ final InetSocketAddress open(String host, int port, int timeoutMillis, boolean u
795801
return (InetSocketAddress) channelSocket.getRemoteSocketAddress();
796802
}
797803

804+
/**
805+
* Set TCP keep-alive options for idle connection resiliency
806+
*/
807+
private void setSocketOptions(Socket tcpSocket, TDSChannel channel) throws IOException {
808+
try {
809+
if (SQLServerDriver.socketSetOptionMethod != null && SQLServerDriver.socketKeepIdleOption != null
810+
&& SQLServerDriver.socketKeepIntervalOption != null) {
811+
if (logger.isLoggable(Level.FINER)) {
812+
logger.finer(channel.toString() + ": Setting KeepAlive extended socket options.");
813+
}
814+
815+
SQLServerDriver.socketSetOptionMethod.invoke(tcpSocket, SQLServerDriver.socketKeepIdleOption, 30); // 30 seconds
816+
SQLServerDriver.socketSetOptionMethod.invoke(tcpSocket, SQLServerDriver.socketKeepIntervalOption, 1); // 1 second
817+
}
818+
} catch (IllegalAccessException | InvocationTargetException e) {
819+
if (logger.isLoggable(Level.FINER)) {
820+
logger.finer(channel.toString() + ": KeepAlive extended socket options not supported on this platform. "
821+
+ e.getMessage());
822+
}
823+
}
824+
}
825+
798826
/**
799827
* Disables SSL on this TDS channel.
800828
*/
@@ -1756,7 +1784,7 @@ else if (con.getTrustManagerClass() != null) {
17561784
if (logger.isLoggable(Level.FINEST))
17571785
logger.finest(toString() + " Getting TLS or better SSL context");
17581786

1759-
KeyManager[] km = (null != clientCertificate && clientCertificate.length() > 0) ? SQLServerCertificateUtils
1787+
KeyManager[] km = (null != clientCertificate && !clientCertificate.isEmpty()) ? SQLServerCertificateUtils
17601788
.getKeyManagerFromFile(clientCertificate, clientKey, clientKeyPassword) : null;
17611789

17621790
sslContext = SSLContext.getInstance(sslProtocol);

src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerConnection.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -409,17 +409,16 @@ CallableStatement prepareCall(String sql, int nType, int nConcur, int nHold,
409409
String getIPAddressPreference();
410410

411411
/**
412-
* Gets the time-to-live for the the cached MSI token
413-
*
414-
* @return time-to-live for the cached MSI token
412+
* Deprecated. Time-to-live is no longer supported for the cached Managed Identity tokens.
413+
* This method will always return 0 and is for backwards compatibility only.
415414
*/
415+
@Deprecated
416416
int getMsiTokenCacheTtl();
417417

418418
/**
419-
* Sets time-to-live for the the cached MSI token
420-
*
421-
* @param timeToLive
422-
* Changes the setting as per description
419+
* Deprecated. Time-to-live is no longer supported for the cached Managed Identity tokens.
420+
* This method is a no-op for backwards compatibility only.
423421
*/
422+
@Deprecated
424423
void setMsiTokenCacheTtl(int timeToLive);
425424
}

0 commit comments

Comments
 (0)