Repository navigation
Conversation
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 an optional mTLS client certificate so the agent can talk to a reverse proxy
that requires one. The use case is locking down the publicly reachable endpoints
of a self hosted server so they don't answer anonymous requests at all.
This does not change existing behavior. Without the new flags the agent behaves
exactly as before, -insecure included. It adds two installer flags,
-client-cert and -client-key, and two config values: ClientCert and
ClientKey in the registry on windows, clientcert and clientkey in
/etc/tacticalagent on unix. Both have to be given together, the installer
aborts if only one is set or a file doesn't exist.
The cert is used for the rest client, the nats connection (both wss and standard
tcp), the installer requests and the self update / nushell / deno downloads. Go
only sends a client cert when the server actually asks for one, so the github
downloads are unaffected. Chocolatey and the public ip lookup are untouched.
One small side effect in install.go: SetTLSClientConfig now runs before
SetRootCertificate, because resty replaces the whole tls config and the root ca
from -cert was getting dropped. That path was only reachable together with
-insecure before, so it never showed.
This is an extra transport level gate in front of the existing token auth, not a
replacement for it. The mesh agent is a separate binary and not covered.
Tested on windows against nginx.