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

Increase Sspi#MAX_TOKEN_SIZE on Windows 8/Server 2012 and later #1398

Merged
merged 1 commit into from Nov 28, 2021

Conversation

dbwiddis
Copy link
Contributor

@dbwiddis dbwiddis commented Nov 26, 2021

Fixes #1396. See also #291.

Alternately, we could read the MaxTokenSize registry entry value at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Parameters if it exists, and default to these values otherwise, but that's way too complex to put in an initialization.

@matthiasblaesing
Copy link
Member

I'm not that deep in the windows apis anymore, but if this is a Kerberos Token, it is generated by the KDC (in windows networks the domain controller). Wouldn't it make more sense to default to 48kB uncondionally?

@dblock
Copy link
Member

dblock commented Nov 26, 2021

I'm not that deep in the windows apis anymore, but if this is a Kerberos Token, it is generated by the KDC (in windows networks the domain controller). Wouldn't it make more sense to default to 48kB unconditionally?

I think @dbwiddis is trying to match the default as documented on different versions of Windows. I prefer that.

@dblock
Copy link
Member

dblock commented Nov 26, 2021

@JStroom is this what you're looking for or something else?

@dbwiddis
Copy link
Contributor Author

I think @dbwiddis is trying to match the default as documented on different versions of Windows. I prefer that.

Indeed I was. However, Windows 7/Server 2008 are both EOL now, so I am fine just updating to the new default.

@JStroom
Copy link

JStroom commented Nov 27, 2021

Hi @dbwiddis, Yes that is exactly what I was looking for. I was planning to create a pull request after the weekend, but this is better than what I had in mind. Thanks!

@dblock dblock merged commit 7dbbf4b into java-native-access:master Nov 28, 2021
@dbwiddis dbwiddis deleted the maxtokensize branch November 28, 2021 20:36
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

Successfully merging this pull request may close these issues.

Update the MAX_TOKEN_SIZE in Sspi.java to 48000
4 participants