Generating a self-signed Certificate Chain Using openssl (2024)

ScyllaDB Docs ScyllaDB Open Source ScyllaDB for Administrators Security Generating a self-signed Certificate Chain Using openssl

For local communication, self-signed certificates and a private trust store are usually sufficient for securing communication. Indeed, several nodes can share the same certificate, as long as we ensure that our trust configuration is not tampered with.

To build a self-signed certificate chain, begin by creating a certificate configuration file like this:

[ req ]default_bits = 4096default_keyfile = <hostname>.keydistinguished_name = req_distinguished_namereq_extensions = v3_reqprompt = no[ req_distinguished_name ]C = <country code>ST = <state>L = <locality/city>O = <domain>OU = <organization, usually domain>CN= <hostname>.<domain>emailAddress = <email>[v3_ca]subjectKeyIdentifier=hashauthorityKeyIdentifier=keyid:always,issuer:alwaysbasicConstraints = CA:true[v3_req]# Extensions to add to a certificate requestbasicConstraints = CA:FALSEkeyUsage = nonRepudiation, digitalSignature, keyEncipherment

Substitute the values in <> with whichever suits your organization. For this example, let’s call our host db, and our domain foo.bar, and create a file called db.cfg:

[ req ]default_bits = 4096default_keyfile = db.keydistinguished_name = req_distinguished_namereq_extensions = v3_reqprompt = no[ req_distinguished_name ]C = SEST = StockholmL = StockholmO = foo.barOU = foo.barCN= db.foo.baremailAddress = postmaster@foo.bar[v3_ca]subjectKeyIdentifier=hashauthorityKeyIdentifier=keyid:always,issuer:alwaysbasicConstraints = CA:true[v3_req]# Extensions to add to a certificate requestbasicConstraints = CA:FALSEkeyUsage = nonRepudiation, digitalSignature, keyEncipherment

Note

Please note that each new signed certificate should have different “CN=” in “req_distinguished_name” section. Otherwise it won’t pass openssl verify check.

Then, begin by generating a self-signing certificate authority key:

openssl genrsa -out cadb.key 4096

And using this, a certificate signing authority:

openssl req -x509 -new -nodes -key cadb.key -days 3650 -config db.cfg -out cadb.pem

Now, generate a private key for our certificate:

openssl genrsa -out db.key 4096

And from this, a signing request:

openssl req -new -key db.key -out db.csr -config db.cfg

Then we can finally create and sign our certificate:

openssl x509 -req -in db.csr -CA cadb.pem -CAkey cadb.key -CAcreateserial -out db.crt -days 365 -sha256

As a result, we should now have:

  • db.key - PEM format key that will be used by the database node.

  • db.crt - PEM format certificate for the db.key signed by the cadb.pem and used by database node.

  • cadb.pem - PEM format signing identity that can be used as a trust store. Use it to sign client certificates that will connect to the database nodes.

Place the files in a directory of your choice and make sure you set permissions so your ScyllaDB instance can read them. Then update the server/client configuration to reference them.

When restarting ScyllaDB with the new configuration, you should see the following messages in the log:

When node-to-node encryption is active:

Starting Encrypted Messaging Service on SSL port 7001

When client to node encryption is active:

Enabling encrypted CQL connections between client and server

See Also

Copyright

© 2016, The Apache Software Foundation.

Apache®, Apache Cassandra®, Cassandra®, the Apache feather logo and the Apache Cassandra® Eye logo are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. No endorsem*nt by The Apache Software Foundation is implied by the use of these marks.

Generating a self-signed Certificate Chain Using openssl (2024)
Top Articles
How to Open a Bank Account as a Sole Proprietor
What is the Gift Tax Exclusion for 2024?
Pikes Suwanee
Fbsm St Louis
Christine Paduch Howell Nj
Christine Paduch Howell Nj
Woman who fled Saudi Arabia reaches her new home in Canada
Pjstar Obits Legacy
Frivlegends.com Unblocked
Indianapolis Star Obituary
Loss Payee And Lienholder Addresses And Contact Information Updated Daily Free List Bank Of America
Argus911
Welcome To Aces Charting
Die eID-Karte für Bürgerinnen und Bürger der EU und des EWR
Michelle_Barbelle
Snohomish Hairmasters
Best Pizza In Westlake
Shadow Under The Mountain Skyrim
Oviedo Anonib
Sprinter Tyrone's Unblocked Games
Craigs List Rochester
Southern Food Buffet Near Me
2068032104
Sevierville, Tennessee: Idyllisches Reiseziel in den Great Smoky Mountains
Will Certifier Crossword Clue
Pge Outage Map Beaverton
Reahub 1 Twitter
Berklee College Of Music Academic Calendar
Forza Horizon 5: 8 Best Cars For Rally Racing
Dynasty League Forum
Panty Note 33
Brake Masters 228
Craigslist Pets Seattle Tacoma Washington
Craigslist Ct Apartments For Rent
Restaurants Near 275 Tremont St Boston
R/Sandiego
Gabrielle Abbate Obituary
Sparkle Nails Phillipsburg
Lily Starfire White Christmas
Weekly Math Review Q4 4 Answer Key | airSlate SignNow
Wv Mugshots 2023
Burlington Antioch Ca
Sarah Colman-Livengood Park Raytown Photos
Sierra At Tahoe Season Pass Costco
Norwegian Luna | Cruise Ship
Gun Show Deridder La
Watch Wrestling.up
Nuefliks.com
MERRY AND MARRIED MERRY & MARRIED MERRY + MARRIED MERRY E MARRIED MERRY ; MARRIED MERRY, MARRIED MERRY - MARRIED Trademark Application of Nexus Integrity Group - Serial Number 98485054 :: Justia Trademarks
1V1 Google Classroom
Bourbon Moth Magnolia
What Is Opm1 Treas 310 Deposit
Latest Posts
Article information

Author: Duncan Muller

Last Updated:

Views: 5560

Rating: 4.9 / 5 (79 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Duncan Muller

Birthday: 1997-01-13

Address: Apt. 505 914 Phillip Crossroad, O'Konborough, NV 62411

Phone: +8555305800947

Job: Construction Agent

Hobby: Shopping, Table tennis, Snowboarding, Rafting, Motor sports, Homebrewing, Taxidermy

Introduction: My name is Duncan Muller, I am a enchanting, good, gentle, modern, tasty, nice, elegant person who loves writing and wants to share my knowledge and understanding with you.