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

Add username forwarding to target container #2

Merged
merged 3 commits into from
Oct 22, 2016

Conversation

segfly
Copy link
Member

@segfly segfly commented Sep 16, 2016

Implementation of #1


This change is Reviewable

@segfly
Copy link
Member Author

segfly commented Sep 16, 2016

Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


ssh-gitway/etc/entrypoint/forcecmd.sh, line 7 at r1 (raw file):

. /etc/entrypoint/rc

if [ "$FORCE_GIT_USER" -eq "1" ]; then

Forcing git user is supposed to be default, but will not be default with this logic.


Comments from Reviewable

@lynsei
Copy link

lynsei commented Oct 11, 2016

Review status: all files reviewed at latest revision, 2 unresolved discussions.


ssh-gitway/etc/ssh.d/sshd_config, line 25 at r1 (raw file):

PasswordAuthentication no
AllowAgentForwarding yes
ForceCommand . /etc/entrypoint/rc && ${SSH_ORIGINAL_COMMAND:-cat /etc/motd} || ssh -q -t -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p ${TARGET_SSH_PORT:-22} "git@${USER}" "${SSH_ORIGINAL_COMMAND}"

Certainly cleaner having it in the shell script. I wonder are we doing any sanitizing on USER or SSH_ORIGINAL_COMMAND... will have to look more through the code and see.


Comments from Reviewable

@segfly
Copy link
Member Author

segfly commented Oct 22, 2016

Reviewed 3 of 3 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


ssh-gitway/etc/entrypoint/forcecmd.sh, line 7 at r1 (raw file):

Previously, segfly (Nicholas Pace) wrote…

Forcing git user is supposed to be default, but will not be default with this logic.

Done.

Comments from Reviewable

@segfly segfly merged commit 5d0cdc2 into segfly-oss:master Oct 22, 2016
@segfly segfly deleted the arbitrary_target_users branch October 22, 2016 16:49
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.

None yet

2 participants