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

cli: ignore expired provider signing keys from registry during init #34004

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Oct 6, 2023

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

@jbardin jbardin added the 1.6-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Oct 6, 2023
@jbardin jbardin requested a review from a team October 6, 2023 14:48
@jbardin jbardin self-assigned this Oct 6, 2023
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.
@jbardin jbardin merged commit c820d44 into main Oct 6, 2023
4 checks passed
@jbardin jbardin deleted the jbardin/openpgp-key-expiration branch October 6, 2023 18:47
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

Copy link
Contributor

github-actions bot commented Dec 8, 2023

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.6-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform rejects expired signatures when downloading providers through registry
3 participants