added code for wellknown kusto endpoints#456
Merged
ag-ramachandran merged 2 commits intofeature/IngestV2from Jan 20, 2026
Merged
added code for wellknown kusto endpoints#456ag-ramachandran merged 2 commits intofeature/IngestV2from
ag-ramachandran merged 2 commits intofeature/IngestV2from
Conversation
58b1b73 to
70b72d3
Compare
ag-ramachandran
requested changes
Jan 12, 2026
ingest-v2/src/main/kotlin/com/microsoft/azure/kusto/ingest/v2/KustoBaseApiClient.kt
Outdated
Show resolved
Hide resolved
.../src/main/kotlin/com/microsoft/azure/kusto/ingest/v2/auth/endpoints/KustoTrustedEndpoints.kt
Show resolved
Hide resolved
.../src/main/kotlin/com/microsoft/azure/kusto/ingest/v2/auth/endpoints/KustoTrustedEndpoints.kt
Outdated
Show resolved
Hide resolved
.../src/main/kotlin/com/microsoft/azure/kusto/ingest/v2/auth/endpoints/KustoTrustedEndpoints.kt
Outdated
Show resolved
Hide resolved
...ain/kotlin/com/microsoft/azure/kusto/ingest/v2/auth/endpoints/WellKnownKustoEndpointsData.kt
Outdated
Show resolved
Hide resolved
...om/microsoft/azure/kusto/ingest/v2/exceptions/KustoClientInvalidConnectionStringException.kt
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new mechanism for validating that Kusto endpoints are trusted, using a configurable set of rules loaded from a shared JSON file. The validation logic is enforced at client initialization, and is extensible for custom or additional trusted hosts. The changes include new utility classes for endpoint rule matching, data loading from JSON, and a custom exception for invalid endpoints. The build process is also updated to ensure the JSON file is available at runtime.
Endpoint trust validation and configuration:
KustoTrustedEndpointsutility to validate Kusto endpoints against a set of trusted hostnames and suffixes, loaded fromWellKnownKustoEndpoints.json. The logic allows for overrides and additional trusted hosts, and throws a custom exception if validation fails.FastSuffixMatcherfor efficient hostname/suffix rule matching, and supporting data classes for rule and match result representation.WellKnownKustoEndpointsDatafor loading and parsing the trusted endpoints JSON file from the classpath, with robust error handling.KustoClientInvalidConnectionStringExceptionfor signaling invalid or untrusted endpoints.Integration and enforcement in client initialization:
KustoBaseApiClientto validate thedmUrlendpoint on initialization unless security checks are explicitly skipped, using the new trusted endpoints logic. [1] [2]Build process update:
ingest-v2/pom.xmlto copyWellKnownKustoEndpoints.jsonfrom the data module into the build output, ensuring the trusted endpoints configuration is always available at runtime.### AddedChanged
Fixed