RA: Use Validation Profiles to determine order/authz lifetimes #7989
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.
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.
TODO: use ra.defaultProfileName to ensure a profile is always populated in issuance requests to the CA, and deprecate ca.defaultProfileName.
TODO: file a ticket to track the corresponding staging/prod config changes
Fixes #7605
Warning
Do not merge until #7988 has been merged and the above TODOs have been resolved.