Repository navigation
chore: vendor the installer that keeps the token off sudo's command line - #212
Merged
Merged
Conversation
…s the token off sudo's command line The installer's sudo re-exec hands the enrollment token to the root child in a 0600 file instead of on sudo's command line, where any local user could read it in ps for the length of the install. The vendored copy and its digest move to that commit; TestInstallerIsTheCopyRefNames holds them together.
…s the token over in a private directory The review of the file handover moved the token file into a 0700 directory the root child verifies; the vendored copy and its digest follow.
…ses an open TMPDIR for the token The re-check of the token handover made the installer refuse a TMPDIR anyone can rename in and name an ACL on the token directory; the vendored copy and its digest follow.
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.
Vendors the installer from lattice-node-agent 40 (LatticeNet/lattice-node-agent#40), which keeps the enrollment token off sudo's command line during the installer's re-exec. Base:
integrationat f3a857f. Not merged, tagged or released.What changes
internal/agentinstall/install.shis the lattice-node-agent installer at f7deddc, byte for byte.RefandSHA256inagentinstall.gomove with it, andTestInstallerIsTheCopyRefNamesholds the three together./tools/agent/install.shserves the new copy. The enrollment and reconfigure commands are unchanged.Tests
go test ./internal/agentinstall/passes.go test -run 'Installer|InstallScript|Enroll|Vendored|Reconfigure' ./internal/server/passes. That includesTestVendoredInstallerAcceptsWhatTheServerRenders, which runs this copy on what the enrollment command renders.Review
The security review is on the installer PR. The enrollment command's own exposure,
env LATTICE_NODE_TOKEN=...in a pasted line, is outside this change and reported to the operator.