How To Convert Formats (Pem, Jks) For Tls/ssl Clients And Services
Install a CA-signed SSL/TLS certificate with KeyStore Explorer
Overview
Every Code42 server includes a cocky-signed certificate to support secure HTTPS connections. That certificate enables encryption of customer-server communications, but it cannot adequately place your server and protect your clients from counterfeiters. This article describes how to configure a more secure option: using KeyStore Explorer to create an SSL/TLS certificate signed past a trusted certificate authority (CA).
Other articles describe other tools for creating a CA-signed document:
- Linux administrators typically utilise OpenSSL.
- Windows administrators typically use the Coffee keytool.
Server security requires a CA-signed certificate and the TLS protocol
Reliable security of whatever production web server requires an SSL certificate signed by a trusted certificate dominance (CA) and enforced use of the TLS protocol (that is, HTTPS, not HTTP).
Your on-premises Code42 authority server is no exception. A Code42 server that is configured to utilise a signed certificate, strict TLS validation, and strict security headers protects server communications with browsers, your Code42 apps, and other servers.
- By default, your authority server uses a self-signed certificate and TLS. That provides for encrypting customer-server traffic.
- Calculation a CA-signed certificate provides further security by confirming your server's identity to clients. It prevents attackers from acquiring customer data through apocryphal servers and encryption keys.
- Never reconfigure a production server to use HTTP, rather than TLS and HTTPS.
- Configuring Code42 servers and apps to use strict TLS validation further ensures the security of client-server connections.
- Configuring Code42 servers to use an HTTPS Strict Transport Security (HSTS) response header further prevents unencrypted browser admission to Code42 consoles.
Certificates and Java keystore files
The Code42 server accepts certificates bundled together in a Java KeyStore file. The keystore contains:
- The certificate and the public and individual key for the Code42 server
- A certificate from the CA who signed the Code42 server certificate
- Intermediate certificates that establish a chain of trust between the CA and the Code42 server certificate
Create the keystore using a utility such as KeyStore Explorer earlier applying it to the Code42 server from the Code42 console.
Build your keystore on any machine
You can generate keys and build keystores on any secure machine and then import the result, a *.jks file, to your authorization server via the Code42 console. Y'all do not need any farther access to the authority server's host automobile.
Considerations
- For multi-server Code42 environments, we recommend applying this process to all Code42 servers.
- You lot must take the Server Administrator or SYSADMIN role to install an SSL document on your Code42 server.
- This article assumes y'all are familiar with the post-obit:
- The basic principles of Transport Layer Security (TLS)
- Configuring SSL certificates
-
The command-line utility OpenSSL is required if you are running Linux and want to reuse existing key materials.
Help with creating your keystore
Help with the handling of a certificate signing request (CSR) or creating your keystore is across the scope of Customer Champions. For aid, please contact your Customer Success Manager (CSM) to engage the Professional Services team.
Keystore terminology
Build the keystore
Building a Java KeyStore is the beginning step in configuring your Code42 server to employ your ain CA-signed SSL certificate. If yous take an existing individual primal and corresponding Ten.509 document (referred to collectively as cardinal materials), you can reuse them. You tin can also start from scratch, creating new fundamental materials equally needed. The steps are dissimilar, depending on what existing cardinal materials you have:
- No existing cardinal materials
- Existing primal materials
Existing materials must include Discipline Alternative Name (SAN)
Certificates and keystores built to an older standard may lack the Subject Alternative Proper noun (SAN) extension. Most browsers now distrust such certificates. If your existing certificates and keystores don't have the SAN extension, offset over with a new certificate signing request.
Option 1: Build a keystore without existing cardinal materials
Keypass and storepass parameters
You lot must use the same countersign for the keystore and the individual fundamental. You lot can use any cord you want for these parameters, but they must both be gear up to the same value.
Follow the steps below if you lot take no individual keys or certificates from a CA and need to create them from scratch.
Stride one: Create a keystore and key pair
- Kickoff KeyStore Explorer.
- Choose Create a new KeyStore.
- From New KeyStore Type, cull JKS.
- Click OK.
- Generate a key pair:
- Select Tools > Generate Key Pair.
- In Generate Cardinal Pair, choose the post-obit algorithm pick options:
- RSA
- Key Size: 4096
- Click OK.
Generating Primal Pair dialog appears, then disappears afterwards a key is generated. - From Generate Key Pair Certificate, click the Edit proper noun icon .
- Complete the Na me fields:
- For the Common Name (CN) use the Fully Qualified Domain Proper noun (FQDN) of your server.
- For the Common Name (CN) use the Fully Qualified Domain Proper noun (FQDN) of your server.
- Click OK.
- Specify the domain name of your server equally an alternative proper name. ClickAdd together Extensions, click the + icon, and select Subject Culling Name.
- In the Subject Culling Name Extension dialog, click the + icon, select DNSName, and in General Name Valuetype the domain proper noun of your server.
- Click OK until you render to the Generate Key Pair Certificate dialog.
- In Generate Central Pair Certificate, click OK.
- In New Key Pair Entry Alias, enter an alias for the key pair.
The allonym is pre-set to the CN set in the Proper noun dialog. - Click OK.
- In New Central Pair Entry Countersign, enter a password, and click OK.
The Generate Primal Pair dialog displays "Primal Pair Generation Successful".
Fundamental pair entry password
Save this password, and use it every bit the password for the unabridged keystore in pace 7 below.
- Click OK.
The new key pair is displayed in the KeyStore Explorer window.
- Salvage the keystore:
- From the KeyStore Explorer menu, select File > Save.
The Set KeyStore Password dialog appears. - Enter a password for the keystore. This password must be the same equally the countersign for the key pair generated in step 5 above.
- Click OK.
The Save KeyStore Every bit dialog appears. - Enter the name of the keystore.
This format is suggested for easy identification of your keystores: fqdn_domain_com.jks - Click Salvage.
Your keystore file is saved to your computer.
- From the KeyStore Explorer menu, select File > Save.
Pace two: Generate and send certificate signature request
- Right-click the key pair entry.
- Choose Generate CSR.
The Generate CSR dialog appears.
- (Optional) Enter additional values.
- Click OK.
The CSR Generation Successful dialog appears. - Click OK.
- Send the generated CSR file to your document authority.
Stride 3: Import signed certificates to your keystore
- When the document dominance returns your signed certificate and key, place them in a directory attainable by Keystore Explorer.
- In Keystore Explorer, right-click the same key pair entry used to generate the CSR and choose Import CA Reply > From File.
- Select the signed certificate from your certificate authority, and click Import.
The signed document is added to the key pair entry equally the server-level certificate. - To verify the document chain, correct-click the fundamental pair entry, and choose View Details > Certificate Chain Details.
- If you demand to import intermediate and root-level certificates, right-click the central pair entry, and choose Edit Certificate Concatenation > Append Certificate to append the intermediate and root-level certificates. See Append certificates to an existing keystore, below.
- From the menu bar, selectFile > Save to salvage the imported certificate to your keystore.
Your keystore file is complete and prepare to be imported into your Code42 server.
Choice 2: Build a keystore with existing fundamental materials
If you lot want to use existing primal materials to build a keystore, yous can choose to:
- Suspend document to an existing keystore
- Reuse existing key materials (Linux)
- Reuse existing fundamental materials (Windows)
Suspend certificates to an existing keystore
If you already have a keystore that contains certificates, you lot tin can suspend new certificates.
If you don't have existing key materials, you tin can import certificates to the keystore.
- Start KeyStore Explorer.
- Choose Open an existing KeyStore.
- Select the keystore JKS file, click Open, provide the password, and click OK.
- In the primary KeyStore Explorer window, right-click the fundamental pair entry.
- Select Edit Certificate Chain > Append Document.
Reuse existing central materials from another awarding (Linux)
Follow these steps to reuse an existing private fundamental/certificate combination from some other application if you are running on Linux. These instructions assume that both your individual key and certificate are PEM-formatted.
The following steps require the use of the command-line utility OpenSSL.
- Convert the PEM-formatted private central into a PKCS8-formatted central with the following command:
openssl pkcs8 -topk8 -nocrypt -outform DER -in mykey.pem -out mykey.pkcs8
- Start the KeyStore Explorer awarding.
- Choose Create a new KeyStore from the quick start menu.
- From New KeyStore Type, choose JKS.
- Click OK.
- From the carte bar, select Tools > Import Cardinal Pair.
- From Import Cardinal Pair Type, select PKCS #8.
- From Import PKCS #8 Key Pair, import the key pair equally follows:
- If the private key file is encrypted, enter the decryption password in Decryption Password.
- In PKCS #8 Private Key File, enter the path to the individual key file in PKCS # 8 format, or click Scan to navigate to the file.
- In Certificate(south) File, enter the path to the 10.509 certificate file in PEM or DER format, or click Browse to navigate to the file.
- Click Import.
- In New Cardinal Pair Entry Alias, enter an alias for the key pair.
- Click OK.
- In New Key Pair Entry, enter a password for the key pair.
The Key Pair Import Successful dialog appears. - Click OK.
- Select File > Save from the menu bar.
- In Set KeyStore Password, enter a keystore countersign, and click OK.
- In Save KeyStore Every bit, enter the name of your new keystore file. Give the file the . jks file extension.
- Click Save.
Your keystore file is complete and ready to exist imported into your Code42 server.
Reuse existing key materials from some other application (Windows)
Follow these steps to reuse an existing individual fundamental/certificate combination from another application if you are running on Windows. Key materials on Windows platforms are typically stored in a PKCS12 keystore file. The KeyStore Explorer can convert a PKCS12 keystore file to a JKS file using the steps below.
- Offset the KeyStore Explorer application.
- Select File > Open from the menu bar.
- Navigate to and select the PKCS12 file that you want to catechumen.
- Click Open up.
- In Unlock KeyStore, enter the password for the keystore file and click OK.
- Select File > Save As from the menu bar.
- Enter a proper name with the .jks file extension for the new keystore.
- Click Relieve.
- Select Tools > Change Type > JKS from the menu bar.
- From Change KeyStore Type, click OK.
The Modify KeyStore Type dialog displays "Modify KeyStore blazon Successful". - Click OK.
- Select File > Save.
The keystore file is saved in JKS format.
Your keystore file is complete and ready to exist imported into your Code42 server.
Configure the Code42 server to use the keystore
Troubleshooting
- If your test Code42 server fails to start subsequently installing the new keystore, uninstall and reinstall the server.
- If your production Code42 server fails to get-go later on installing the new keystore, run into Recover your Code42 server to a previous land.
- Most problems with SSL certificates are related to central creation, signing, and conversion. We recommend that you:
- Advisedly repeat the procedure described above.
- Check that your document and keystore files include the Subject Alternative Name (SAN) extension.
Catechumen your keystore or document to text, as described below. Look for
X509v3 Bailiwick Alternative Name
- Consult with your CA to make sure you have the right intermediate certificates.
- Consult documentation for the tool you're using:
- OpenSSL
- Java keytool
- KeyStore Explorer
- For additional help, contact your Customer Success Manager (CSM).
Automatically-generated self-signed certificates
Keys are kept in a keystore. Your authority servers or storage servers utilise the keys in the keystore to securely process transactions.
If a Code42 server cannot find keys, information technology searches for keystores with the following precedence:
- The keystore in the database, uploaded in the Code42 console or by API. (To upload the keys in the Code42 panel, navigate toAssistants > Settings > Security > Keys.)
- The keystore location on the server as configured past the
c42.https.keystore.default
system property. To verify the location, enter the following prop.show command in the Code42 console control-line interface (CLI):prop.bear witness c42.https.keystore.default
If for some reason your Code42 servers cannot locate the keys in these locations, they generate a self-signed certificate to ensure uninterrupted operation of your Code42 environment. The automatically-generated self-signed certificate should but be used temporarily while you troubleshoot keystore problems. Code42 strongly recommends using a CA-signed certificate for product environments.
Convert certificates and keystores to text files
Document and keystore files are in binary or base64 formats. Yous can brand them easier to read by converting files to PEM format and so converting PEM files to text, equally follows:
- Java keystore to PKCS
keytool -importkeystore -srckeystore <filename>.jks -destkeystore <filename>.p12 -srcstoretype jks -deststoretype pkcs12
- PKCS to PEM
openssl pkcs12 -in <filename>.p12 -out <filename>.crt
- PEM certificate to text
openssl x509 -text -in <filename>.crt > <filename>.crt.txt
- PEM CSR to text (certificate signing request)
openssl req -text -noout -in <filename>.csr > <filename>.csr.txt
A document in readable text
Certificate: Information: Version: 3 (0x2) Serial Number: 4096 (0x1000) Signature Algorithm: sha256WithRSAEncryption Issuer: C = United states, ST = MN, O = CAsOrg, OU = CAsUnit, CN = CAsName The issuer is the CA who signed the certificate. Validity Not Earlier: Aug 15 13:l:25 2018 GMT Not After : Aug fifteen 13:50:25 2019 GMT This certificate's expiration date. Subject field: C = US, ST = MN, L = YourTown, O = YourOrg, OU = YourUnit, CN = yourdomain.tld, emailAddress = you lot@yourcompany.tld Subject: You and the website this document validates. Subject Public Key Info: Your public central. Clients use it to encrypt messages. Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:aa:a4:de:e3:e3:d4:b9:f3:3d:1c:1e:b7:1b:69: 4f:5b:22:08:4b:75:81:54:91:8f:63:57:a8:0e:bd: ... ab:a3:21:3f:c4:28:1c:9a:4e:e4:f0:81:a2:ab:73: b3:83 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Culling Proper noun: About browsers require the SAN extension. DNS:yourdomain.tld X509v3 Basic Constraints: CA:Simulated Netscape Cert Type: SSL Server Netscape Comment: OpenSSL Generated Server Certificate X509v3 Subject Central Identifier: 12:E8:E1:E5:65:57:BB:2A:1C:CC:E3:61:E8:5C:79:34:CF:DD:E3:B1 X509v3 Authority Key Identifier: keyid:F3:16:90:68:9A:B2:85:xl:A8:1D:F3:second:78:B2:6D:4E:82:0C:B0:32 DirName:/CN=Vera/OU=Vera/O=VeraCA/L=Roseville/ST=MN/C=US series:ten:00 X509v3 Primal Usage: critical Digital Signature, Central Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication Signature Algorithm: sha256WithRSAEncryption 29:52:6f:5a:de:26:44:fifty:ad:e3:33:7b:8d:ba:2e:b5:cb:d9: 35:21:75:0c:6b:ea:e0:f4:d0:e3:72:8e:5d:9e:3b:02:bf:8f: ... 81:45:8f:1f:71:45:xiii:0a:ec:f1:0c:70:30:f2:6f:73:cd:5c: 55:41:b6:b6:0a:fc:fb:c9 -----BEGIN Document----- MIIFpTCCA42gAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwWzELMAkGA1UEBhMCVVMx CzAJBgNVBAgMAk1OMRUwEwYDVQQKDAxQaGlsTm9yY3Jvc3MxDTALBgNVBAsMBFZl ... BeWBceJRAcqt2XtY/6HteHUxpxCbSPVcEZWw6dkrM4FFjx9xRRMK7PEMcDDyb3PN XFVBtrYK/PvJ -----Cease Document-----
How To Convert Formats (Pem, Jks) For Tls/ssl Clients And Services,
Source: https://support.code42.com/CP/Admin/On-premises/6/Configuring/Install_a_CA_signed_SSL_TLS_certificate_with_KeyStore_Explorer
Posted by: prescottcapproper.blogspot.com
0 Response to "How To Convert Formats (Pem, Jks) For Tls/ssl Clients And Services"
Post a Comment