Create a Common KeyStore machine¶
Create a Common KeyStore machine so Certificate Manager - SaaS can discover and provision certificates in keystore files on a Linux or Windows host. Certificate Manager - SaaS connects to the host through a VSatellite over Secure Shell (SSH) or Windows Remote Management (WinRM), and reads and writes PEM files, Java KeyStore (JKS) files, and PKCS#12 archives directly.
Before you begin¶
- The System Administrator, PKI Administrator, or Resource Owner role. If you have the Resource Owner role, you must own or belong to at least one team.
- An active VSatellite that can reach the host on the SSH or WinRM port.
- The IP address or hostname of the host.
- A host that runs one of these operating systems: Windows Server 2019 or 2022, Ubuntu 18.04 LTS or later, Red Hat Enterprise Linux 7.9, or Oracle Linux 8 or later.
- An account on the host that can read the files you want to discover, and create and write the files you want to provision.
- For SSH, an account that signs in with a password or with a private key that isn't protected by a passphrase.
- For SSH, if you want Certificate Manager - SaaS to restart a service after it provisions a certificate, a host that uses
systemd, and an account with sudo rights to runsystemctl restart. With private key authentication, sudo must not require a password, because Certificate Manager - SaaS has no password to give it. - For WinRM, WinRM turned on for the host. To connect over HTTPS, the host needs a WinRM HTTPS listener with a TLS server certificate. If you want Certificate Manager - SaaS to restart a service after it provisions a certificate, the account needs rights to stop and start that service.
- For WinRM with Kerberos authentication, the domain name, the address or hostname of the Key Distribution Center (KDC), and the Service Principal Name (SPN) of the host.
Note
Over SSH, Certificate Manager - SaaS doesn't verify the host's SSH host key. The connection is still encrypted.
To create a Common KeyStore machine¶
- Sign in to Certificate Manager - SaaS.
- Click Installations > Machines.
- Click New, and then select Common KeyStore (PEM, JKS, PKCS#12).
- On the Properties step, in Name, enter a name for the machine.
- For Owning Team, choose the team that owns the machine. System Administrators and PKI Administrators can choose any team. Resource Owners can choose only a team they own or belong to.
-
For VSatellite, choose a VSatellite that can reach the machine. A VSatellite that's the primary of a high availability group shows its number of active replicas, and Certificate Manager - SaaS can run the machine's operations on any healthy VSatellite in the group.
-
For Protocol, choose SSH or Windows Remote Management.
-
For Authentication Type, choose how Certificate Manager - SaaS signs in to the host:
- If you chose SSH, choose Password or Private Key.
- If you chose Windows Remote Management, choose Basic or Kerberos.
-
In IP Address/Hostname, enter the IP address or hostname of the host.
- (Optional) In Port, enter the port that SSH or the host's WinRM listener listens on. If you leave it empty, Certificate Manager - SaaS uses 22 for SSH and 5985, the default WinRM HTTP port, for WinRM. If you enable Use TLS for WinRM, enter the HTTPS listener port, which is usually 5986.
-
If you chose Windows Remote Management, (Optional) to connect to the host over HTTPS, enable Use TLS for WinRM. If you leave it disabled, Certificate Manager - SaaS connects over HTTP.
Note
Certificate Manager - SaaS doesn't verify the TLS certificate of the host's WinRM listener. The connection is still encrypted.
Warning
Use Basic authentication only with Use TLS for WinRM enabled. Without TLS, the username and password cross the network unencrypted.
-
If you chose Kerberos, under Kerberos Details, enter the Domain Name, the Key Distribution Center Address/Hostname, and the Service Principal Name. Enter the SPN in the form
WSMAN/<host FQDN>, for exampleWSMAN/server.company.com. -
For Credential Type, choose how to provide the credentials:
- Enter Credentials to enter the credentials in the next step. This is the default.
- Select Credentials to use shared credentials from a credential manager integration. Then, for Credential, choose the credential.
Note
Select Credentials requires the credential manager capability, which requires additional licensing. Without it, Credential shows No credentials are available. System Administrators and PKI Administrators can choose any credential. Resource Owners can choose only the credentials that belong to their teams.
-
If you chose Enter Credentials, in Username, enter the account's user name. Then:
- For Password authentication over SSH, or for WinRM, in Password, enter the account's password.
- For Private Key authentication, in Private Key, paste the account's SSH private key. The key can't be protected by a passphrase.
If you chose Select Credentials, the stored credential must hold the account's user name and password. For Private Key authentication, it holds the private key in place of the password.
Note
Certificate Manager - SaaS encrypts the credentials you enter and doesn't display them again. On the machine's Properties tab, they appear masked. To keep a stored credential when you edit the machine, leave its masked value unchanged. Keep your own secure record of the credentials in case you need them again.
-
Click Test Access. After the connection succeeds, click Continue. The Discovery step opens.
Note
A successful test confirms that Certificate Manager - SaaS can reach the host through the VSatellite, sign in, and run a command. It doesn't confirm that the account can read or write the keystore paths or restart services.
-
On the Discovery step, under Discovery Configuration, in File or Directory Path, enter the absolute path of a single keystore file, or of a directory to scan. Enter it in the form the host uses, for example
/etc/ssl/certson Linux orC:\certson Windows. The path can't contain a..segment. - (Optional) To scan the directory's subdirectories too, enable Include Subdirectories. It's disabled by default and has no effect when the path is a single file.
- (Optional) In File Extensions, enter a comma-separated list of the file name endings to read in a directory. Each entry matches files whose name ends with it, so
.pemmatches every PEM file, and a whole file name such ascacertsmatches a keystore that has no extension. Matching isn't case-sensitive, and the dot counts:.pemmatchesserver.pem, whilepemalso matches a file namednotapem. If you leave it empty, discovery reads.pem,.cer,.crt,.key,.jks,.keystore,.p12, and.pfxfiles. -
(Optional) In Keystore Passwords, enter the passwords that open your password-protected JKS files and PKCS#12 archives, one per line. You can enter up to 25. Discovery tries them in order, and it also tries an empty password, so you don't need to enter one. Leading and trailing spaces count as part of a password, so don't pad a line.
The passwords are visible while you type them.
Note
Certificate Manager - SaaS encrypts these passwords and doesn't display them again. On the machine's Discovery tab, they appear masked. To keep the stored passwords when you edit the machine, leave the masked value unchanged.
-
(Optional) To discover certificates on a schedule, enable Schedule. For Repeat every, choose Day, Week, or Month, and then in At, enter the time. For Week, select the days of the week. For Month, enter the days in Day of month. Times are in Coordinated Universal Time (UTC).
- Click Continue. The Provisioning step opens.
-
(Optional) To provision certificates on a schedule, enable Schedule. For Repeat every, choose Day, Week, or Month, and then in At, enter the time. For Week, select the days of the week. For Month, enter the days in Day of month. Times are in Coordinated Universal Time (UTC).
Scheduled provisioning pushes only certificates that are queued for deployment, such as renewed certificates, so renewals install during the window you choose.
-
Click Finish.
What discovery finds¶
Discovery reads certificates out of files on the host over the same SSH or WinRM connection that the machine uses. It decides each file's type by its contents, not by its name, so a PKCS#12 archive named .keystore is still read correctly.
Discovery reads PEM files in the forms that editors and export tools produce, including files with:
- A UTF-8 or UTF-16 byte order mark, such as a file saved as "Unicode" in Notepad.
- Windows or older Mac line endings, or a mix of line endings.
- Indented lines, or several certificates pasted onto one line.
- Text ahead of the certificate, such as the output of
openssl x509 -text, however long it is. CERTIFICATE,X509 CERTIFICATE, orTRUSTED CERTIFICATEblocks.
A certificate block that doesn't parse costs only that certificate, not the rest of the file. A PEM file in which no certificate parses is skipped in a directory scan.
Certificates with no PEM markers, such as a binary DER .cer file or base64 text without its BEGIN and END lines, are discovered and added to the inventory. Discovery doesn't create an installation for them, because a renewal writes PEM and would break the application that reads the file as DER. PKCS#7 bundles (.p7b) aren't read.
When File or Directory Path names a single file, discovery doesn't apply the File Extensions filter. Naming the file is how you read a keystore that the default list passes over, such as a Java Development Kit (JDK) cacerts file. If discovery can't read a file you named, the discovery run fails. A file it can't read in a directory scan is skipped.
A directory scan reads at most 5,000 files and goes at most 20 directory levels deep. It skips files larger than 8 MB, and it skips symbolic links without following them. A file you name directly can't be larger than 8 MB either, or the discovery run fails.
How discovery reads each keystore:
- JKS files: the certificates in a JKS file are readable without the store password, so they're discovered even when none of your Keystore Passwords opens the store. Private keys aren't. An alias whose key password discovery doesn't know yields nothing, not even its certificate.
- JKS aliases: each alias is discovered as a separate installation. The installation keeps the alias and has Append to JKS enabled, so renewing one alias doesn't remove the others from the store. Trusted certificate entries, which have no private key, are discovered as installations too.
- PKCS#12 archives: an archive that none of your passwords opens is skipped, and the discovery run continues.
Important
When discovery finds a certificate but can't determine everything provisioning needs, it still creates the installation and leaves that field blank. Certificate Manager - SaaS never guesses these values, so it never writes to a path it made up. Edit the installation and fill in the field before you provision to it. This happens in two cases:
- PEM certificates: if discovery doesn't find the certificate's private key, Private Key Path (including filename) is blank. Discovery matches a key to a certificate cryptographically, never by file name. It searches the certificate's own file and the other files in the same directory, whatever their extension.
- JKS files: if none of your passwords opens the store, Store Password is blank.
A PKCS#12 archive that holds more than one entry is different. Its certificates are discovered, but discovery doesn't create an installation for them, because every entry in the archive would resolve to the same installation.
Discovered installations have no Service Name, so Certificate Manager - SaaS doesn't restart a service when it renews their certificates. To restart one, edit the installation and add the service name.
Warning
A discovery run reconciles the machine's whole set of installations, so Certificate Manager - SaaS marks any installation that the newest scan doesn't report as Missing. If you point the same machine at a second path, every installation found at the first path is marked Missing. Create a separate machine for each path you want to scan.
What's next?¶
After you create the machine, provision a certificate to it. You can also run discovery on the machine at any time to track the certificates in its keystore files.