Skip to content

Add cli option for passing a second key#3

Closed
alexhulbert wants to merge 1 commit into
mainfrom
second-key
Closed

Add cli option for passing a second key#3
alexhulbert wants to merge 1 commit into
mainfrom
second-key

Conversation

@alexhulbert

Copy link
Copy Markdown
Member

📝 Summary

  • Replace single --ssh-pubkey-file with --host-ssh-pubkey-file and --container-ssh-pubkey-file flags
  • Serve both pubkeys at /pubkey endpoint, separated by a newline
  • Container pubkey is optional

⛱ Motivation and Context

  • Now that the searcher provides their encryption password over an SSH to the CVM host (dropbear), we need to provide both keys to prevent an MITM attack
  • The searcher can just copy the text into known_hosts as before

✅ I have run these commands

  • make lint
  • make test
  • go mod tidy

@alexhulbert alexhulbert requested a review from Ruteri May 23, 2025 23:34
@alexhulbert alexhulbert self-assigned this May 23, 2025
@alexhulbert

Copy link
Copy Markdown
Member Author

The lint doesn't work in CI but it works fine on my laptop

@Ruteri Ruteri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This server doesn't have to be specific to sandboxes — and the API actually is not still, simply returning a list of pubkeys.
However, the flags are extremely specific to sandboxes, I think needlessly so. Would it work to simply allow a list of files be passed?

@alexhulbert alexhulbert closed this Jun 4, 2025
@alexhulbert alexhulbert mentioned this pull request Jun 4, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants