Skip to content

Conversation

@tkyc
Copy link
Contributor

@tkyc tkyc commented Nov 14, 2024

Kerberos auth depends on calling Subject.getSubject(), which is deprecated since JDK 17. Fall back to acquiring the subject through the replacement API when the deprecation exception is thrown.

Codecov is a false negative. Existing tests do cover the scenario by being ran in different JDK versions.

@codecov
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 50.92%. Comparing base (ef6b770) to head (61e2a52).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...m/microsoft/sqlserver/jdbc/KerbAuthentication.java 0.00% 15 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2539      +/-   ##
============================================
- Coverage     50.93%   50.92%   -0.02%     
- Complexity     3893     3898       +5     
============================================
  Files           147      147              
  Lines         33371    33384      +13     
  Branches       5593     5595       +2     
============================================
+ Hits          16999    17001       +2     
- Misses        13963    13976      +13     
+ Partials       2409     2407       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@Jeffery-Wasty Jeffery-Wasty modified the milestone: 12.9.0 Nov 19, 2024
@lilgreenbird lilgreenbird changed the title Deprecation of Security Manager fix Changed how Kerberos authentication acquires subject to provide compatibility for Kerberos with Java 23 and above Nov 20, 2024
@Jeffery-Wasty Jeffery-Wasty merged commit 5297987 into main Nov 20, 2024
17 of 19 checks passed
@Jeffery-Wasty Jeffery-Wasty deleted the kerberos-subject-deprecation-fix branch November 20, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed/Merged PRs

Development

Successfully merging this pull request may close these issues.

JDK 23 support - UnsupportedOperationException: getSubject is supported only if a security manager is allowed

5 participants