Skip to content

system-reinstall-bootc: Rework user authorized_key selection #1139

@ckyrouac

Description

@ckyrouac

Currently, system-reinstall-bootc will display a user selection screen. Upon selecting a non-root user, there is an error message that non-root users is not supported. I think instead we should do one of these things:

  • Only look for root's authorized_keys
    • if found, ask the user if they want to add them to the target bootc system
    • if not found or if no to previous, prompt the user if they are OK with no authorized_keys on the target bootc system. With a warning that the system may become inaccessible.
  • Look for all user's authorized_keys
    • if found, prompt the user with a user selection screen. Explain that the selected user's authorized_keys will be added to the target bootc system's root user
    • if not found, same prompt as above

An example use case:

  • Interactively install a Fedora image via anaconda, creating a user.
  • Add an authorized_key for the created user
  • run system-reinstall-bootc
  • error out with
$ sudo system-reinstall-bootc quay.io/fedora/fedora-bootc:41
Found only one user (chris) with 1 SSH authorized keys. Would you like to instalFound only one user (chris) with 1 SSH authorized keys. Would you like to install this user in the system? yes
ERROR Only importing the root user keys is supported for now
  • Next step is not clear. Now the user needs to copy the user's authorized_keys to root? Or don't copy the authorized_key over, complete the reinstall, end up with an inaccessible system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions