Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kerberos Constrained Delegation Impersonated Credential Expiry fix #636

Merged
merged 11 commits into from
May 31, 2018
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3457,19 +3457,26 @@ final boolean doExecute() throws SQLServerException {
}
}
finally {
if (integratedSecurity) {
if (null != authentication)
authentication.ReleaseClientContext();
authentication = null;

if (integratedSecurity) {
if (null != ImpersonatedUserCred) {
try {
ImpersonatedUserCred.dispose();
if (ImpersonatedUserCred.getRemainingLifetime() <= 0) {
if (null != authentication) {
authentication.ReleaseClientContext();
}
authentication = null;
ImpersonatedUserCred.dispose();
}
}
catch (GSSException e) {
if (connectionlogger.isLoggable(Level.FINER))
connectionlogger.finer(toString() + " Release of the credentials failed GSSException: " + e);
}
} else {
if (null != authentication) {
authentication.ReleaseClientContext();
}
authentication = null;
}
}
}
Expand Down