Skip to content
This repository has been archived by the owner on Aug 14, 2021. It is now read-only.

Allow use of platform gss for kerberos authentication #13

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

kilokahn
Copy link

Hi guys,

This seems like the most up-to-date source from jcifs that has kerberos support. Thanks for the work in understanding and implementing the negotiation!

I was trying to use the platform GSS integration (as described in "Native platform GSS integration" at https://docs.oracle.com/javase/8/docs/technotes/guides/security/jgss/jgss-features.html), and noticed that the code in jcifs.smb.Kerb5Authenticator#sessionSetup assumes the use of only JAAS.

As per the JGSS documentation, when the sun.security.jgss.native system property is set to true, the platform GSS implementation should be used for GSSCredential fetch and JAAS configuration files are not necessary. We can have the platform provide the GSS Credential when calling org.ietf.jgss.GSSManager#createContext(org.ietf.jgss.GSSName, org.ietf.jgss.Oid, org.ietf.jgss.GSSCredential, int) with the GSSCredential as null - similar to what is done in jcifs.smb.Kerb5Authenticator#createContext

In this PR, have created a new Kerb5PlatformGssAuthenticator (which is completely inspired by the flow in jcifs.smb.Kerb5Authenticator) that doesn't have any notion of javax.security.auth.Subject (because it is handled by the platform (or host) implementation). The best way to see it in action is examples/KerberosPlatformGSSAuthExample (again inspired from examples/KerberosAuthExample).

There are a few other mvn related cleanup that you can see if you deem fit.

Please let me know if there are any questions.
Thanks!

@kilokahn
Copy link
Author

Please let me know if there is anything that I can do to help to move this forward. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant