You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/03/07 06:22:13 UTC

[GitHub] [cassandra-website] ErickRamirezAU commented on a change in pull request #107: CASSANDRA-17409 March 2022 blog "Can Apache Cassandra take my PEM keys?"

ErickRamirezAU commented on a change in pull request #107:
URL: https://github.com/apache/cassandra-website/pull/107#discussion_r820407424



##########
File path: site-content/source/modules/ROOT/pages/blog/Can-Apache-Cassandra-take-my-PEM-keys.adoc
##########
@@ -0,0 +1,334 @@
+= Can Apache Cassandra take my PEM keys?
+:page-layout: single-post
+:page-role: blog-post
+:page-post-date: March 10, 2022
+:page-post-author: Maulin Vasavada
+:description: The Apache Cassandra Community
+:keywords: 
+
+:!figure-caption:
+
+.Image credit: https://unsplash.com/@tjevans[Tim Evans on Unsplash^]
+image::blog/can-apache-cassandra-take-my-pem-keys-unsplash-tim-evans.jpg[lockboxes]
+
+This article discusses how to configure Apache Cassandra 4.1 and beyond to use your PEM-encoded security credentials like your private key, corresponding certificate chain, and trusted CA certificates.
+
+=== What is PEM?
+
+PEM stands for https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail[**P**rivacy **E**nhanced **M**ail^]. It is a popular data-formatting standard for your cryptographic keys, certificates, and other data. Being a text-based encoding standard, PEM makes it easier to https://datatracker.ietf.org/doc/html/rfc7468#page-12[transport, transfer, and even edit the data with simple text editors^]. It is easy to copy and paste and combine different PEM encoded artifacts (for example: build a certificate chain and combine with corresponding private key) to create new ones.
+
+An Interesting fact about PEM is that—as the name suggests—it was designed to be used for electronic mail systems but became popular for encoding cryptographic data while other standards like https://en.wikipedia.org/wiki/S/MIME[S/MIME^] saw a better success with emails. Below is an https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/[example from ssl.com^] of a X.509 Certificate represented in PEM format,
+
+```
+-----BEGIN CERTIFICATE-----
+MIIH/TCCBeWgAwIBAgIQaBYE3/M08XHYCnNVmcFBcjANBgkqhkiG9w0BAQ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S8TJ041VLhaIKp14MzSUzRyeoOAsJ7QADMClHKUDlH
+UU2pNuo88Y6igovT3bsnwJNiEQNqymSSYhktw0taduoqjqXn06gsVioWTVDXysd5
+qEx4t6sIgIcMm26YH1vJpCQEhKpc2y07gRkklBZRtMjThv4cXyyMX7uTcdT7AJBP
+ueifCoV25JxXuo8d5139gwP1BAe7IBVPx2u7KN/UyOXdZmwMf/TmFGwDdCfsyHf/
+ZsB2wLHozTYoAVmQ9FoU1JLgcVivqJ+vNlBhHXhlxMdN0j80R9Nz6EIglQjeK3O8
+I/cFGm/B8+42hOlCId9ZdtndJcRJVji0wD0qwevCafA9jJlHv/jsE+I9Uz6cpCyh
+sw+lrFdxUgqU58axqeK89FR+No4q0IIO+Ji1rJKr9nkSB0BqXozVnE1YB/KLvdIs
+uYZJuqb2pKku+zzT6gUwHUTZvBiNOtXL4Nxwc/KT7WzOSd2wP10QI8DKg4vfiNDs
+HWmB1c4Kji6gOgA5uSUzaGmq/v4VncK5Ur+n9LbfnfLc28J5ft/GotinMyDk3iar
+F10YlqcOmeX1uFmKbdi/XorGlkCoMF3TDx8rmp9DBiB/
+-----END CERTIFICATE-----
+```
+
+=== Why do we need support for PEM if we have JKS support?
+
+Most Java-based systems allow storing/reading security credentials in/from https://en.wikipedia.org/wiki/Java_KeyStore[Java Keystore^] using a .jks file extension. You can https://docs.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore[create your keystore and truststore in JKS format^] using the keytool utility from Java. Apache Cassandra, being Java-based, supports keystore and truststore in JKS format. You can read the https://cassandra.apache.org/doc/4.0/cassandra/configuration/cass_yaml_file.html#server_encryption_options[Apache Cassandra 4.0 documentation] for more details on this.

Review comment:
       Link to Docs was hardcoded so we need to replace it:
   
   ```suggestion
   Most Java-based systems allow storing/reading security credentials in/from https://en.wikipedia.org/wiki/Java_KeyStore[Java Keystore^] using a .jks file extension. You can https://docs.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore[create your keystore and truststore in JKS format^] using the keytool utility from Java. Apache Cassandra, being Java-based, supports keystore and truststore in JKS format. You can read the link:/doc/4.0/cassandra/configuration/cass_yaml_file.html#server_encryption_options[Apache Cassandra 4.0 documentation] for more details on this.
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org