Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-7391

Phase I - Automated live rotation of CA certificates in a cluster with established trust

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 1.4.0
    • Security

    Description

      The current rootCA certificate expiration happens in somewhat over 5 years after the certificate was created.
      This event invalidates all certificates that are signed in the trust chain for which the rootCA certificate is the base of trust, this means that rotation and renewal of this certificate is time consuming at once, as it includes the renewal of all certificates.

      In order to renew the rootCA certificate, instead of a full security re-bootstrap we would like to follow the following procedure:

      • before the rootCA certificate expires, we create a new rootCA certificate
      • with the new rootCA certificate we rotate the sub-CA certificate of all 3 SCMs
      • once that is done, we make the new rootCA certificate available for other services via an SCM API
      • other services are starting to poll for the new rootCA certificate at a time when it is most likely already generated and available via the SCM API
      • once the new rootCA certificate is present, services update their TrustStores and after a random delay that leaves room for most if not all of the other services to refresh their TrustStores, every service renews it own certificate regardless of expiration, and gets a new certificate signed by the new sub-CA certificate of the leader.

      During this process the start for polling the rootCA certificate happens around the same time, but this is a short request and the response payload is the rootCA certificate only, so SCM might experience a short peak here so we might want to introduce a jitter for this if necessary.

      During this process the issuance of new certificates is a resource intensive task on the leader SCM, so we definitely want to introduce a jitter in that, a configurable one, in order to be able to shorten this period for testing.

      More information on the failure scenarios and the whole process can be found in the attached pdf document.

      Attachments

        1. CA_cert_rotation_design.pdf
          56 kB
          István Fajth

        Issue Links

          1.
          Create branch for CA cert rotation development Sub-task Resolved István Fajth
          2.
          Prepare CertificateClient to store more than one rootCA certificate Sub-task Resolved Szabolcs Gál
          3.
          Add SCM HA aware Root CA certificate monitor task Sub-task Resolved Sammi Chen
          4.
          Prepare TrustManagers to handle multiple root CA certficates Sub-task Resolved Szabolcs Gál
          5.
          Add initialization logic in CertificateClient to handle more than one rootCA certificate Sub-task Resolved Szabolcs Gál
          6.
          Implement a protocol call to get the rootCA from SCM Sub-task Resolved Szabolcs Gál
          7.
          Integrate rootCA rotation related changes to OM Sub-task Resolved Unassigned
          8.
          Integrate rootCA rotation related changes to DN Sub-task Resolved Unassigned
          9.
          Integrate root CA rotation related changes to Recon Sub-task Resolved Unassigned
          10.
          Prohibit SCM role change initiated by user during Root CA rotation Sub-task Resolved Sammi Chen
          11.
          ServiceInfo object to handle multiple rootCA certificates Sub-task Resolved István Fajth
          12.
          Handle multiple rootCA certificates in the ServiceInfo object on the client side. Sub-task Resolved Unassigned
          13.
          Test cross compatibility of a secured cluster vs old client Sub-task Resolved Unassigned
          14.
          Test cross compatibility of a secure client vs old cluster Sub-task Resolved Unassigned
          15.
          Add cleanup logic to remove old CA related material Sub-task Resolved Unassigned
          16.
          Provide way to delete on disk old root CA key and certificate Sub-task Resolved Unassigned
          17.
          Rotate Root CA and Sub CA in SCM Sub-task Resolved Sammi Chen
          18.
          Create scheduler to check for new root ca certificates Sub-task Resolved Szabolcs Gál
          19.
          Fetch and save all root certificates during service's certificate rotation Sub-task Resolved Szabolcs Gál
          20.
          Add RootCARotationPoller to CertClient Sub-task Resolved Szabolcs Gál
          21.
          Add the ability to turn off automated rootCA and sub-CA rotation Sub-task Resolved Sammi Chen
          22.
          Implement the ability to update the ServiceInfo object with the new rootCA Sub-task Resolved István Fajth
          23.
          Shared mutable state causes rootca poller to miss updates Sub-task Resolved István Fajth
          24.
          Intermittent failure in test-root-ca-rotation.sh due to null certId Sub-task Resolved Sammi Chen
          25.
          Intermittent timeout waiting for certificate 4 Sub-task Resolved Sammi Chen
          26.
          Failed to Read data from previously created key Sub-task Resolved Sammi Chen
          27.
          Fix RootCaRotationPoller not toggling rotation if previous rotation failed Sub-task Resolved Szabolcs Gál
          28.
          [ozone-cert-rotation] rootCA configs are referred even when RootCA is disabled Sub-task Resolved Unassigned
          29.
          rootCA configs should not be checked when RootCA is disabled Sub-task Resolved Sammi Chen
          30.
          Block CSR request in SCM for "hdds.x509.rootca.certificate.polling.interval" time period Sub-task Resolved Sammi Chen
          31.
          Fetch root CA certificate list during SCM startup Sub-task Resolved Sammi Chen
          32.
          Use sequence ID for certificate serial ID Sub-task Resolved Sammi Chen
          33.
          Consolidate CertificateClient handleCase handling Sub-task Resolved Sammi Chen
          34.
          Handle trust chain changes in clients when rootCAs are rotated. Sub-task Resolved István Fajth
          35.
          Enable Root CA auto rotation by default Sub-task Open Sammi Chen

          Activity

            People

              pifta István Fajth
              pifta István Fajth
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: