Working With Self-Signed Certificates in Chrome (Walkthrough Edition) (2024)

Working With Self-Signed Certificates in Chrome (Walkthrough Edition) (2)

Self-signed certificates save time and money from purchasing a certificate from a certificate authority (CA). They are very popular in development/test environments. But certificates that are not issued by a CA recognized by Chrome can cause users to see warnings and error pages. In this post, I will show how to make a self-signed trusted in Chrome, I will walk you through the steps with Kyma — an open-source project that provides a Kubernetes cluster for developing cloud-native applications.

Kyma provides a good example for illustration. You will get the error code NET::ERR_CERT_AUTHORITY_INVALID along with the message Your connection is not private when accessing the console URL in Chrome. This is because the domain console.kyma.local is not protected by a CA trusted by Chrome.

Working With Self-Signed Certificates in Chrome (Walkthrough Edition) (3)

To get Chrome to accept the self-signed SSL certificate, we need to create a wildcard (*.kyma.local) root certificate and import it into the Google Chrome Admin console as a Certificate Authority (CA). We also need to replace the existing certificate/private key stored in Kyma TLS secrets with the ones signed by our CA.

Working With Self-Signed Certificates in Chrome (Walkthrough Edition) (4)

Environment:

  • Linux: Linux Mint 20.2 Cinnamon (Kernel: 5.11.0–25-generic)
  • Kubernetes version: 1.16.15
  • Kyma: Installed from main
  • Chrome: 92.0.4515.131

If you own CA, you are authorized to sign certificate requests for yourself. To become your own CA involves creating a private key (.key) and a Root Certificate Authority certificate (.pem).

Generate an RSA private key of size 2048:

openssl genrsa -des3 -out rootCA.key 2048

Generate a root certificate valid for two years:

openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 730 -out rootCA.pem

To check just created root certificate:

openssl x509 -in rootCA.pem -text -noout

Tip: Alternatively you can use KeyStore Explorer to verify the certificate generated.

Next, we need to generate a certificate signing request (CSR).

First, create a private key to be used during the certificate signing process:

openssl genrsa -out tls.key 2048

Use the private key to create a certificate signing request:

openssl req -new -key tls.key -out tls.csr

Create a config file openssl.cnf with a list of domain names associated with the certificate. Edit the domain(s) listed under the [alt_names] section, be sure they match the domain name you want to use.

# Extensions to add to a certificate requestbasicConstraints = CA:FALSE
authorityKeyIdentifier = keyid:always, issuer:always
keyUsage = nonRepudiation, digitalSignature, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[ alt_names ]
DNS.1 = *.kyma.local

To sign the CSR using openssl.cnf:

openssl x509 -req \
-in tls.csr \
-CA rootCA.pem \
-CAkey rootCA.key \
-CAcreateserial \
-out tls.crt \
-days 730 \
-sha256 \
-extfile openssl.cnf

This will generate a public certificate (tls.crt) signed by our own CA that we can use on the web server later.

To verify that the certificate is built correctly:

openssl verify -CAfile rootCA.pem -verify_hostname console.kyma.local tls.crt

Note that with self-signed certificates your browser will warn you that the certificate is not “trusted” because it hasn’t been signed by a certification authority that is in the trust list of your browser. To gain Chrome’s trust, follow the instruction:

  1. Open Chrome settings, select Security > Manage Certificates.
  2. Click the Authorities tab, then click the Import… button. This opens the Certificate Import Wizard. Click Next to get to the File to Import screen.
  3. Click Browse… and select rootCA.pem then click Next.
  4. Check Trust this certificate for identifying websites then click OK to finish the process.
Working With Self-Signed Certificates in Chrome (Walkthrough Edition) (5)

The imported certificate will appear in the list of Authorities.

After we have validated the certificate, we can use it to replace the existing certificate in the Kyma web server.

Downloading and installing Kyma is very straightforward, you just simply follow the documentation here. Instead of installing directly from running kyma install command, we are going to install it from GitHub.

Clone the repo and locate the file installation/resources/installer-config-local.yaml.tpl. In Kyma, the certificate and its associated key used for TLS are stored in a ConfigMap file in Base64 format.

To convert our certificate and key to Base64:

cat tls.crt | base64 -w0
cat tls.key | base64 -w0

Once it is done, replace both tlsCrt and tlsKey properties with the value above and install Kyma from local sources:

kyma install — source local — src-path <my-sources>

The following message informs that installation is completed successfully.

Kyma is installed in version: 408cb6a6
Kyma installation took: 0 hours 3 minutes
Kyma is running at: https://192.168.49.2:8443
Kyma console: https://console.kyma.local
Kyma admin email: [email protected]
Kyma admin password: ...

Now access the Kyma console URL in Google Chrome, you should see the browser padlock icon in the address bar that indicates a secure connection has been established between the browser and the web server.

Working With Self-Signed Certificates in Chrome (Walkthrough Edition) (6)

A Self-signed certificate offers some advantages when used in internal networks and software development phases. They are free and save time for verification. By getting Chrome to accept a self-signed certificate, we can establish secure browser-to-website connections.

Working With Self-Signed Certificates in Chrome (Walkthrough Edition) (2024)

FAQs

How to accept a self-signed certificate in Chrome? ›

Adding the self-signed certificate as trusted to a browser
  1. Select the Continue to this website (not recommended) link. ...
  2. Click Certificate Error. ...
  3. Select the View certificates link. ...
  4. Select the Details tab, and then click Copy to File to create a local copy of the certificate. ...
  5. Follow the Wizard instructions.
Feb 27, 2024

How do I use certificates in Chrome? ›

Go to chrome://settings.
  1. On the left, click Privacy and security.
  2. Click Security.
  3. Scroll to Advanced.
  4. Click Manage certificates.
  5. In the list, find the newly-added CAs.

Why is self-signed certificate not secure in Chrome? ›

Note that with self-signed certificates your browser will warn you that the certificate is not “trusted” because it hasn't been signed by a certification authority that is in the trust list of your browser. To gain Chrome's trust, follow the instruction: Open Chrome settings, select Security > Manage Certificates.

How to remove self-signed certificate warning in Chrome? ›

Chrome
  1. Right-click the Google Chrome shortcut on your desktop and select Properties.
  2. In the Target field simple append the following parameter after the quoted string: --ignore-certificate-errors.

How do I accept a certificate in my browser? ›

  1. Open the browser and go to a website. ...
  2. Click Continue to this website (not recommended). ...
  3. Click the Certificate Error box to the right of the address bar (at the top of the browser window), and then click View certificates.
  4. On the General tab of the Certificate dialog box, click Install Certificate.

How do I select a certificate to authenticate myself in Chrome? ›

In Chrome, go to Settings. On the Settings page, below Default browser, click Show advanced settings. Under HTTPS/SSL, click Manage certificates. In the Keychain Access window, under Keychains, click login, under Category, click Certificates, and then, select your Client Certificate.

How do I open an SSL certificate in Chrome? ›

How to View SSL/TLS Certificate Details in Chrome 56
  1. Open Chrome Developer Tools. The quickest way there is with a keyboard shortcut: OS. Keyboard. Shortcuts. Windows and Linux. Ctrl + Shift + i. F12. Mac. ⌘ + Option + i. ...
  2. Select the Security tab. If it is not shown, select the >> as shown below.
  3. Select View Certificate.

How do I use a digital signature certificate in Chrome? ›

Import into Chrome
  1. In Chrome, navigate to Settings > Privacy and Security > Security > Manage Certificates.
  2. Click the Import button.
  3. Click Next.
  4. Browse to certificate file.
  5. Click Next.
  6. Type the Password. ...
  7. Deselect Enable strong private key protection. ...
  8. Select Mark this key as exportable.
Feb 20, 2024

How to allow SSL on Chrome? ›

Enable SSL/TLS in Google Chrome
  1. Open Google Chrome.
  2. Press Alt + f and click on settings.
  3. Select the Show advanced settings option.
  4. Scroll down to the Network section and click on Change proxy settings button.
  5. Now go to the Advanced tab.
  6. Scroll down to the Security category.
  7. Now check the boxes for your TLS/SSL version.
Apr 4, 2020

What is the problem with self-signed certificates? ›

Self-signed certificates contain private and public keys within the same entity, and they cannot be revoked, thus making it difficult to detect security compromises.

Do browsers accept self-signed certificates? ›

By default, browsers do not trust self-signed certificates because they lack prior knowledge of them. The browser displays a warning dialog box; you can use it to examine the content of the self-signed certificate before accepting it.

How do I enable HTTPS with self-signed certificate? ›

The following steps configure HTTPS using a self-signed certificate:
  1. Create a new self-signed certificate.
  2. Configure ArcGIS Server to use the certificate.
  3. Configure each GIS server in your deployment.
  4. Configure HTTPS for your site.
  5. Access your site using HTTPS.
  6. Import the certificate into the OS certificate store.

How to get Google Chrome to trust a self-signed certificate? ›

Add Certificate to Trusted Root Authority
  1. Within Chrome, do the following: Developer Tools » Security tab. Click the View Certificate button to see the certificate: ...
  2. Open the Keychain Access utility in OS X. Select the System option on the left. Click the lock icon in the upper-left corner to enable changes.

How do I validate a self-signed certificate in Chrome? ›

You can import certificates in the certificate dialog, which you can reach via Settings / Advanced / Manage Certificates. Some caveats: Since Chrome 58, the self-signed certificate must have the right domain name in the Subject Alternative Name (SAN) field. After importing the certificate, you need to restart Chrome.

How do I manage certificates in Chrome? ›

Go to chrome://settings.
  1. On the left, click Privacy and security.
  2. Click Security.
  3. Scroll to Advanced.
  4. Click Manage certificates.
  5. In the list, find the newly-added CAs.

How do I enable SSL certificate verification in Chrome? ›

Chromebook and Windows OS verification

Navigate to chrome://settings and scroll down to 'Advanced'. Under "Privacy and Security," click "Manage Certificates." On the popup that was launched, select "Trusted Root Certification Authorities'.

How do I accept invalid certificates in Chrome? ›

Method 1: Re-add Website Exception
  1. Go to Chrome Settings > Privacy & Security.
  2. Click Manage Exceptions under the “Security” section.
  3. Ensure the problematic website is listed as an allowed exception. If not, add it.
  4. Reload the page – Chrome should now trust the certificate.

How do I view digital signature certificate in Chrome? ›

Here's how to do it.
  1. Open Chrome Developer Tools. The quickest way there is with a keyboard shortcut: OS. Keyboard. Shortcuts. Windows and Linux. Ctrl + Shift + i. F12. Mac. ⌘ + Option + i. ...
  2. Select the Security tab. If it is not shown, select the >> as shown below.
  3. Select View Certificate.

How do I verify a self signed SSL certificate? ›

To validate them, we need to create a trust store that contains the trusted root and intermediate certificates and check if the root of the end entity certificate matches one of the trusted certificates.

Top Articles
Discover thousands of collaborative articles on 2500+ skills
Why Choose Python Over Other Programming Languages?
Truist Bank Near Here
Trevor Goodwin Obituary St Cloud
Angela Babicz Leak
The Atlanta Constitution from Atlanta, Georgia
Top Scorers Transfermarkt
Kent And Pelczar Obituaries
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Remnant Graveyard Elf
Www.paystubportal.com/7-11 Login
Wordscape 5832
Immediate Action Pathfinder
Regal Stone Pokemon Gaia
Lenscrafters Huebner Oaks
The Murdoch succession drama kicks off this week. Here's everything you need to know
Beau John Maloney Houston Tx
Char-Em Isd
"Une héroïne" : les funérailles de Rebecca Cheptegei, athlète olympique immolée par son compagnon | TF1 INFO
Puretalkusa.com/Amac
Prestige Home Designs By American Furniture Galleries
The Exorcist: Believer (2023) Showtimes
Marvon McCray Update: Did He Pass Away Or Is He Still Alive?
De beste uitvaartdiensten die goede rituele diensten aanbieden voor de laatste rituelen
Att.com/Myatt.
Joan M. Wallace - Baker Swan Funeral Home
Azur Lane High Efficiency Combat Logistics Plan
Seeking Arrangements Boston
Play It Again Sports Norman Photos
Barista Breast Expansion
Random Bibleizer
Umn Biology
Keshi with Mac Ayres and Starfall (Rescheduled from 11/1/2024) (POSTPONED) Tickets Thu, Nov 1, 2029 8:00 pm at Pechanga Arena - San Diego in San Diego, CA
5 Star Rated Nail Salons Near Me
Elanco Rebates.com 2022
Package Store Open Near Me Open Now
Ff14 Sage Stat Priority
Pch Sunken Treasures
Lichen - 1.17.0 - Gemsbok! Antler Windchimes! Shoji Screens!
Car Crash On 5 Freeway Today
Maybe Meant To Be Chapter 43
Enjoy4Fun Uno
Poe Self Chill
How to Install JDownloader 2 on Your Synology NAS
Mcoc Black Panther
Enjoy Piggie Pie Crossword Clue
Concentrix + Webhelp devient Concentrix
Sam's Club Fountain Valley Gas Prices
Game Akin To Bingo Nyt
Spongebob Meme Pic
7 Sites to Identify the Owner of a Phone Number
Latest Posts
Article information

Author: Domingo Moore

Last Updated:

Views: 5610

Rating: 4.2 / 5 (53 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Domingo Moore

Birthday: 1997-05-20

Address: 6485 Kohler Route, Antonioton, VT 77375-0299

Phone: +3213869077934

Job: Sales Analyst

Hobby: Kayaking, Roller skating, Cabaret, Rugby, Homebrewing, Creative writing, amateur radio

Introduction: My name is Domingo Moore, I am a attractive, gorgeous, funny, jolly, spotless, nice, fantastic person who loves writing and wants to share my knowledge and understanding with you.