chore: validate tls-name and auth-config-file in xdr config [KO-606] - #575
Open
sidntrivedi wants to merge 1 commit into
Open
chore: validate tls-name and auth-config-file in xdr config [KO-606]#575sidntrivedi wants to merge 1 commit into
sidntrivedi wants to merge 1 commit into
Conversation
sidntrivedi
force-pushed
the
chore/KO-606-xdr-validation
branch
2 times, most recently
from
August 6, 2026 07:35
db01acb to
40667ce
Compare
sidntrivedi
marked this pull request as ready for review
August 6, 2026 07:57
sidntrivedi
requested review from
abhishekdwivedi3060,
shubhamyelikar99 and
tanmayja
as code owners
August 6, 2026 07:57
sidntrivedi
force-pushed
the
chore/KO-606-xdr-validation
branch
from
August 7, 2026 08:30
0381240 to
a1b02d4
Compare
sidntrivedi
force-pushed
the
chore/KO-606-xdr-validation
branch
from
August 7, 2026 09:17
a1b02d4 to
8f2dc89
Compare
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.
Addresses https://aerospike.atlassian.net/browse/KO-606.
Summary
Adds the following validation in Aerospike validating webhook for XDR config:
1.
tls-namein xdr section must be the one that is mentioned in the network config2. connector: true requires auth-mode: none (or unset)
3. connector: true disallows auth-password-file
4. connector: true disallows auth-user
5. auth-user set requires auth-mode ≠ none
6. auth-user and auth-password-file must be set together (both directions)
7. auth-mode in {internal, external, external-insecure} requires auth-user
8. auth-mode: pki requires tls-name to be set
Testing done
Used the following source and destination cluster XDR specs:
Source XDR cluster
Destination XDR cluster
Validation Testing
1.
tls-namein xdr section must be the one that is mentioned in the network configtls-nameinxdrspec to a wrong value instead ofaerospike-a-0.test-runnerwhich is mentioned in thenetwork.tlssection.Before the validation added in webhook, server pod failed with the following error:
After the validation added in webhook:
2. connector: true requires auth-mode: none (or unset)
XDR Config:
Server failure:
Webhook failure:
3. connector: true disallows auth-password-file
tls-nameto correct value and then applied again to test the validation failure whenconnector: trueandauth-password-fileare set together.Before the validation was added in webhook, the server errored out with:
After the fix, validation on webhook layer itself:
4. connector: true disallows auth-user
Doesn't give direct error but from the docs, since
auth-methodis not supported withconnector: true, thereforeauth-useris also not allowed. Ref: https://aerospike.com/docs/database/reference/config#xdr__auth-user5. auth-user set requires auth-mode ≠ none
XDR config:
Server failure:
Webhook failure:
6. auth-user and auth-password-file must be set together (both directions)
XDR config:
Server failure:
Webhook failure:
7. auth-mode in {internal, external, external-insecure} requires auth-user
Server failure:
Webhook failure:
8. auth-mode: pki requires tls-name to be set
XDR config:
Server failure:
Webhook failure: