Configuration
This page describes the necessary configuration details for the SDK.
Go SDK
The SDK configuration details include the SCM credentials and certificate profile.
SCM credentials
When you create a Sectigo client, you need to provide your SCM credentials. If you initialize the SDK without assigning any credentials, the SDK looks for the credentials file in the current working directory, user home directory, and system config directory.
The SCM credentials can be assigned using one of the following:
Credentials file
The supported file formats are JSON, YAML, and TOML.
The default filenames for the credentials file are ./sectigorc.json
, ./sectigorc.yaml
, and ./sectigorc.toml
.
credentials := sdk.acme.Config.FromFile("<path/credentials.yaml>")
credentials := sdk.enrollment.Config.FromFile("<path/credentials.yaml>")
credentials := sdk.admin.Config.FromFile("<path/credentials.yaml>")
A sample credentials file sectigo_credentials.yaml
is located in the ./config
directory.
ENROLLMENT_API_1:
client_id: b8923830-11f5-4c34-951b-fc1235634972
client_secret: Ti]hXzuxj.!T,zg!S0rZ0StbwyDlhCP4
scm_url: https://murray.enroll.sectigo.com/api/v1
ADMIN_API_1:
scm_url: https://cert-manager.com/
scm_user: john_doe
scm_password: 23CkiMJkUc5N
scm_uri: doe
scm_org_id: 460
scm_ssl_cert_type: 1670
ACME_CERTBOT_1:
acme_endpoint: https://acme.sectigo.com
eab_key: 2a82af7331a11fc8b9ec2793d924b0aa
eab_hmac_key: AqlqlXB9mQoQzrGHmFzLSdbhENiea9RibwyCZoNfXrp7o7A1Yb9pvPwCPFpl7ZBMztc752le8VhCDXyTg5ms68U6
certbot_path: "~/csr_dir"
The following table describes the parameters in the file.
Parameter | Description |
---|---|
Enrollment API |
|
|
An arbitrary credentials label. This label deliniates the Enrollment API credentials from other credentials. |
|
The client ID of the SCM user |
|
The client secret of the SCM user |
|
The URL of the SCM account |
Admin API |
|
|
An arbitrary credentials label. This label deliniates the Admin API credentials from other credentials. |
|
The base URL of SCM |
|
The MRAO or RAO administrator username |
|
The MRAO or RAO administrator password |
|
The URI of the SCM account |
|
The ID of the organization |
|
The ID of the SSL certificate type |
ACME |
|
|
An arbitrary credentials label. This label deliniates the ACME credentials from other credentials. |
|
The URL of the ACME service |
|
The key ID for external account binding |
|
The HMAC key for external account binding |
|
(ACME) The directory that will store the private key, CSR, and certificate chain. |
Credentials struct
credentials := sdk.acme.Config.Credentials{"acme_endpoint" : "<your_acme_endoint>", "eab_key" : "<your_key_id", "eab_hmac_key" : "<your_hmac_key", "certbot_path" : "your_csr_dir"}
credentials := sdk.enrollment.Config.Credentials{"client_id" : "<your_client_id>", "client_secret" : "<your_client_secret>", "scm_url" : "<your_scm_url"}
credentials := sdk.admin.Config.Credentials{"scm_url" : "<your_scm_url>", "scm_user" : "<your_scm_user>", "scm_password" : "<your_scm_password>", "scm_uri" : "<your_scm_uri>", "scm_org_id" : "<your_org_id>", "scm_ssl_cert_type" : "<your_cert_id>"}
Certificate profile
Configure a sample cert_profile_1.yaml
file in the ./config
directory.
You can create multiple copies of the sample certificate profile file.
All filenames must start with cert_
.
Alternatively, you pass the parameters from the sample file as a struct.
certProfile := sdk.lifecycle.CertProfile.FromFile("<path/cert_profile.yaml>")
certProfile := sdk.lifecycle.CertProfile{"scm_credentials_label": "<your_creds_label>", "ssl_cert_type": "<your_ssl_cert_type>", "ssl_cert_comments": "<your_comments>", "<other_param>": "<your_other_value>"}
scm_credentials_label: SCMDV
ssl_cert_custom_fields: {"Server IP":"192.168.220.130","Dept":"Ecommerce"}
ssl_cert_type: DV
ssl_cert_comments: Certificate for load balancer
ssl_cert_subject_alt_names: example.com, www.example.com
ssl_cert_validity: '365'
csr_domain: example.com
csr_country: CA
csr_state: ON
csr_location: Ottawa
csr_organization: JohnDoe
csr_email_address: [email protected]
csr_key_type: RSA
csr_key_size: 4096
force_renewal: false
expiry_window: 30
auto_renew: true
The following table describes the parameters in the file.
Parameter | Description |
---|---|
|
The credentials ID (label) from the |
|
(Optional) Custom fields to be applied to the requested certificate. The expected format for custom fields is the following:
If you’re providing this input in a JSON string, make sure that the internal double quotes are escaped properly using |
|
The type of the SSL certificate.
The possible values are |
|
(Optional) Comments for certificate enrollment |
|
A comma-separated list of subject alternative names (SAN) included in the certificate subjectAltName field |
|
(Admin API) The certificate validity period in days.
The value must be at least |
|
The domain name included in the certificate Common Name (CN) field |
|
The country name included in the certificate Country (C) field |
|
The state or province name included in the certificate State (ST) field |
|
The locality name included in the certificate Locality (L) field |
|
The organization name included in the certificate Organization (O) field |
|
The email address included in the certificate emailAddress field |
|
The key algorithm to use for certificate enrollment.
The possible values are |
|
The key size to use for certificate enrollment. The possible values are:
|
|
Specifies whether to force renewal of a certificate, even if it’s not yet due for renewal.
The possible values are |
|
The number of days prior to expiration that a certificate renewal process is initiated.
The default expiry window is |
|
Specifies whether to renew a certificate automatically.
The possible values are |
Python SDK
The SDK configuration details include the SCM credentials and certificate profile.
SCM credentials
When you create a Sectigo client, you need to provide your SCM credentials. If you initialize the SDK without assigning any credentials, the SDK looks for the credentials file in the current working directory, user home directory, and system config directory.
The SCM credentials can be assigned using one of the following:
Credentials file
The supported file formats are JSON, YAML, and TOML.
The default filenames for the credentials file are ./sectigorc.json
, ./sectigorc.yaml
, and ./sectigorc.toml
.
----
scm_object = SCMProvider.from_file("<path/credentials.yaml>",cert_profile.scm_credentials_label)
A sample credentials file sectigo_credentials.yaml
is located in the ./config
directory.
ENROLLMENT_API_1:
client_id: b8923830-11f5-4c34-951b-fc1235634972
client_secret: Ti]hXzuxj.!T,zg!S0rZ0StbwyDlhCP4
scm_url: https://murray.enroll.sectigo.com/api/v1
ADMIN_API_1:
scm_url: https://cert-manager.com/
scm_user: john_doe
scm_password: 23CkiMJkUc5N
scm_uri: doe
scm_org_id: 460
scm_ssl_cert_type: 1670
ACME_CERTBOT_1:
acme_endpoint: https://acme.sectigo.com
eab_key: 2a82af7331a11fc8b9ec2793d924b0aa
eab_hmac_key: AqlqlXB9mQoQzrGHmFzLSdbhENiea9RibwyCZoNfXrp7o7A1Yb9pvPwCPFpl7ZBMztc752le8VhCDXyTg5ms68U6
certbot_path: "~/csr_dir"
The following table describes the parameters in the file.
Parameter | Description |
---|---|
Enrollment API |
|
|
An arbitrary credentials label. This label deliniates the Enrollment API credentials from other credentials. |
|
The client ID of the SCM user |
|
The client secret of the SCM user |
|
The URL of the SCM account |
Admin API |
|
|
An arbitrary credentials label. This label deliniates the Admin API credentials from other credentials. |
|
The base URL of SCM |
|
The MRAO or RAO administrator username |
|
The MRAO or RAO administrator password |
|
The URI of the SCM account |
|
The ID of the organization |
|
The ID of the SSL certificate type |
ACME |
|
|
An arbitrary credentials label. This label deliniates the ACME credentials from other credentials. |
|
The URL of the ACME service |
|
The key ID for external account binding |
|
The HMAC key for external account binding |
|
(ACME) The directory that will store the private key, CSR, and certificate chain. |
Dictionary
scm_dict = {
"acme_endpoint" : "<your_acme_endoint>",
"eab_hmac_key" : "<your_hmac_key",
"certbot_path" : "your_csr_dir"
}
scm = SCMProvider(scm_dict, cert_profile.scm_credentials_label)
scm_dict = {
"client_id": "<your_client_id>",
"client_secret": "<your_client_secret>",
"scm_url": "<your_scm_url",
}
scm = SCMProvider(scm_dict, cert_profile.scm_credentials_label)
scm_dict = {
"scm_url": "<your_scm_url",
"scm_user": "<your_scm_user>",
"scm_password": "<your_scm_password>",
"scm_uri" : "<your_scm_uri>",
"scm_org_id" : "<your_org_id>",
"scm_ssl_cert_type" : "<your_cert_id>"}
}
scm = SCMProvider(scm_dict, cert_profile.scm_credentials_label)
Certificate profile
Configure a sample cert_profile_1.yaml
file in the ./config
directory.
You can create multiple copies of the sample certificate profile file.
All filenames must start with cert_
.
cert_profile = CertificateProfile.from_file("<path/cert_profile.yaml>")
scm_credentials_label: SCMDV
ssl_cert_custom_fields: {"Server IP":"192.168.220.130","Dept":"Ecommerce"}
ssl_cert_type: DV
ssl_cert_comments: Certificate for load balancer
ssl_cert_subject_alt_names: example.com, www.example.com
ssl_cert_validity: '365'
csr_domain: example.com
csr_country: CA
csr_state: ON
csr_location: Ottawa
csr_organization: JohnDoe
csr_email_address: [email protected]
csr_key_type: RSA
csr_key_size: 4096
force_renewal: false
expiry_window: 30
auto_renew: true
The following table describes the parameters in the file.
Parameter | Description |
---|---|
|
The credentials ID (label) from the |
|
(Optional) Custom fields to be applied to the requested certificate. The expected format for custom fields is the following:
If you’re providing this input in a JSON string, make sure that the internal double quotes are escaped properly using |
|
The type of the SSL certificate.
The possible values are |
|
(Optional) Comments for certificate enrollment |
|
A comma-separated list of subject alternative names (SAN) included in the certificate subjectAltName field |
|
(Admin API) The certificate validity period in days.
The value must be at least |
|
The domain name included in the certificate Common Name (CN) field |
|
The country name included in the certificate Country (C) field |
|
The state or province name included in the certificate State (ST) field |
|
The locality name included in the certificate Locality (L) field |
|
The organization name included in the certificate Organization (O) field |
|
The email address included in the certificate emailAddress field |
|
The key algorithm to use for certificate enrollment.
The possible values are |
|
The key size to use for certificate enrollment. The possible values are:
|
|
Specifies whether to force renewal of a certificate, even if it’s not yet due for renewal.
The possible values are |
|
The number of days prior to expiration that a certificate renewal process is initiated.
The default expiry window is |
|
Specifies whether to renew a certificate automatically.
The possible values are |