Skip to content

Conversation

@sunshowers
Copy link
Contributor

Add a command that can upload data to wicketd, via stdin from wicket.

This also makes wicket behave like a login shell: read arguments passed
in with -c.

Tested by creating a user locally with wicket as the login shell, then
running:

% cat foo.bin | ssh wicket-test@localhost upload my-artifact 0.1.0
Jan 13 22:12:25.946 INFO read artifact my-artifact:0.1.0 (11957848 bytes) from stdin, uploading to wicketd
Jan 13 22:12:25.972 INFO successfully uploaded my-artifact:0.1.0 (11957848 bytes) to wicketd

Created using spr 1.3.4
Copy link
Contributor

@andrewjstone andrewjstone left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks for fixing the logging too!

@sunshowers sunshowers enabled auto-merge (squash) January 14, 2023 02:37
@jclulow
Copy link
Collaborator

jclulow commented Jan 14, 2023

When we look at locking down the sshd configuration we might want to consider not doing the login shell pattern, but rather using the sshd configuration directive ForceCommand and then having the shell program process the SSH_ORIGINAL_COMMAND environment variable that would be set when the forced command is invoked.

@sunshowers
Copy link
Contributor Author

When we look at locking down the sshd configuration we might want to consider not doing the login shell pattern, but rather using the sshd configuration directive ForceCommand and then having the shell program process the SSH_ORIGINAL_COMMAND environment variable that would be set when the forced command is invoked.

Good point! I don't have a sense of which one's better, but if we decide to do that we can switch over to it pretty easily.

@sunshowers sunshowers merged commit fca38b8 into main Jan 14, 2023
@sunshowers sunshowers deleted the sunshowers/spr/wicket-add-an-upload-command branch January 14, 2023 07:36
nmbr7 added a commit to nmbr7/omicron that referenced this pull request Jan 14, 2023
smklein pushed a commit that referenced this pull request Jan 18, 2023
Add a command that can upload data to wicketd, via stdin from wicket.

This also makes wicket behave like a login shell: read arguments passed
in with `-c`.

Tested by creating a user locally with wicket as the login shell, then
running:

```
% cat foo.bin | ssh wicket-test@localhost upload my-artifact 0.1.0
Jan 13 22:12:25.946 INFO read artifact my-artifact:0.1.0 (11957848 bytes) from stdin, uploading to wicketd
Jan 13 22:12:25.972 INFO successfully uploaded my-artifact:0.1.0 (11957848 bytes) to wicketd
```
@sunshowers sunshowers mentioned this pull request Jan 24, 2023
14 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.

4 participants