Venafi / ansible-collection-venafi

Ansible collection for managing machine identities (certificates and keys) using Venafi
Apache License 2.0
13 stars 7 forks source link

Return principals whenever the ssh_ca role is executed #16

Open ricrodriguezg opened 2 years ago

ricrodriguezg commented 2 years ago

BUSINESS PROBLEM While using the ssh_ca role form the collection when you execute it for the first time passing the credentials to get the public key CA and the principals it returns public key CA in a file and the principals are sent to the standard output in JSON format (ssh_ca_principals key), however when it is executed again and the key is already present in the system the role would not try to retrieve the principals again from TPP resulting in the ssh_ca_principals key in the JSON being null, e.g.

    "msg": {                                                                                                                                                                                  
        "changed": false,                                                                                                                                                                     
        "failed": false,                                                                                                                                                                      
        "ssh_ca_principals": null,                                                                                                                                                            
        "ssh_ca_public_key": null,                                                             
        "ssh_ca_public_key_filename": "/ssh_ca_dir/cit-name.pub"                                                                                     
    }                                                                                                                                                                                         
}

PROPOSED SOLUTION Provide the principals either in a file stored in the ansible machine or connect to TPP whenever the ssh_ca role is executed and get the list of principals each time.

CURRENT ALTERNATIVES Only executing the playbook the first time and if there is any change on the principals updating the principals manually.

VENAFI EXPERIENCE

I've been using Venafi's products for almost a year, so far a great experience, I use them everyday :+1: