Package com.microsoft.sqlserver.jdbc.dns
Class DNSKerberosLocator
- java.lang.Object
-
- com.microsoft.sqlserver.jdbc.dns.DNSKerberosLocator
-
public final class DNSKerberosLocator extends java.lang.Object
Represents a DNS Kerberos Locator
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isRealmValid(java.lang.String realmName)
Returns whether a realm is valid by retrieving the KDC list in DNS SRV records.
-
-
-
Method Detail
-
isRealmValid
public static boolean isRealmValid(java.lang.String realmName) throws javax.naming.NamingException
Returns whether a realm is valid by retrieving the KDC list in DNS SRV records. This will only work if DNS lookup is setup properly or the realms are properly defined in krb5 config file. Otherwise this will fail since the realm cannot be found.- Parameters:
realmName
- the realm to test- Returns:
- true if realm is valid, false otherwise
- Throws:
javax.naming.NamingException
- if DNS failed, so realm existence cannot be determined
-
-