Copy of the SSH key happens only during install

Bug #1891655 reported by Benjamin Allot
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
userdir-ldap-charms
Won't Fix
Medium
Unassigned

Bug Description

The "copy_user_key" method is only called upon "install" hook

  @hooks.hook("install")
  def install():
      setup_udldap()
      copy_user_keys()
      reconfigure_sshd()

This means that every time a key is refreshed somehow by any other means, we never refresh it.

I guess it shall be called upon update-status and be a noop operation if there is no difference and only append key, not delete any.

This way if something else (say a nova-compute charm) refresh some ssh keys, they are refreshed automatically.

Arguably this could be handled by the nova-compute charm itself but I fear this is going to collide, so the "append only" feature makes sense anyway.

Benjamin Allot (ballot)
description: updated
Revision history for this message
Drew Freiberger (afreiberger) wrote :

This is definitely an issue, and why we've stopped deploying to cloud nodes, it breaks nova migration due to the key copying.

I think we might be better off having a list of users that sshd uses ~/.ssh/authorized_keys for, instead of forcing all user keys to /var/lib/misc/ or /etc/ssh/user-authorized-keys, rather than having to have a cron to keep up with variable auth-keys files.

Andrea Ieri (aieri)
Changed in charm-userdir-ldap:
status: New → Triaged
importance: Undecided → Medium
information type: Proprietary → Public
Revision history for this message
Eric Chen (eric-chen) wrote :
Changed in charm-userdir-ldap:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.