You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/12/07 09:34:34 UTC

[GitHub] [ozone] Galsza opened a new pull request, #4053: HDDS-7399. Enable specifying external root ca

Galsza opened a new pull request, #4053:
URL: https://github.com/apache/ozone/pull/4053

   ## What changes were proposed in this pull request?
   
   During SCM startup an external root CA can now be specified to use instead of generating a self signed CA.
   
   ## What is the link to the Apache JIRA
   
   [HDDS-7399](https://issues.apache.org/jira/browse/HDDS-7399)
   
   ## How was this patch tested?
   
   Added unit test.


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] fapifta commented on a diff in pull request #4053: HDDS-7399. Enable specifying external root ca

Posted by GitBox <gi...@apache.org>.
fapifta commented on code in PR #4053:
URL: https://github.com/apache/ozone/pull/4053#discussion_r1050213061


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2097,29 +2097,38 @@
     <description>X509 signature certificate.</description>
   </property>
   <property>
-    <name>hdds.external.root.ca.cert</name>
+    <name>hdds.x509.rootca.certificate.file</name>
     <value></value>
-    <description>Path to an external CA certificate. This certificate is
-      used when initializing SCM to create a root certificate authority.
-      By default, a self-signed certificate is generated instead.
+    <description>Path to an external CA certificate. The file format is expected
+      to be pem. This certificate is used when initializing SCM to create
+      a root certificate authority. By default, a self-signed certificate is
+      generated instead. Note that this certificate is only used for Ozone's
+      internal communication, and it does not affect the certificates used for
+      HTTPS protocol at WebUIs as they can be configured separately.
     </description>
   </property>
   <property>
-    <name>hdds.external.root.ca.private.key</name>
+    <name>hdds.x509.rootca.private.key.file</name>
     <value></value>
-    <description>Path to an external private key. This private key is later used
-      when initializing SCM to sign certificates as the root certificate
-      authority. When not specified a private and public key is generated
-      instead.
+    <description>Path to an external private key. The file format is expected
+      to be pem. This private key is later used when initializing SCM to sign
+      certificates as the root certificate authority. When not specified a
+      private and public key is generated instead.
+      These keys are only used for Ozone's internal communication, and it does
+      not affect the HTTPS protocol at WebUIs as they can be configured
+      separately.
     </description>
   </property>
   <property>
-    <name>hdds.external.root.ca.public.key</name>
+    <name>hdds.x509.rootca.public.key.file</name>
     <value></value>
     <description>Path to an external public key. This public key is later used

Review Comment:
   File format restriction is missing from here.



##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java:
##########
@@ -195,19 +195,19 @@ public final class HddsConfigKeys {
   public static final String HDDS_X509_RENEW_GRACE_DURATION_DEFAULT = "P28D";
 
   public static final String HDDS_EXTERNAL_ROOT_CA_CERT_PATH =

Review Comment:
   In order to conform with the convention, I believe the constant names should also be changed here.



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] fapifta commented on a diff in pull request #4053: HDDS-7399. Enable specifying external root ca

Posted by GitBox <gi...@apache.org>.
fapifta commented on code in PR #4053:
URL: https://github.com/apache/ozone/pull/4053#discussion_r1046465129


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2087,14 +2087,41 @@
     <description>Max time for which certificate issued by SCM CA are valid.
       This duration is used for self-signed root cert and scm sub-ca certs
       issued by root ca. The formats accepted are based on the ISO-8601
-      duration format PnDTnHnMn.nS</description>
+      duration format PnDTnHnMn.nS
+    </description>
   </property>
   <property>
     <name>hdds.x509.signature.algorithm</name>
     <value>SHA256withRSA</value>
     <tag>OZONE, HDDS, SECURITY</tag>
     <description>X509 signature certificate.</description>
   </property>
+  <property>
+    <name>hdds.external.root.ca.cert</name>

Review Comment:
   Please update the description of these newly added parameters, and mention the expected file format for the certificate and the key material, to avoid confusion, as we do not try to detect the format, but expect the PEM format.
   
   Also I believe we should add some note about the fact that this certificate is used to sign all the certificates that are used for Ozone's internal communication and this does not affect the certificates that are used for HTTPS protocol at WebUIs as they are configurable separately.
   
   On more note, I believe we should use the following names:
   - hdds.x509.rootca.certificate.file
   - hdds.x509.rootca.private.key.file
   - hdds.x509.rootca.public.key.file
   



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] fapifta merged pull request #4053: HDDS-7399. Enable specifying external root ca

Posted by GitBox <gi...@apache.org>.
fapifta merged PR #4053:
URL: https://github.com/apache/ozone/pull/4053


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Galsza commented on a diff in pull request #4053: HDDS-7399. Enable specifying external root ca

Posted by GitBox <gi...@apache.org>.
Galsza commented on code in PR #4053:
URL: https://github.com/apache/ozone/pull/4053#discussion_r1050457299


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java:
##########
@@ -195,19 +195,19 @@ public final class HddsConfigKeys {
   public static final String HDDS_X509_RENEW_GRACE_DURATION_DEFAULT = "P28D";
 
   public static final String HDDS_EXTERNAL_ROOT_CA_CERT_PATH =

Review Comment:
   Thank you!



##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2097,29 +2097,38 @@
     <description>X509 signature certificate.</description>
   </property>
   <property>
-    <name>hdds.external.root.ca.cert</name>
+    <name>hdds.x509.rootca.certificate.file</name>
     <value></value>
-    <description>Path to an external CA certificate. This certificate is
-      used when initializing SCM to create a root certificate authority.
-      By default, a self-signed certificate is generated instead.
+    <description>Path to an external CA certificate. The file format is expected
+      to be pem. This certificate is used when initializing SCM to create
+      a root certificate authority. By default, a self-signed certificate is
+      generated instead. Note that this certificate is only used for Ozone's
+      internal communication, and it does not affect the certificates used for
+      HTTPS protocol at WebUIs as they can be configured separately.
     </description>
   </property>
   <property>
-    <name>hdds.external.root.ca.private.key</name>
+    <name>hdds.x509.rootca.private.key.file</name>
     <value></value>
-    <description>Path to an external private key. This private key is later used
-      when initializing SCM to sign certificates as the root certificate
-      authority. When not specified a private and public key is generated
-      instead.
+    <description>Path to an external private key. The file format is expected
+      to be pem. This private key is later used when initializing SCM to sign
+      certificates as the root certificate authority. When not specified a
+      private and public key is generated instead.
+      These keys are only used for Ozone's internal communication, and it does
+      not affect the HTTPS protocol at WebUIs as they can be configured
+      separately.
     </description>
   </property>
   <property>
-    <name>hdds.external.root.ca.public.key</name>
+    <name>hdds.x509.rootca.public.key.file</name>
     <value></value>
     <description>Path to an external public key. This public key is later used

Review Comment:
   Nice catch!



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org