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

manage large Kerberos tokens #91

Merged
merged 2 commits into from
Dec 29, 2023
Merged

Conversation

fralken
Copy link
Collaborator

@fralken fralken commented Nov 17, 2023

This patch checks whether the returned Kerberos token, encoded in base64, fits the available buffer. If it is larger, the buffer is reallocated with the required dimension.
This patch was circulating for a few years and was recently proposed here by @bas524. I just cleaned it up a bit and made the reallocation conditional only when it is necessary to expand the buffer.

In the meantime, for the macos version, I replaced the deprecated gssapi apis with the GSS framework and removed some deprecated code.

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.14.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@fralken
Copy link
Collaborator Author

fralken commented Dec 2, 2023

@bas524 if you can test that this works for you we can merge this PR.

Copy link

@jschwartzenberg
Copy link
Collaborator

I can at least confirm that Kerberos authentication works fine with this branch. I did not have issues in the past however.

@bas524
Copy link
Contributor

bas524 commented Dec 29, 2023

@fralken, unfortunately I can't verify this PR, because I've changed my environment.

@fralken
Copy link
Collaborator Author

fralken commented Dec 29, 2023

Thanks for the feedback @jschwartzenberg. It confirms that at least there are no regressions with this PR. I guess I can merge it.
No problem @bas524. Probably it is not very frequent to have a Kerberos configuration that generate large (more than 4kB in size) tokens.

@fralken fralken merged commit 1aa4b4f into versat:master Dec 29, 2023
11 of 12 checks passed
@fralken fralken deleted the kerberos-token branch January 23, 2024 15:48
@jschwartzenberg
Copy link
Collaborator

I can confirm that this solved Keberos issues for at least one user! @bas524 many thanks for figuring this out! @fralken great we could get it merged!

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.

3 participants