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

support removing SSH keys entirely #296

Closed
cgwalters opened this issue Jan 14, 2019 · 15 comments
Closed

support removing SSH keys entirely #296

cgwalters opened this issue Jan 14, 2019 · 15 comments
Assignees
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@cgwalters
Copy link
Member

Ref: #115 (comment)

Currently if a user provides an SSH key to the installer, then decides to remove it, the MCD will silently keep the last specified key.

In #292 we fixed a panic when the user section was empty. I think we should take the next step and remove the authorized keys.

The concrete scenario here is an administrator who initially provides a SSH key just to give themselves a "fallback", then gains confidence in the system and decides to remove it.

@kikisdeliveryservice
Copy link
Contributor

/assign

@ashcrow
Copy link
Member

ashcrow commented Jan 14, 2019

/kind jira
/kind enchancement

@kikisdeliveryservice
Copy link
Contributor

kikisdeliveryservice commented Jan 14, 2019

I'll work on this, but I will note that there is a difference between an empty Passwd:User section and an empty User:SSHAuthorizedKeys section for user core. This issue would cover the latter case as opposed to the former.

@openshift-bot
Copy link
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 Sep 1, 2020
@openshift-bot
Copy link
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-robot openshift-ci-robot 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 Oct 1, 2020
@ashcrow
Copy link
Member

ashcrow commented Oct 1, 2020

Is this something we still need/want to do or should we go ahead and close this issue?

@openshift-bot
Copy link
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-robot
Copy link
Contributor

@openshift-bot: Closing this issue.

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
Copy link
Contributor

openshift-ci bot commented May 31, 2021

@fgimenezm: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

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.

@fgimenezm
Copy link

This is even harder in latest versions. Removing the ssh MachineConfig now tries to remove the "core" user altogether which is not possible and makes the MCO fail to update the nodes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 31, 2021

@fgimenezm: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

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.

@fgimenezm
Copy link

fgimenezm commented Jun 2, 2021

This could be optimized, but currently if you'd like to remove ssh keys, you may update the sshkey MC to explicitly have sshkeys: []

This doesn't work. It results in this message being logged:

Message: Node lab1-czvfr-master-0 is reporting: "can't reconcile config rendered-master-03e6e309d18a7fe4295351a4afd58d80 with rendered-master-aac2805716bf9df925f7608973f6de83: ignition passwd user section contains unsupported changes: user must be core and have 1 or more sshKeys: unreconcilable"

That is because of this code here: https://github.com/kikisdeliveryservice/machine-config-operator/blob/c415ce6aed25604bc1d2478951db16759dac31f6/pkg/daemon/update.go#L850

@kikisdeliveryservice
Copy link
Contributor

Ah yes sorry that is correct, you will need to supply 1 or more sshkeys.

@openshift-bot
Copy link
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
Contributor

openshift-ci bot commented Jul 3, 2021

@openshift-bot: Closing this issue.

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 as completed Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants