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

IWindowsSecurityContext getToken Kerberos - question #2174

Open
ekkelenkamp opened this issue Jan 19, 2024 · 0 comments
Open

IWindowsSecurityContext getToken Kerberos - question #2174

ekkelenkamp opened this issue Jan 19, 2024 · 0 comments

Comments

@ekkelenkamp
Copy link

Our application (a Java fat client), needs to authenticate against a kerberos protected API.
I tried using the WindowsSecurityContext to retrieve a token, which succeeds. I would like to know what the token is that is returned by the WindowsSecurityContext.
On an AD joined windows machine this will return a byte[]. Is this a Kerberos TGT (Ticket Granting Token) ?. I assume so, since it is quite a short token. All examples I can found of a kerberos service token are much larger.

Are there any examples that show how to get a kerberos service token to connect with a Kerberos protected service?

The following is an example on how we get the token:

  String securityPackage = "Kerberos";
  IWindowsSecurityContext ctx = WindowsSecurityContextImpl.getCurrent(securityPackage, WindowsAccountImpl.getCurrentUsername());
  byte[] token =  ctx.getToken();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant