Repository navigation
feat(agent): the egress proxy logs the address it connected to, or refused - #535
Merged
Merged
Conversation
…fused A tunnel's line names the address the socket connected to, as the guard checked it; a refusal names the addresses it was about (not public, or not answering). A name that resolves somewhere it should not then leaves its address in the server's journal. Suggested in a dev.to comment on the registry article. Signed-off-by: samuel mbabhazi <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
The egress proxy (ADR 0023) now logs the address behind each outcome. This was suggested in a comment on the dev.to article about the registry and loopback.
What changed
egress tunnelgainsaddress: the address the socket connected to, exactly as the dialer's guard checked it. It is never resolved again.egress refusedgainsaddresses, the addresses the refusal was about:not_public, the ones that are not public (for a name with one private answer among public ones, only that one);unreachable, the ones that did not answer;unresolved, an empty list.What did not change
What the proxy allows or refuses is the same:
The existing refusal tests pass unchanged. Headers, paths and
Proxy-Authorizationare still never logged (same test).How it was tested
TestLogsHostsAddressesAndOutcomesOnlychecks the exact lines:8.8.8.8:443;10.0.0.5:443;169.254.169.254:443;unreachablewith9.9.9.9:443;go test -race ./agent/internal/egress/,go test ./agent/...andgolangci-lintare clean.Security considerations
Addresses go to the server's own journal (
journalctl -u shipkeep-egress), next to the host name that was already logged. Nothing else is added.