-->Thanks for your feedback!There was an error submitting your feedback. Try again or send us a message.
Oct 21, 2019 I'am trying to connect to a MariaDB instance hosted on AWS RDS, my application requires ca.pem, client-cert.pem and client-key.pem, and Amazon only gives me a rds-combined-ca-bundle.pem. I don't know much about TLS. I need to generate those files? When I follow the Create the Client Key and CSR it outputs: CA certificate and CA private key do. At this point, I'm not sure if the client and server certs should be signed by the root CA, if the client cert should be signed by the server cert, or if I'm going insane with all this certificate trust chain SSL/TLS magic wizard voodoo craziness. Apr 09, 2020 Step 3: Generate CA x509 certificate file using the CA key. You can define the validity of certificate in days. Here we have mentioned 1825 days. The following command will prompt for the cert details like common name, location, country, etc. Generate a client SSL certificate. Generate a private key for the SSL client. Openssl genrsa -out client.key 4096; Use the client’s private key to generate a cert request. Openssl req -new -key client.key -out client.req; Issue the client certificate using the cert request and the CA cert/key.
The following scenarios outline several of the primary usages of Key Vault’s certificate management service including the additional steps required for creating your first certificate in your key vault.
The following are outlined:
- Creating your first Key Vault certificate
- Creating a certificate with a Certificate Authority that is partnered with Key Vault
- Creating a certificate with a Certificate Authority that is not partnered with Key Vault
- Import a certificate
Certificates are complex objects
Certificates are composed of three interrelated resources linked together as a Key Vault certificate; certificate metadata, a key, and a secret.
Creating your first Key Vault certificate
Before a certificate can be created in a Key Vault (KV), prerequisite steps 1 and 2 must be successfully accomplished and a key vault must exist for this user / organization.
Step 1 - Certificate Authority (CA) Providers
- On-boarding as the IT Admin, PKI Admin or anyone managing accounts with CAs, for a given company (ex. Contoso) is a prerequisite to using Key Vault certificates.
The following CAs are the current partnered providers with Key Vault:- DigiCert - Key Vault offers OV TLS/SSL certificates with DigiCert.
- GlobalSign - Key Vault offers OV TLS/SSL certificates with GlobalSign.
Step 2 - An account admin for a CA provider creates credentials to be used by Key Vault to enroll, renew, and use TLS/SSL certificates via Key Vault.
Step 3 - A Contoso admin, along with a Contoso employee (Key Vault user) who owns certificates, depending on the CA, can get a certificate from the admin or directly from the account with the CA.
- Begin an add credential operation to a key vault by setting a certificate issuer resource. A certificate issuer is an entity represented in Azure Key Vault (KV) as a CertificateIssuer resource. It is used to provide information about the source of a KV certificate; issuer name, provider, credentials, and other administrative details.
- Ex. MyDigiCertIssuer
- Provider
- Credentials – CA account credentials. Each CA has its own specific data.
For more information on creating accounts with CA Providers, see the related post on the Key Vault blog.
Step 3.1 - Set up certificate contacts for notifications. This is the contact for the Key Vault user. Key Vault does not enforce this step.
Note - This process, through step 3.1, is a onetime operation.
Creating a certificate with a CA partnered with Key Vault
Step 4 - The following descriptions correspond to the green numbered steps in the preceding diagram.
(1) - In the diagram above, your application is creating a certificate which internally begins by creating a key in your key vault.
(2) - Key Vault sends an TLS/SSL Certificate Request to the CA.
(3) - Your application polls, in a loop and wait process, for your Key Vault for certificate completion. The certificate creation is complete when Key Vault receives the CA’s response with x509 certificate.
(4) - The CA responds to Key Vault's TLS/SSL Certificate Request with an X509 TLS/SSL Certificate.
(5) - Your new certificate creation completes with the merger of the X509 Certificate for the CA.
(1) - In the diagram above, your application is creating a certificate which internally begins by creating a key in your key vault.
(2) - Key Vault sends an TLS/SSL Certificate Request to the CA.
(3) - Your application polls, in a loop and wait process, for your Key Vault for certificate completion. The certificate creation is complete when Key Vault receives the CA’s response with x509 certificate.
(4) - The CA responds to Key Vault's TLS/SSL Certificate Request with an X509 TLS/SSL Certificate.
(5) - Your new certificate creation completes with the merger of the X509 Certificate for the CA.
Key Vault user – creates a certificate by specifying a policy
- Repeat as needed
- Policy constraints
- X509 properties
- Key properties
- Provider reference - > ex. MyDigiCertIssure
- Renewal information - > ex. 90 days before expiry
- A certificate creation process is usually an asynchronous process and involves polling your key vault for the state of the create certificate operation.
Get certificate operation- Status: completed, failed with error information or, canceled
- Because of the delay to create, a cancel operation can be initiated. The cancel may or may not be effective.
Import a certificate
Alternatively – a cert can be imported into Key Vault – PFX or PEM.
Import certificate – requires a PEM or PFX to be on disk and have a private key.
- You must specify: vault name and certificate name (policy is optional)
- PEM / PFX files contains attributes that KV can parse and use to populate the certificate policy. If a certificate policy is already specified, KV will try to match data from PFX / PEM file.
- Once the import is final, subsequent operations will use the new policy (new versions).
- If there are no further operations, the first thing the Key Vault does is send an expiration notice.
- Also, the user can edit the policy, which is functional at the time of import but, contains defaults where no information was specified at import. Ex. no issuer info
Formats of Import we support
We support the following type of Import for PEM file format. A single PEM encoded certificate along with a PKCS#8 encoded, unencrypted key which has the following
-----BEGIN CERTIFICATE----------END CERTIFICATE-----
-----BEGIN PRIVATE KEY----------END PRIVATE KEY-----
On certificate merge we support 2 PEM based formats. You can either merge a single PKCS#8 encoded certificate or a base64 encoded P7B file.-----BEGIN CERTIFICATE----------END CERTIFICATE-----
We currently don't support EC keys in PEM format.
Creating a certificate with a CA not partnered with Key Vault
This method allows working with other CAs than Key Vault's partnered providers, meaning your organization can work with a CA of its choice.
The following step descriptions correspond to the green lettered steps in the preceding diagram.
(1) - In the diagram above, your application is creating a certificate, which internally begins by creating a key in your key vault.
(2) - Key Vault returns to your application a Certificate Signing Request (CSR).
(3) - Your application passes the CSR to your chosen CA.
(4) - Your chosen CA responds with an X509 Certificate.
(5) - Your application completes the new certificate creation with a merger of the X509 Certificate from your CA.
Important: This example is intended to provide general guidance to IT professionals who are experienced with SSL requirements and configuration. The procedure described in this article is just one of many available methods you can use to generate the required files. The process described here should be treated as an example and not as a recommendation.
When you configure Tableau Server to use Secure Sockets Layer (SSL) encryption, this helps ensure that access to the server is secure and that data sent between Tableau Server and Tableau Desktop is protected.
Looking for Tableau Server on Linux? See Example: SSL Certificate - Generate a Key and CSR.
Tableau Server uses Apache, which includes OpenSSL. You can use the OpenSSL toolkit to generate a key file and Certificate Signing Request (CSR) which can then be used to obtain a signed SSL certificate.
Steps to generate a key and CSR
To configure Tableau Server to use SSL, you must have an SSL certificate. To obtain the SSL certificate, complete the steps:
- Generate a key file.
- Create a Certificate Signing Request (CSR).
- Send the CSR to a certificate authority (CA) to obtain an SSL certificate.
- Use the key and certificate to configure Tableau Server to use SSL.
You can find additional information on the SSL FAQ page on the Apache Software Foundation website.
Configure a certificate for multiple domain names
Tableau Server allows SSL for multiple domains. To set up this environment, you need to modify the OpenSSL configuration file, openssl.conf, and configure a Subject Alternative Name (SAN) certificate on Tableau Server. See For SAN certificates: modify the OpenSSL configuration file below.
Set the OpenSSL configuration environment variable (optional)
To avoid using the
-config
argument with every use of openssl.exe, you can use the OPENSSL_CONF
environment variable to ensure that the correct configuration file is used and all configuration changes made in subsequent procedures in this article produce expected results (for example, you must set the environment variable to add a SAN to your certificate). Open the Command Prompt as an administrator, and run the following command:
set OPENSSL_CONF=c:Program FilesTableauTableau Serverpackagesapache.<version_code>confopenssl.cnf
Notes:
- When setting the Open SSL configuration environment variable, do not enclose the file path with quotation marks.
- If you are using a 32-bit version of Tableau Server on a 64-bit computer, run the
set OPENSSL_CONF=c:Program Files (x86)TableauTableau Serverpackagesapache.<version_code>confopenssl.cnf
command instead.
Generate a key
Generate a key file that you will use to generate a certificate signing request.
- Open the Command Prompt as an administrator, and navigate to the Apache directory for Tableau Server. For example, run the following command:
cd C:Program FilesTableauTableau Serverpackagesapache.<version_code>bin
- Run the following command to create the key file:
openssl.exe genrsa -out <yourcertname>.key 4096
Note: This command uses a 4096-bit length for the key. You should choose a bit length that is at least 2048 bits because communication encrypted with a shorter bit length is less secure. If a value is not provided, 512 bits is used.
Create a certificate signing request to send to a certificate authority
Use the key file you created in the procedure above to generate the certificate signing request (CSR). You send the CSR to a certificate authority (CA) to obtain a signed certificate.
Important: If you want to configure a SAN certificate to use SSL for multiple domains, first complete the steps in For SAN certificates: modify the OpenSSL configuration file below, and then return to here to generate a CSR.
- Run the following command to create a certificate signing request (CSR) file:
openssl.exe req -new -key yourcertname.key -out yourcertname.csr
If you did not set the OpenSSL configuration environment variable,OPENSSL_CONF
, you might see either of the following messages:- An error message about the config information being unable to load. In this case, retype the command above with the following parameter:
-config ..confopenssl.cnf
. - A warning that the
/usr/local/ssl
directory cannot be found. This directory does not exist on Windows, and you can simply ignore this message. The file is created successfully.
To set an OpenSSL configuration environment variable, see Set the OpenSSL configuration environment variable (optional) section in this article. - When prompted, enter the required information.Note: For Common Name, type the Tableau Server name. The Tableau Server name is the URL that will be used to reach the Tableau Server. For example, if you reach Tableau Server by typing
tableau.example.com
in the address bar of your browser, thentableau.example.com
is the common name. If the common name does not resolve to the server name, errors will occur when a browser or Tableau Desktop tries to connect to Tableau Server.
Openssl Generate Client Certificate
Send the CSR to a certificate authority to obtain an SSL certificate
Send the CSR to a commercial certificate authority (CA) to request the digital certificate. For information, see the Wikipedia article Certificate authority and any related articles that help you decide which CA to use.
Use the key and certificate to configure Tableau Server
When you have both the key and the certificate from the CA, you can configure Tableau Server to use SSL. For the steps, see Configure External SSL.
For SAN certificates: modify the OpenSSL configuration file
In a standard installation of OpenSSL, some features are not enabled by default. To use SSL with multiple domain names, before you generate the CSR, complete these steps to modify the openssl.cnf file.
- Open Windows Explorer and browse to the Apache conf folder for Tableau Server.For example:
C:Program FilesTableauTableau Server<version_code>apacheconf
- Open openssl.cnf in a text editor, and find the following line:
req_extensions = v3_req
This line might be commented out with a hash sign (#) at the beginning of the line.If the line is commented out, uncomment it by removing the # and space characters from the beginning of the line. - Move to the [ v3_req ] section of the file. The first few lines contain the following text:
# Extensions to add to a certificate request
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEnciphermentAfter the keyUsage line, insert the following line:subjectAltName = @alt_names
If you’re creating a self-signed SAN certificate, do the following to give the certificate permission to sign the certificate:- Add the
cRLSign
andkeyCertSign
to the keyUsage line so it looks like the following:keyUsage = nonRepudiation, digitalSignature, keyEncipherment, cRLSign, keyCertSign
- After the keyUsage line, add the following line:
subjectAltName = @alt_names
- In the [alt_names] section, provide the domain names you want to use with SSL.
DNS.1 = [domain1]
DNS.2 = [domain2]
DNS.3 = [etc]The following image shows the results highlighted, with placeholder text that you would replace with your domain names. - Save and close the file.
- Complete the steps in Create a certificate signing request to send to a certificate authority section, above.
Additional information
If you prefer to use a different version of OpenSSL, you can download it from Open SSL for Windows.