Repository navigation
Conversation
… KMS provider URLs
vyommani
requested review from
dineshkumar-yadav,
mneethiraj,
pradeepagrawal8184 and
vikaskr22
November 5, 2026 03:43
This branch has not been deployed
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.
What changes were proposed in this pull request?
RANGER-5541 and RANGER-5812 added validation of endpoint URLs in service configurations for Test Connection and resource lookup. This PR applies that validation consistently for KMS services.
ServiceMgr: validateOutboundServiceConfigs() now evaluates the endpoint the client actually connects to. Nested provider URIs (kms://...) are unnested the same way the KMS client does it (ProviderUtils.unnestUri). Encoded values are normalised before validation. Every host in a multi-host (HA) provider list is validated.
KmsKeyMgr: the endpoint validation now runs in getKMSURL(), before Key Manager operations (get, search, create, rollover, delete) connect to the configured provider. A validation failure is reported to the caller as an invalid-input error instead of "service not found".
KmsKeyMgr / KMSClient: HTTP redirects are no longer followed by the Key Manager and Test Connection KMS clients.
Behaviour notes:
A KMS provider that responds with a redirect (for example http to https) must now be configured with its final scheme and host.
Provider endpoints that do not pass the existing service-config endpoint validation are now also rejected for Key Manager operations, not only for Test Connection.
How was this patch tested?
New TestKmsProviderHostCheck (security-admin): endpoint validation across validateConfig, lookupResource and all Key Manager operations; HA provider lists continue to be accepted; ordinary config values are unaffected; redirects are not followed.
New TestKMSClientRedirect (plugin-kms): Test Connection client does not follow redirects.
Updated TestKmsKeyMgr: the test provider URL fixture now uses a documentation address (192.0.2.10) so it passes the endpoint validation.
Existing TestKmsKeyMgr, TestServiceMgr, KMSClientTest pass, including the HA failover tests.
mvn clean install on security-admin and plugin-kms.