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

Expand NotAfter limit enforcement behavior #15152

Merged

Commits on Apr 26, 2022

  1. Expand NotAfter limit enforcement behavior

    Vault previously strictly enforced NotAfter/ttl values on certificate
    requests, erring if the requested TTL extended past the NotAfter date of
    the issuer. In the event of issuing an intermediate, this behavior was
    ignored, instead permitting the issuance.
    
    Users generally do not think to check their issuer's NotAfter date when
    requesting a certificate; thus this behavior was generally surprising.
    
    Per RFC 5280 however, issuers need to maintain status information
    throughout the life cycle of the issued cert. If this leaf cert were to
    be issued for a longer duration than the parent issuer, the CA must
    still maintain revocation information past its expiration.
    
    Thus, we add an option to the issuer to change the desired behavior:
    
     - err, to err out,
     - permit, to permit the longer NotAfter date, or
     - truncate, to silently truncate the expiration to the issuer's
       NotAfter date.
    
    Since expiration of certificates in the system's trust store are not
    generally validated (when validating an arbitrary leaf, e.g., during TLS
    validation), permit should generally only be used in that case. However,
    browsers usually validate intermediate's validity periods, and thus
    truncate should likely be used (as with permit, the leaf's chain will
    not validate towards the end of the issuance period).
    
    Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
    cipherboy committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    f864a9c View commit details
    Browse the repository at this point in the history
  2. Add tests for expanded issuance behaviors

    Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
    cipherboy committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    a12457f View commit details
    Browse the repository at this point in the history