Namecheap SSL Certificate Management
New in version 2017.7.0.
This module uses the requests
Python module to communicate to the namecheap
API.
The Namecheap username, API key and URL should be set in the minion configuration file, or in the Pillar data.
namecheap.name: companyname
namecheap.key: a1b2c3d4e5f67a8b9c0d1e2f3
namecheap.client_ip: 162.155.30.172
#Real url
namecheap.url: https://api.namecheap.com/xml.response
#Sandbox url
#namecheap.url: https://api.sandbox.namecheap.xml.response
salt.modules.namecheap_ssl.
activate
(csr_file, certificate_id, web_server_type, approver_email=None, http_dc_validation=False, **kwargs)¶Activates a newly-purchased SSL certificate. Returns a dictionary of result values.
The type of certificate format to return. Possible values include:
The email ID which is on the approver email list.
Note
http_dc_validation
must be set to False
if this option is
used.
Note
For other parameters which may be required, see here.
CLI Example:
salt 'my-minion' namecheap_ssl.activate my-csr-file my-cert-id apachessl
salt.modules.namecheap_ssl.
create
(years, certificate_type, promotion_code=None, sans_to_add=None)¶Creates a new SSL certificate. Returns the following information:
Type of SSL Certificate. Possible values include:
Provider | Product name | Default number of domains (domain from CSR is counted here) | Maximum number of total domains | Maximum number of domains that can be passed in sans_to_add parameter |
Comodo | PositiveSSL Multi-Domain | 3 | 100 | 97 |
Comodo | Multi-Domain SSL | 3 | 100 | 97 |
Comodo | EV Multi- Domain SSL | 3 | 100 | 97 |
Comodo | Unified Communications | 3 | 100 | 97 |
GeoTrust | QuickSSL Premium | 1 | 1 domain + 4 subdomains | The only supported value is 4 |
GeoTrust | True BusinessID with EV Multi-Domain | 5 | 25 | 20 |
GeoTrust | True Business ID Multi- Domain | 5 | 25 | 20 |
Thawte | SSL Web Server | 1 | 25 | 24 |
Thawte | SSL Web Server with EV | 1 | 25 | 24 |
Thawte | SGC Supercerts | 1 | 25 | 24 |
Symantec | Secure Site Pro with EV | 1 | 25 | 24 |
Symantec | Secure Site with EV | 1 | 25 | 24 |
Symantec | Secure Site | 1 | 25 | 24 |
Symantec | Secure Site Pro | 1 | 25 | 24 |
CLI Example:
salt 'my-minion' namecheap_ssl.create 2 RapidSSL
salt.modules.namecheap_ssl.
get_info
(certificate_id, returncertificate=False, returntype=None)¶Retrieves information about the requested SSL certificate. Returns a dictionary of information about the SSL certificate with two keys:
True
to ask for the certificate in responseOptional type for the returned certificate. Can be either "Individual" (for X.509 format) or "PKCS7"
Note
Required if returncertificate
is True
CLI Example:
salt 'my-minion' namecheap_ssl.get_info my-cert-id
salt.modules.namecheap_ssl.
get_list
(**kwargs)¶Returns a list of SSL certificates for a particular user
Possible values:
10
, maximum: 100
)PURCHASEDATE
, PURCHASEDATE_DESC
, SSLTYPE
,
SSLTYPE_DESC
, EXPIREDATETIME
, EXPIREDATETIME_DESC
,
Host_Name
, or Host_Name_DESC
CLI Example:
salt 'my-minion' namecheap_ssl.get_list Processing
salt.modules.namecheap_ssl.
parse_csr
(csr_file, certificate_type, http_dc_validation=False)¶Parses the CSR. Returns a dictionary of result values.
Type of SSL Certificate. Possible values include:
True
if a Comodo certificate and validation should be
done with files instead of emails and to return the info to do soCLI Example:
salt 'my-minion' namecheap_ssl.parse_csr my-csr-file PremiumSSL
salt.modules.namecheap_ssl.
reissue
(csr_file, certificate_id, web_server_type, approver_email=None, http_dc_validation=False, **kwargs)¶Reissues a purchased SSL certificate. Returns a dictionary of result values.
The type of certificate format to return. Possible values include:
The email ID which is on the approver email list.
Note
http_dc_validation
must be set to False
if this option is
used.
Note
For other parameters which may be required, see here.
CLI Example:
salt 'my-minion' namecheap_ssl.reissue my-csr-file my-cert-id apachessl
salt.modules.namecheap_ssl.
renew
(years, certificate_id, certificate_type, promotion_code=None)¶Renews an SSL certificate if it is ACTIVE and Expires <= 30 days. Returns the following information:
Type of SSL Certificate. Possible values include:
CLI Example:
salt 'my-minion' namecheap_ssl.renew 1 my-cert-id RapidSSL