Configure the ProxyAdminService listeners and peer discovery - #271
Draft
liam-lowe wants to merge 1 commit into
Draft
Configure the ProxyAdminService listeners and peer discovery#271liam-lowe wants to merge 1 commit into
liam-lowe wants to merge 1 commit into
Conversation
liam-lowe
force-pushed
the
liam-lowe/proxyadmin-config
branch
from
September 2, 2026 00:30
76af9da to
a1a023b
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.
Adds a
proxyAdminblock to the config. It carries a loopback listener for local operator queries, an optional peer listener that serves the other pods of this deployment, and peer discovery by DNS or a static address list.Validation composes through
S2SProxyConfig.Validate(). A bad value surfaces asproxyAdmin.peer: tls.caServerName: is requiredand names the field that caused it. Only configuration that can never work is rejected here. Failures that depend on the environment are left to runtime, such as a port already in use or a name that does not resolve.Three of those checks cover a listener that would start up looking configured while being weaker than it reads:
proxyAdmin.listenAddressmust be loopback. That listener has no TLS and no authorization. Off host it publishes the deployment's topology to anything that can reach it. The error namesproxyAdmin.peeras the listener that authenticates its callers.proxyAdmin.peer.tls.caServerNameis required whenever peer TLS is enabled. Siblings are dialed by IP. Without it the dial has no name to verify the sibling certificate against. The failure lands insideencryption.GetClientTLSConfigrather than at load.proxyAdmin.peer.tls.skipCAVerificationmust be false.GetClientTLSConfigassigns it toInsecureSkipVerify. Every sibling this pod dials would go unverified while the config still reads as TLS secured.Each discovery provider gets its own typed block, selected by name. Every layered configuration tool in this stack deep-merges and cannot delete keys. Switching provider through a Helm override leaves the previous provider's block behind. It has to be inert. A single flat options map could not be switched at all under strict decoding.
ProxyAdminis a value rather than a pointer because nil and an empty listen address already mean the same thing.AllowedMethods.ProxyAdminis deliberately not resolved throughauth.AccessControl, whoseIsAllowedreturns true for an empty list. That fail-open default is a compatibility promise the replication ACL depends on. Repeating it here would make the natural spelling of "off" the widest possible setting.Nothing reads this config yet.
TestProxyAdminConfigexercises it throughLoadConfigandS2SProxyConfig.Validate(). The composition into the parent validator is covered rather than assumed.Testing
make lint: 0 issues.go test ./...: every package passes.TestProxyAdminConfigadded: 9 subtests, one of which is a table of 12 configurations that must be rejected. Each asserts the message text rather than only that an error came back. The field path is the point.