Adding additional attributes to certificate request API call

Hello all,

I've been developing a python script that will send a csr, wait for the certificate to show up in venafi and then download the certificate. Currently I am sending some of the attributes such as first/last name, email, description and nickname.

Some of the attributes that I want to send are not a default in the API docs, such as: 

1. Team Distribution List/Mailbox

2. Change management Team Name

3. Telephone Number

Are there analogous attributes that I can attach to the API call? Also, the contact parameter seems to default to a "local:VenafiAdmin", will it also default the contacts to this via the API or do I need to explicitly define it in the call?

For reference, I have copied the send_csr function below. 


def send_csr(session, venafiurl, APIKey, certname, csr, venafi_location):
body = { "PolicyDN": venafi_location, "ObjectName": certname, "Description": certname + ".csr", "PKCS10": csr, "CASpecificAttributes": [{"Name": "Validity Period", "Value": "365"},
{"Name": "EntrustNET CA:Email Address", "Value": "TEST.TEST@TESTDOMAIN.com"},
{"Name": "EntrustNET CA:First Name", "Value": "FIRSTNAME"},
{"Name": "EntrustNET CA:Last Name", "Value": "LASTNAME"}]}
url = f"https://{venafiurl}/vedsdk/Certificates/Request"
r = session.post(url, data=json.dumps(body), headers={'Content-Type':'application/json', 'X-Venafi-Api-Key': APIKey})


Please sign in to leave a comment.