| Hi Martin Alfke, A possible workaround would be to purge the keys through the root user (or another superuser), such as:
user { 'root': |
purge_ssh_keys => ['/etc/ssh/keys/testuser'], |
}
|
If we add this functionality it would good to also have something similar in the sskeys_core module. Currently the file owner is controlled by the user parameter, and the file path maps to target, so a sample authorized key would be:
ssh_authorized_key { 'testuser@ubuntu': |
ensure => present, |
user => 'root', |
target => '/etc/ssh/keys/testuser', |
type => 'ssh-rsa', |
key => 'AAAAB3NzaqXfdaQ==', |
}
|
The limitation in the module would be that the file permissions are hardcoded to 600. This can be circumvented by ensuring the mode through a file resource, but it will cause corrective changes each time an authorized key changes. (authorized key resource enforces 600, file resource enforces 644). Since the functionality you request is achievable through a workaround in the user resource, I'm inclined against adding a new parameter in the user type. Josh Cooper what are your thoughts on this? |