Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passthrough mode #342

Open
rcarmo opened this issue Apr 14, 2024 · 4 comments
Open

Passthrough mode #342

rcarmo opened this issue Apr 14, 2024 · 4 comments

Comments

@rcarmo
Copy link
Member

rcarmo commented Apr 14, 2024

Following up on #341, we should look at a way to have piku "step out of the way" for unfettered ssh sessions, probably depending on a specific key. Quoting myself from that thread:

You'd do --passthrough (or add an environment variable to authorized_keys, which actually seems better) to "open up" for extra commands, with piku only handling deploys.

Then you could set up another key with the default "restricted" behavior for CI. We'd probably even remove the run command, since I keep forgetting to use '-t' for sane terminal handling

There are some security implications here, but I too would like to avoid having to do workarounds (like logging in as another user) just to get at the piku environment for some trivial app-specific tasks, and don't really like using the run command.

@chr15m
Copy link
Contributor

chr15m commented Apr 19, 2024

@rcarmo what's the ideal implementation here for you? How does this sound:

  • Env var like 'PIKU_SSH_PASSHTROUGH=1' in authorized_keys.
  • If set, some kind of @click catch-all handler (instead of per-command special cases like the scp one already merged).

I took a quick look at the possibility of Click catch-all and nothing jumped out but hopefully there's a sane way to implement this.

@rcarmo
Copy link
Member Author

rcarmo commented Apr 19, 2024

That was broadly what I was trying to test before work caught up with me. Was trying with a second key first just to isolate things.

@chr15m
Copy link
Contributor

chr15m commented Apr 19, 2024

Did you work out a good way to do a "wildcard" command with Click? Or bypass click entirely?

@rcarmo
Copy link
Member Author

rcarmo commented Apr 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants