Class KustoTrustedEndpoints
- java.lang.Object
-
- com.microsoft.azure.kusto.data.auth.endpoints.KustoTrustedEndpoints
-
public class KustoTrustedEndpoints extends Object
A helper class to determine which DNS names are "well-known/trusted"' Kusto endpoints. Untrusted endpoints might require additional configuration before they can be used, for security reasons.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanenableWellKnownKustoEndpointsValidation
-
Constructor Summary
Constructors Constructor Description KustoTrustedEndpoints()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddTrustedHosts(List<MatchRule> rules, boolean replace)Adds the rules that determine if a hostname is a valid/trusted Kusto endpoint (extends existing rules).static voidsetOverridePolicy(Predicate<String> matcher)static voidvalidateTrustedEndpoint(String uri)Throw an exception if the endpoint specified is not trusted.static voidvalidateTrustedEndpoint(String uri, String loginEndpoint)Throw an exception if the endpoint specified is not trusted.static voidvalidateTrustedEndpoint(URI uri, String loginEndpoint)Is the endpoint uri trusted?
-
-
-
Method Detail
-
setOverridePolicy
public static void setOverridePolicy(Predicate<String> matcher)
- Parameters:
matcher- Rules that determine if a hostname is a valid/trusted Kusto endpoint (replaces existing rules). NuisLocalAddressolicy".
-
validateTrustedEndpoint
public static void validateTrustedEndpoint(String uri, String loginEndpoint) throws KustoClientInvalidConnectionStringException
Throw an exception if the endpoint specified is not trusted.- Parameters:
uri- - Kusto endpointloginEndpoint- The login endpoint to check against.- Throws:
KustoClientInvalidConnectionStringException- - Endpoint is not a trusted Kusto endpoint
-
validateTrustedEndpoint
public static void validateTrustedEndpoint(String uri) throws KustoClientInvalidConnectionStringException
Throw an exception if the endpoint specified is not trusted.- Parameters:
uri- - Kusto endpoint- Throws:
KustoClientInvalidConnectionStringException- - Endpoint is not a trusted Kusto endpoint
-
validateTrustedEndpoint
public static void validateTrustedEndpoint(URI uri, String loginEndpoint) throws KustoClientInvalidConnectionStringException
Is the endpoint uri trusted?- Parameters:
uri- The endpoint to inspect.loginEndpoint- The login endpoint to check against.- Throws:
KustoClientInvalidConnectionStringException- - Endpoint is not a trusted Kusto endpoint
-
-