Skip to content

Bug 1918677: templates: use valid binary in AuthorizedKeysCommand#2355

Closed
vrutkovs wants to merge 1 commit intoopenshift:masterfrom
vrutkovs:revert-2087-rm-ssh-fragments
Closed

Bug 1918677: templates: use valid binary in AuthorizedKeysCommand#2355
vrutkovs wants to merge 1 commit intoopenshift:masterfrom
vrutkovs:revert-2087-rm-ssh-fragments

Conversation

@vrutkovs
Copy link
Copy Markdown
Contributor

@vrutkovs vrutkovs commented Jan 21, 2021

Setting AuthorizedKeysCommand with invalid path breaks ssh on hosts:

Jan 21 10:55:36 ip-10-0-137-119 sshd[130647]: error: AuthorizedKeysCommand path is not absolute
Jan 21 10:55:36 ip-10-0-137-119 sshd[130647]: Connection closed by authenticating user core 10.0.188.12 port 41306 [preauth]

This PR would set it to /bin/true

Reverts #2087

@vrutkovs
Copy link
Copy Markdown
Contributor Author

/cc @LorbusChris

@vrutkovs vrutkovs changed the title Revert "templates: Disable SSH keys lookup from authorized_keys.d on FCOS" Bug 1918677: Revert "templates: Disable SSH keys lookup from authorized_keys.d on FCOS" Jan 21, 2021
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Jan 21, 2021
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@vrutkovs: This pull request references Bugzilla bug 1918677, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1918677: Revert "templates: Disable SSH keys lookup from authorized_keys.d on FCOS"

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@vrutkovs
Copy link
Copy Markdown
Contributor Author

/retest

@sinnykumari
Copy link
Copy Markdown
Contributor

was it always broken or any recent FCOS update caused it?

@vrutkovs
Copy link
Copy Markdown
Contributor Author

was it always broken or any recent FCOS update caused it?

Always was broken, but we didn't get a chance to properly identify it :/

@sinnykumari
Copy link
Copy Markdown
Contributor

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 21, 2021
@LorbusChris
Copy link
Copy Markdown
Contributor

I don't think we want to remove that snippet entirely, since we still want to disable lookup from the authorized_keys.d dir.
Can the none command be replaced by a valid no-op command, e.g. /usr/bin/false?

/cc @bgilbert

@vrutkovs
Copy link
Copy Markdown
Contributor Author

Not sure why, but ssh'ing to masters from workers worked when I removed that setting (via oc debug node/...)

@bgilbert
Copy link
Copy Markdown
Contributor

Yeah, I'd try setting it to /bin/true instead.

@vrutkovs vrutkovs force-pushed the revert-2087-rm-ssh-fragments branch from 626e62a to 5fe1599 Compare January 21, 2021 17:53
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@vrutkovs: This pull request references Bugzilla bug 1918677, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1918677: Revert "templates: Disable SSH keys lookup from authorized_keys.d on FCOS"

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@vrutkovs
Copy link
Copy Markdown
Contributor Author

okay, updated, PTAL

@kikisdeliveryservice
Copy link
Copy Markdown
Contributor

hi @vrutkovs !

do we expect that okd-e2e-aws test to pass, looking at past runs it seems kind of flaky right?

@vrutkovs
Copy link
Copy Markdown
Contributor Author

do we expect that okd-e2e-aws test to pass, looking at past runs it seems kind of flaky right?

It should pass, yeah, must be flakes. This change doesn't affect e2e tests, just helps us debug failures.

/retest

@vrutkovs
Copy link
Copy Markdown
Contributor Author

/retest

@bgilbert
Copy link
Copy Markdown
Contributor

Content LGTM. Commit message and PR title need an update.

@kikisdeliveryservice
Copy link
Copy Markdown
Contributor

kikisdeliveryservice commented Jan 22, 2021

Content LGTM. Commit message and PR title need an update.

agree with @bgilbert 👍 hold so can be fixed

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 22, 2021
sshd_config dropin requires a valid binary to be used in 
AuthorizedKeysCommand
@vrutkovs vrutkovs force-pushed the revert-2087-rm-ssh-fragments branch from 5fe1599 to 5a913ec Compare January 22, 2021 09:00
@vrutkovs vrutkovs changed the title Bug 1918677: Revert "templates: Disable SSH keys lookup from authorized_keys.d on FCOS" Bug 1918677: templates: use valid binary in AuthorizedKeysCommand Jan 22, 2021
@vrutkovs
Copy link
Copy Markdown
Contributor Author

/retest

@vrutkovs
Copy link
Copy Markdown
Contributor Author

/retest

@bgilbert
Copy link
Copy Markdown
Contributor

/approve

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bgilbert, sinnykumari, vrutkovs

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

The pull request process is described here

Details 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

@vrutkovs
Copy link
Copy Markdown
Contributor Author

/retest

@vrutkovs vrutkovs force-pushed the revert-2087-rm-ssh-fragments branch from 9cc9d68 to 5a913ec Compare January 26, 2021 20:05
@vrutkovs
Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@LorbusChris
Copy link
Copy Markdown
Contributor

/retest

inline: |
# disable key lookup from ~/.ssh/authorized_keys.d/ on FCOS
AuthorizedKeysCommand none
AuthorizedKeysCommand /bin/true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you try explicitly setting it to nil/empty?

Suggested change
AuthorizedKeysCommand /bin/true
AuthorizedKeysCommand

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should re-instate the default

@openshift-bot
Copy link
Copy Markdown
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 2, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 21, 2021

@vrutkovs: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws-workers-rhel7 5a913ec link /test e2e-aws-workers-rhel7
ci/prow/okd-e2e-aws 5a913ec link /test okd-e2e-aws
ci/prow/e2e-aws-serial 5a913ec link /test e2e-aws-serial

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-bot
Copy link
Copy Markdown
Contributor

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci Bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 20, 2021
@openshift-bot
Copy link
Copy Markdown
Contributor

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jul 21, 2021

@openshift-bot: Closed this PR.

Details

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci Bot closed this Jul 21, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jul 21, 2021

@vrutkovs: This pull request references Bugzilla bug 1918677. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state.

Details

In response to this:

Bug 1918677: templates: use valid binary in AuthorizedKeysCommand

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants