[PUP-1174] PR (2247) Ability to purge .ssh/authorized_keys Created: 2013/12/18  Updated: 2014/12/07  Resolved: 2014/03/26

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: PUP 3.6.0

Type: Improvement Priority: Normal
Reporter: redmine.exporter Assignee: Unassigned
Resolution: Fixed Votes: 13
Labels: redmine
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
is blocked by PUP-1955 purge_ssh_keys causes stack trace whe... Closed
relates to MODULES-7603 Ability to purge sshkeys Accepted
Story Points: 2
Sprint: Week 2014-3-12 to 2014-3-19, Week 2014-3-19 to 2014-3-26, Week 2014-3-26 to 2014-4-02


As I'm new to puppet i'll try to describe this as good as i can.

I wanted to use the ssh_authorized_key type to add keys to ssh. After a discussion on irc i was suggested to use virtual resources and realize each key for each class needed. This worked well for me.

However i am not able to purge all other keys from the authorized_keys file without either specifying the comment or by copying an empty file there before adding the keys, which causes the system to lock up until the update is done.

I tried using resources{} type, but as ssh_authorized_key doesn't support "self.instances" this was also of no success.

The feature i'd like to have is an implementation of "instances" so resources{} works for authorized_keys.

Comment by Felix Frank [ 2014/01/11 ]

Pull request

Comment by Kylo Ginsberg [ 2014/01/29 ]

Needs to be played with a bit.

Comment by Andrew Parker [ 2014/03/12 ]

Merged into master in d53c6b.

Charlie Sharpsteen is going to be doing the functional review of this. The code looked clean.

Comment by Josh Cooper [ 2014/03/12 ]

Additional commit pushed to master in a71ab02

Comment by Charlie Sharpsteen [ 2014/03/17 ]

PUP-1955 just popped up, related to the eval_generate method added to the User type. Somehow, self[:purge_ssh_keys] is turning up as nil on CentOS:

# puppet resource user testuser ensure=present
Error: /User[testuser]: Failed to generate additional resources using 'eval_generate': undefined method `empty?' for nil:NilClass
user { 'testuser':
  ensure => 'present',

Comment by Kurt Wall [ 2014/03/17 ]

Marking this "Failed Review" pending the fix for PUP-1955.

Comment by Charlie Sharpsteen [ 2014/03/20 ]

Current status: this ticket is blocked until PUP-1955 is resolved. Once that ticket clears CI, this can re-enter functional review.

Generated at Sun Jul 12 22:25:54 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.