Skip to content

fix: clear java.security.krb5.conf system property after GSSAPI authentication - #566

Open
Kcchouette wants to merge 1 commit into
lsc-project:masterfrom
Kcchouette:fix-gssapi-krb5-conf
Open

Kcchouette wants to merge 1 commit into
lsc-project:masterfrom
Kcchouette:fix-gssapi-krb5-conf

Conversation

@Kcchouette

Copy link
Copy Markdown
Contributor

When using GSSAPI authentication, LSC sets java.security.krb5.conf and java.security.auth.login.config system properties but never clears them.

This causes subsequent LSC runs within the same JVM to fail with 'Multiple Kerberos connections not supported' error.

Changes:

  • Add synchronized block in getLdapProperties() for thread safety
  • Add cleanSecurityProperties() to clear system properties and reset JAAS
  • Add reset() method to clear cache and security properties
  • Integrate cleanup in Launcher.run(), SimpleSynchronize.close(), and LscConfiguration.reset()
  • Add comprehensive tests including concurrent access test

…ntication

When using GSSAPI authentication, LSC sets java.security.krb5.conf and
java.security.auth.login.config system properties but never clears them.
This causes subsequent LSC runs within the same JVM to fail with
'Multiple Kerberos connections not supported' error.

Changes:
- Add synchronized block in getLdapProperties() for thread safety
- Add cleanSecurityProperties() to clear system properties and reset JAAS
- Add reset() method to clear cache and security properties
- Integrate cleanup in Launcher.run(), SimpleSynchronize.close(), and
  LscConfiguration.reset()
- Add comprehensive tests including concurrent access test

Based on fix-gssapi-krb5-conf.patch by Kcchouette.
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.

1 participant