ssl_inspection#
The following methods allow for interaction with the ZIA SSL Inspection Settings API endpoints.
Methods are accessible via zia.ssl_inspection
- class SSLInspectionAPI#
Bases:
object
- delete_int_chain()#
Deletes the Intermediate Root CA certificate chain.
- Returns:
The status code for the operation.
- Return type:
- generate_csr(cert_name, cn, org, dept, city, state, country, signature)#
Generates a Certificate Signing Request.
- Parameters:
cert_name (str) – Certificate Name
cn (str) – Common Name
org (str) – Organisation
dept (str) – Department
city (str) – City
state (str) – State
country (str) –
Country. Must be in the two-letter country code (ISO 3166-1 alpha-2) format and prefixed by COUNTRY. E.g.:
United States = US = COUNTRY_US Australia = AU = COUNTRY_AU
signature (str) – Certificate signature algorithm. Accepted values are SHA_1 and SHA_256.
- Returns:
The response code for the operation.
- Return type:
Examples
>>> zia.ssl.generate_csr(cert_name='Example.com Intermediate CA 2', ... cn='Example.com Intermediate CA 2', ... org='Example.com', ... dept='IT', ... city='Sydney', ... state='NSW', ... country='COUNTRY_AU', ... signature='SHA_256')
- get_csr()#
Downloads a CSR after it has been generated.
- Returns:
Base64 encoded PKCS#10 CSR text.
- Return type:
Examples
Retrieve the CSR for use in another function.
>>> csr = zia.ssl.get_csr()
- get_intermediate_ca()#
Returns information on the signed Intermediate Root CA certificate.
- Returns:
The Intermediate Root CA resource record.
- Return type:
Box
Examples
>>> pprint(zia.ssl.get_intermediate_ca())
- upload_int_ca_cert(cert)#
Uploads a signed Intermediate Root CA certificate.
- Parameters:
cert (tuple) –
The Intermediate Root CA certificate tuple in the following format, where int_ca_pem is a
File Object
representation of the Intermediate Root CA certificate PEM file:('filename.pem', int_ca_pem)
- Returns:
The status code for the operation.
- Return type:
Examples
Upload an Intermediate Root CA certificate from a file:
>>> zia.ssl.upload_int_ca_cert(('int_ca.pem', open('int_ca.pem', 'rb')))
- upload_int_ca_chain(cert)#
Uploads the Intermediate Root CA certificate chain.
- Parameters:
cert (tuple) –
The Intermediate Root CA chain certificate tuple in the following format, where int_ca_chain_pem is a
File Object
representation of the Intermediate Root CA certificate chain PEM file:('filename.pem', int_ca_chain_pem)
- Returns:
The status code for the operation
- Return type:
Examples
Upload an Intermediate Root CA chain from a file:
>>> zia.ssl.upload_int_ca_chain(('int_ca_chain.pem', open('int_ca_chain.pem', 'rb')))