On Mon, 20 Apr 2026 11:00:30 GMT, Kieran Farrell <[email protected]> wrote:

> In DNS-based KDC discovery failures are exposed as generic 'KrbException: 
> Cannot locate KDC / Unable to locate KDC for realm <REALM>' with no 
> indication whether the underlying DNS SRV lookup failed due to NXDOMAIN, 
> SERVFAIL, or a communication timeout.
> 
> To improve supportability, this patch updates 
> `KrbServiceLocator.getKerberosService(realm, protocol)` to rethrow the 
> original JNDI NamingException from the SRV lookup and attach a sanitized 
> failure category to the existing KrbException when both udp and tcp discovery 
> attempts fail, while preserving the original top level exception message. 
> `Config.getKDCFromDNS()` is updated to catch exception, sanitize it into the 
> relevant category to prevent leaking any senistive information and attach it 
> to the existing KrbException.
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: 91a4910e
Author:    Kieran Farrell <[email protected]>
Committer: Weijun Wang <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/91a4910edce99db23d6295c28b9ad62e4cacea79
Stats:     11 lines in 1 file changed: 5 ins; 2 del; 4 mod

8382403: Enhance Kerberos DNS KDC discovery logging to expose sanitized DNS 
failure

Reviewed-by: weijun

-------------

PR: https://git.openjdk.org/jdk/pull/30824

Reply via email to