I would like to be able to use the gnupg_key resource to import both public and private keys. Whilst this would have implicitly worked for the import, delete would have failed on a private key so this pull request adds a key_type parameter to the resource with possible values public, private, and both to define the type of keys being managed by the resource definition.
By default the key_type is public to maintain backwards compatibility and support the usual case.
I've added specs and beaker tests but didn't add any specserver tests since it appears the rake task to run them is missing.
I considered adding some validation to prevent private keys from being added from remote URLs for security reasons but I haven't added that yet. If you think it makes sense, I can add that too.
I would like to be able to use the
gnupg_key
resource to import both public and private keys. Whilst this would have implicitly worked for the import, delete would have failed on a private key so this pull request adds akey_type
parameter to the resource with possible valuespublic
,private
, andboth
to define the type of keys being managed by the resource definition.By default the
key_type
ispublic
to maintain backwards compatibility and support the usual case.I've added specs and beaker tests but didn't add any specserver tests since it appears the rake task to run them is missing.
I considered adding some validation to prevent private keys from being added from remote URLs for security reasons but I haven't added that yet. If you think it makes sense, I can add that too.