ASF Bugzilla – Attachment 31208 Details for
Bug 56013
SpnegoAuthenticator not working in IBM JDK v7 for Kerberos due to incorrect credential lifetime
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Unified GNU diff format of SpnegoAuthenticator.java and its updated version
SpnegoAuthenticatorChanges.txt (text/plain), 1.89 KB, created by
Arunav Sanyal
on 2014-01-15 10:17:00 UTC
(
hide
)
Description:
Unified GNU diff format of SpnegoAuthenticator.java and its updated version
Filename:
MIME Type:
Creator:
Arunav Sanyal
Created:
2014-01-15 10:17:00 UTC
Size:
1.89 KB
patch
obsolete
>--- SpnegoAuthenticatorOriginal.java 2013-12-19 22:39:32.000000000 +0530 >+++ SpnegoAuthenticator.java 2014-01-14 17:18:45.342410000 +0530 >@@ -55,6 +55,21 @@ > > private static final Log log = LogFactory.getLog(SpnegoAuthenticator.class); > >+ /** >+ * A boolean value which checks whether the vendor is IBM or sun >+ */ >+ static final boolean isIBMJvm; >+ >+ /* Logic to determine the jdk type */ >+ static { >+ String vendor = System.getProperty("java.vendor"); >+ if (vendor != null && vendor.toLowerCase().contains("ibm")) { >+ isIBMJvm = true; >+ } else { >+ isIBMJvm = false; >+ } >+ } >+ > private String loginConfigName = Constants.DEFAULT_LOGIN_MODULE_NAME; > public String getLoginConfigName() { > return loginConfigName; >@@ -219,12 +234,20 @@ > // Assume the GSSContext is stateless > // TODO: Confirm this assumption > final GSSManager manager = GSSManager.getInstance(); >+ >+ /* IBM JDK only understands indefinite lifetime */ >+ final int credentialLifeTime; >+ if (isIBMJvm) >+ credentialLifeTime = GSSCredential.INDEFINITE_LIFETIME; >+ else >+ credentialLifeTime = GSSCredential.DEFAULT_LIFETIME; >+ > final PrivilegedExceptionAction<GSSCredential> action = > new PrivilegedExceptionAction<GSSCredential>() { > @Override > public GSSCredential run() throws GSSException { > return manager.createCredential(null, >- GSSCredential.DEFAULT_LIFETIME, >+ credentialLifeTime, > new Oid("1.3.6.1.5.5.2"), > GSSCredential.ACCEPT_ONLY); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 56013
: 31208