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

pkg/ssh: simplify ssh.Validate #1554

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

dfr
Copy link
Contributor

@dfr dfr commented Jul 11, 2023

This removes logic which forces the socket path (if present) to start with "/run" and uses (*URL).String to reconstruct the URI after applying port and user policy. Fixes #1551.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

The changes look good to my eyes but Validate does not have any unit tests. On top c/common does not presently pass Podman CI (see containers/podman#19178).

So I'd like to hold this PR until we can run this through Podman CI.

@vrothberg
Copy link
Member

/hold

@dfr
Copy link
Contributor Author

dfr commented Jul 12, 2023

The changes look good to my eyes but Validate does not have any unit tests. On top c/common does not presently pass Podman CI (see containers/podman#19178).

So I'd like to hold this PR until we can run this through Podman CI.

That was bothering me as well. There is indirect coverage through the existing tests but it would be better to test its behavior explicitly. I will add some explicit tests for Validate in this PR.

This removes logic which forces the socket path (if present) to start
with "/run" and uses (*URL).String to reconstruct the URI after applying
port and user policy. Fixes containers#1551.

Signed-off-by: Doug Rabson <dfr@rabson.org>
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@Luap99 PTAL

@rhatdan
Copy link
Member

rhatdan commented Jul 12, 2023

/lgtm

@rhatdan
Copy link
Member

rhatdan commented Jul 12, 2023

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dfr, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Luap99
Copy link
Member

Luap99 commented Jul 12, 2023

/hold cancel

@openshift-merge-robot openshift-merge-robot merged commit ba90855 into containers:main Jul 12, 2023
7 checks passed
@dfr dfr deleted the ssh-validate branch July 13, 2023 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ssh.Validate forces ssh connections to use socket paths which begin with /run
5 participants