Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ocsp crl check method c #4545

Merged
merged 14 commits into from
Aug 17, 2023

Commits on Aug 16, 2023

  1. Modify init order for OCSP subsystem

    The init order for OCSP is modified to allow CRL retrieval before
    creating connection with DS or other services. Secure`connections will be
    verified against the CRL.
    
    Solve RHCS-4262
    fmarco76 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    fb6aa84 View commit details
    Browse the repository at this point in the history
  2. Add callback for CRL validation at application level

    Add new field in CMS for a callback validation of certificate
    instantiated by PKISocketFactory.
    
    This is useful for OCSP where the OCSP protocol cannot be enabled and
    the verification is done on CRLs.
    
    Solve RHCS-4262
    fmarco76 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    c4cd69a View commit details
    Browse the repository at this point in the history
  3. Make crl check for connection optional

    Add a new parameter to enable the crl check for OCSP connection when
    acting as client. The new parameter is
    `ocsp.store.ldapStore.checkSubsystemConnection` and its default value is
    `false`. When set to `true` connection certificate are verified using
    the crl stored in the LDAP.
    fmarco76 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    66e9574 View commit details
    Browse the repository at this point in the history
  4. Add crl check for OCSP acting as server

    When OCSP is acting as server certificate can be verified using CRL
    internally stored.
    
    To verify the certificates the `LDAPStore` has to be enabled with the
    variable `ocsp.store.ldapStore.checkSubsystemConnection` and the
    variable `auths.revocationChecking.enabled` both set to true.
    
    Solve RHCS-4262
    fmarco76 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    1a291d6 View commit details
    Browse the repository at this point in the history
  5. Move callback reference from CMS to CMSEngine

    Socket callback moved to CMSEngine to avoid dependencies on global
    variables.
    fmarco76 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    3034d23 View commit details
    Browse the repository at this point in the history
  6. OCSP default CRL check and CA cert validation

    The parameter `ocsp.store.ldapStore.checkSubsystemConnection` default
    value has been modified to `true` so when LDAPStore is used certificates
    are verified against the CRL.
    
    Additionally, during the certificate verification the certificate signer
    is verified with the CA certificate providing the CRL to be sure it is
    the real issuer.
    fmarco76 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    79e1bbd View commit details
    Browse the repository at this point in the history
  7. Rename checkSubsystemConnection to validateConnCertWithCRL

    The option `ocsp.store.ldapStore.validateConnCertWithCRL` enables the
    revocation verification of peer certificates using the CRL stored in the LDAP
    shared with the CA.
    
    When it is set to `true` (default value), the peer certificate of all the outcome connections from the OCSP subsystem are verified with the CRL.
    
    If the option `auths.revocationChecking.enabled` is also set to `true` the peer certificate ot all the income connections to the OCSP subsystem are verified with the CRL.
    fmarco76 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    09f3287 View commit details
    Browse the repository at this point in the history
  8. Use AKI/SKI to match peer certificate with CA CRL

    Identification of CRL issuing point done by matching Authority Key
    Identifier with Subject Key Identifier instead of DN matching.
    
    This should make more reliable the check because not affected of
    encoding or format changes in the DN.
    fmarco76 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    b1188aa View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9b6cf5d View commit details
    Browse the repository at this point in the history
  10. Modify local variable names

    fmarco76 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    ea7a7f5 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e963729 View commit details
    Browse the repository at this point in the history
  12. Modify the callback location

    Due to refactoring the engine object is not accessible using static
    reference from outside the declaring package. Therefore the callback
    reference have been stored globally in the `CMSEngine` class
    fmarco76 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    5c146fa View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2023

  1. Improve OCSP exception handling

    Add stack trace for error logs when they are generated from internal
    error
    fmarco76 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    760b625 View commit details
    Browse the repository at this point in the history
  2. Move the callback to PKISocketFactory and fix startup

    Moving the callback to `PKISocketFactory` there is no need to have store
    it in a static variable. However, only OCSPEngine instances have a valid
    value so no other instances are used.
    
    The startup order has been fixed.
    fmarco76 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    8362f1e View commit details
    Browse the repository at this point in the history