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
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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
isRealmValid
public static boolean isRealmValid(java.lang.String realmName) throws javax.naming.NamingExceptionReturns 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
-