Skip to content

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

Merged
dblock merged 1 commit intojava-native-access:masterfrom
dbwiddis:maxtokensize
Nov 28, 2021
Merged

Increase Sspi#MAX_TOKEN_SIZE on Windows 8/Server 2012 and later#1398
dblock merged 1 commit intojava-native-access:masterfrom
dbwiddis:maxtokensize

Conversation

@dbwiddis
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

dblock commented Nov 26, 2021

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

@dbwiddis
Copy link
Copy Markdown
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
Copy Markdown

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