Configuring the connector
This page describes how to configure the connector to automate certificate lifecycle management.
Validate the domains
-
Log in to SCM at
https://cert-manager.com/customer/<customer_uri>
with the MRAO administrator credentials provided to your organization.Sectigo runs multiple instances of SCM. The main instance of SCM is accessible at
https://cert-manager.com
. If your account is on a different instance, adjust the URL accordingly. -
(Optional) Navigate to the Organizations page to see if an organization with departments already exists. On this page you can create a new organization or add departments to an existing organization.
To add an organization:
-
Click Add.
-
Complete the fields with the organization’s details, then click Next.
-
Configure settings for specific types of certificates.
-
Click Save.
-
Select the newly created organization from the list of organizations.
-
Click Add Department and complete the fields with the department’s details.
-
Click Validate to start the validation process for this organization.
-
-
Navigate to the Domains page.
-
To create a new domain entry, click Add.
-
Specify the domain name, select the organizations/departments to delegate the domain to, and the allowed certificate types.
-
Click Save.
-
If your organization or department requires delegations to be approved:
-
Select the newly created domain from the list of domains.
-
Click Approve Delegations.
-
Select the organization or department, then click Approve.
To change the organization or department which the domain is delegated to, click Delegate and select the appropriate Organizations/Departments.
-
-
(Public CA only) Validate your domain:
-
Select your domain and click Validate.
-
Select the appropriate DCV method as per your initial setup.
The following steps assume that you selected Email as the DCV method. -
Click Next.
-
In Select an email address, select a registered email.
-
Click Submit.
A message confirms that the validation letter was sent to your selected email.
-
Click OK.
-
Follow the instructions provided in the email to validate your domain.
Once the domain is validated, its Status will change to Validated on the Domains page.
-
Obtain the SCM API credentials
-
Log in to SCM at
https://cert-manager.com/customer/<customer_uri>
with the MRAO administrator credentials provided to your organization.Sectigo runs multiple instances of SCM. The main instance of SCM is accessible at
https://cert-manager.com
. If your account is on a different instance, adjust the URL accordingly. -
Select
. Make a note of the URL value under SSL Certificates REST API. You will need to assign it to thesectigo_scm_url
parameter in theconfig.yaml
file. -
Select SSL Certificates REST API and click Accounts.
-
Select your account and click Edit.
-
Click Reset Secret and confirm resetting the client secret.
-
Make a note of the values under Client ID and Application (client) Secret. You will need to assign them to the
sectigo_cm_user_id
andsectigo_cm_user_secret
parameters in thesectigo_credentials.yaml
file.
Extract the contents
-
Log in to your Linux client machine as a user with administrator privileges.
-
Create a new directory called
sectigo
somewhere on your machine and place the integration package in the newly created directory. The following commands assume that the package is located inopt/sectigo
. -
Navigate to
/opt/sectigo
and execute the following commands (you don’t need to install the unzip utility if you already have it).
Install the dependencies
-
Navigate to the
sectigo-paloaltofw-agent_<version>/paloaltofw
directory. -
Install the Python dependencies listed in the
requirements.txt
file.We recommend that you install Python packages into a virtual environment. The following instructions are Ubuntu-specific.
sudo apt install python3.8-venv python3 -m venv .venv source .venv/bin/activate pip3 install -r requirements.txt
The following instructions are Ubuntu-specific.
sudo apt update sudo apt install python3-pip pip3 install -r requirements.txt
Set up the SCM credentials file
Configure the sectigo_credentials.yaml
file in the profiles_sample
directory.
If needed, create an additional account entry in the file for each additional SCM account used.
SCMDV:
sectigo_cm_user_id : "b8923830-11f5-4c34-951b-fc1235634972"
sectigo_cm_user_secret : "Ti]hXzuxj.!T,zg!S0rZ0StbwyDlhCP4"
The following table describes parameters in the file.
Parameter | Description |
---|---|
|
An arbitrary credentials label.
This label is referenced in the |
|
The client ID of the SCM user |
|
The client secret of the SCM user |
Set up the Palo Alto firewall profile file
Configure a Palo Alto firewall profile file.
This file specifies the target firewall to which a certificate will be attached.
A sample fw_paloalto_config.yaml
file is located in the profiles_sample
directory.
A single firewall profile can be used as target in multiple certificate profiles.
You can have as many firewall profile files as you want.
All filenames must start with fw_
.
paloalto_url : "https://my_paloalto_instance.com/"
paloalto_api_key : "gJlQWE56987nBxIqyfa62sZeRtYuIo2BgzEA9UOnlZBhU=="
paloalto_commit_description : "Sectigo Palo Alto commit"
paloalto_commit_user : "admin"
The following table describes parameters in the file.
Parameter | Description |
---|---|
|
The FQDN or IP address of the firewall instance |
|
The API key for authenticating API calls to Palo Alto. See Get Your API Key for instructions on generating an API key. |
|
An arbitrary description for a commit of configuration changes |
|
The user that will commit changes. You may create a separate user on Palo Alto specifically for API operations. |
Set up the certificate profile file
Configure a certificate profile file for a firewall instance.
A sample certificate.yaml
file is located in the profiles_sample
directory.
You can have one or more certificate profile for each firewall profile.
You can give any name to the certificate profile file and it will be used as the certificate name inside the Palo Alto firewall.
We recommend that you keep the certificate template files outside the connector’s directory on the client machine.
Use the |
paloalto_fw_profile: "fw_paloalto_config"
scm_credential_detail : "SCMDV"
sectigo_ssl_cert_type: DV
sectigo_ssl_cert_comments: Certificate for Palo Alto Firewall
sectigo_ssl_cert_subject_alt_names: "example.com", "www.example.com"
sectigo_csr_domain: "www.example.com"
sectigo_csr_country: "CA"
sectigo_csr_state: "ON"
sectigo_csr_location: "Ottawa"
sectigo_csr_organization: "JohnDoe"
sectigo_csr_email_address: [email protected]
sectigo_csr_key_type: "RSA"
sectigo_csr_key_size: 3072
sectigo_force_renewal: False
sectigo_expiry_window: 30
sectigo_auto_renew: true
The following table describes parameters in the file.
Parameter | Description |
---|---|
|
The name of the firewall profile file |
|
The credentials ID (label) from the |
|
The type of the SSL certificate.
The possible values are |
|
(Optional) Comments for certificate enrollment |
|
The email address included in the certificate emailAddress field |
|
A comma-separated list of subject alternative names (SAN) included in the certificate subjectAltName field |
|
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:
|
|
Specifies whether to forcibly renew a certificate, even though it’s not yet expired.
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 |
Set up the config file
Configure the config.yaml
file in the profiles_sample
directory.
sectigo_log_file : "sectigo_pycert.log"
sectigo_log_path : "/opt/sectigo/paloaltofw/logs"
cert_profile_path : "/opt/sectigo/paloaltofw/profiles_sample"
sectigo_scm_url : "https://murray.enroll.demo.sectigo.com/api/v1"
sectigo_log_level : debug
sectigo_log_size_mb : 1
sectigo_logger_count : 10
sectigo_sleep_download : 1
sectigo_encrypt_credentials : False
sectigo_gnu_key : "02C5433F6789F1390EBA00C4316B3F25AD25DBE0"
The following table describes parameters in the file.
Parameter | Description |
---|---|
|
The name for the log file.
When the log file reaches its maximum size as specified in |
|
The path to the directory that hosts the log files. If you are on Windows, use a double backslash as a separator ( |
|
The path to the directory that hosts the certificate and firewall profile files. If you are on Windows, use a double backslash as a separator ( |
|
The URL of the SCM account |
|
The log level.
The supported values are |
|
The maximum size (in megabytes) of a log file.
The default value is |
|
The maximum number of log files.
The default value is |
|
The time (in seconds) between an enrollment request and an attempt to dowload the provisioned certificate files |
|
Specifies whether to encrypt the credentials.
The possible values are |
|
The GPG key for encrypting the credentials.
This parameter has effect if |
Encrypting the credentials file
The connector can work with plaintext or encrypted configuration files. If you prefer to store your SCM and Palo Alto credentials in an encrypted form, you need to install the GPG command-line tool and SOPS editor of encrypted files.
Encrypting the SCM secret and Palo Alto API key is an optional but recommended step to protect your credentials from unauthorized access. |
Install GPG
Run the following commands to install GPG (GNU Privacy Guard). The last two commands let you generate some randomness required to generate a key.
To check whether GPG is installed on the system, run |
sudo apt-get install gnupg
sudo apt-get install rng-tools
sudo sed -i -e 's|#HRNGDEVICE=/dev/hwrng|HRNGDEVICE=/dev/urandom|' /etc/default/rng-tools
sudo service rng-tools start
GPG_TTY=$(tty)
export GPG_TTY
sudo yum install gnupg
sudo yum install rng-tools
sudo sed -i -e 's|#HRNGDEVICE=/dev/hwrng|HRNGDEVICE=/dev/urandom|' /etc/default/rng-tools
sudo service rng-tools start
GPG_TTY=$(tty)
export GPG_TTY
Install SOPS
Install the SOPS editor for encrypting and decrypting the credentials.
To check whether SOPS is installed on the system using the |
Encrypt the credentials file
-
Change the value of the
sectigo_encrypt_credentials
parameter in theconfig.yaml
file toTrue
. -
Create a private key.
gpg --batch --passphrase '' --quick-gen-key $(whoami) default default
The
--quick-generate-key option
requires you to specify the user ID field on the command line and optionally an algorithm, usage, and expire date. Default values are used for all other options.gpg --full-generate-key
The
--generate-key
option prompts for the real name and email fields before asking for a confirmation to proceed, and provides a dialog for all options. -
Retrieve the key fingerprint.
gpg -list-keys
-
Add the fingerprint to the
sectigo_gnu_key
parameter inconfig.yaml
. -
Encrypt the credentials.