cli: ignore expired provider signing keys from registry during init #34004
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.
The community fork of the
openpgp
package chosen by Terraform added unconditional verification of key expiration when validating signatures, which under normal circumstances is a welcome hardening of the API. This impact of this change however was overlooked when migrating to the new package, and it interfered with the current workflow set by the Terraform Registry.Provider developers are not currently required to keep the signing keys stored in the Registry up to date, and older releases may be signed with a key which has since expired. For our purposes here however, we are validating the key and signature used at the time of publishing, and given that the Registry has previously vouched for the validity of the key used, we can continue to trust that key returned by the Registry for installation.
This reverts the signature handling to that of the prior Terraform release, but new workflows with more fine-grained key handling may be developed in future versions of Terraform and the Registry.
Fixes #33984