RA: Use Validation Profiles to determine order/authz lifetimes #7989
+421
−239
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add three new fields to the ra.ValidationProfile structure, representing the profile's pending authorization lifetime (used to assign an expiration when a new authz is created), valid authorization lifetime (used to assign an expiration when an authz is successfully validated), and order lifetime (used to assign an expiration when a new order is created). Remove the prior top-level fields which controlled these values across all orders.
Add a "defaultProfileName" field to the RA as well, to facilitate looking up a default set of lifetimes when the order doesn't specify a profile. If this default name is explicitly configured, always provide it to the CA when requesting issuance, so we don't have to duplicate the default between the two services.
Modify the RA's config struct in a corresponding way: add three new fields to the ValidationProfiles structure, and deprecate the three old top-level fields. Also upgrade the ra.NewValidationProfile constructor to handle these new fields, including doing validation on their values.
Fixes #7605
Warning
Do not merge until an IN-????? ticket has been filed to track the corresponding staging/prod config changes