-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Terraform rejects expired signatures when downloading providers through registry #33984
Comments
Same error with the Statuscake provider StatusCakeDev/terraform-provider-statuscake#150 |
Based on my investigations, this may have been caused by this commit 1fe57d4. It appears that terraform wasn't checking whether or not the PGP signature was expired when using This may have been an accidental breaking change. We can verify why
GPG says the key was expired on 2022-01-28 thus the maintainer would need to renew their key. Same issue appears here: cyrilgdn/terraform-provider-postgresql#357 (comment) There is also this point at ProtonMail/go-crypto#21 (comment) that could relate to this issue:
|
Thanks for sharing that, @NyanKiyoshi. I agree that seems like a plausible explanation. I think then we will have a decision to make about whether not having been checking those expirations before qualifies as a (retroactively-discovered) security problem that is now fixed per the security exception in our 1.x compatibility promises. To decide that I think we'll need to evaluate the risk tradeoff of continuing to allow expired keys. If the decision is that we want to continue allowing expired keys for some transitional period to give time for provider developers to renew their keys then it seems like (from what you shared) it should be possible to do that. Another possibility is for Terraform to check whether the key was expired at the time the provider was published, rather than at the time the provider is being installed. That seems the most pragmatic to me since these signatures are a point-in-time assertion made by the author when publishing and not something we expected folks to have to constantly redo. However, I'm not sure off the top of my head whether the provider registry protocol provides enough metadata to know when a provider was published, and indeed it might be wrong for Terraform CLI to trust the registry about when the publication happened. I think to decide what's best here we'll need to seek advice from our product security team. We'll post more updates once we have a clearer idea of what the situation is and what options are available. Thanks again! |
by security best practices - the software (in this case terraform provider) developer should take care of his code including dependencies and including to keep them up2date. if some of software package dependencies are not kept up2date it means the software vendor should replace the dependency with safer and with dependency which follows security best practices. |
Workaround use 1.5.7
|
Also, it seems Terraform Registry does not actually allow updating or removing GPG keys, so I assume, even if signing keys are refreshed, they will still not reach end users? |
This comment was marked as duplicate.
This comment was marked as duplicate.
FTR, the statuscake provider is now fixed: StatusCakeDev/terraform-provider-statuscake#150 |
@apparentlymart You own the registry. You knew how many providers would break. Yet, you released a version that broke the environments of all those who venture into using your latest product. This is not a good attitude towards paying customers if you don't care about the rest. You can also display in the registry warnings about expired keys! You must revert and make this opt-in, not twist-arm. |
See how this should be handled in a dialog with the community: opentofu/opentofu#673 |
Hi @nikolay, thanks for this feedback. Please be mindful of the community guidelines when posting, in particular:
A bit of history that may not be clear from the above conversation. This change is an unintended consequence of migrating from the deprecated With regards to remediation: the currently proposed PR (#34004) would take the following steps:
As always, any PR that is not merged and not yet included in a released version is not guaranteed to be the final word on an eventual solution. Apologies in advance if I made a mistake in any of the details above, I will correct as the issue progresses. |
This comment was marked as abuse.
This comment was marked as abuse.
@josemgom , @apparentlymart , @crw : Still receiving errors for Error while installing confluentinc/confluent v1.54.0: error checking signature: openpgp: key expired |
@scottmchargue-eb the next release would have any changes merged after 1.6.0. I would expect this next release, 1.6.1, to happen next week. You will continue to see these errors in 1.6.0. In the meantime, the workaround is to revert to using a 1.5.x version release, latest on that branch is 1.5.7. |
As a provider maintainer, it's still unclear to me whether there is a signing problem I need to address ( Things that would help provider maintainers:
This stuff matters because a single provider being inadvertently considered expired blocks entire workspaces (and often companies) |
Hi @dghubble, Sorry if it was unclear, there is no change, or plan to change the current release signing workflow for providers. This was an unanticipated side-effect from an upstream dependency change and will be patched in v1.6.1. It's possible that there could be future enhancements to key management in the registry, but that would be done outside of Terraform. When that time comes Terraform could participate in communicating the changes of course, though that is more often a last resort, since for the majority of providers the end users are not the one who can directly make changes to the providers. |
I have also come across this problem for the Algolia provider (https://github.com/philippe-vandermoere/terraform-provider-algolia) it seems to use the keys from the user to determine this?: https://github.com/philippe-vandermoere.gpg
Downgrading to 1.5.7 solved the problem. It seems that Terraform is finding the expired key and stopping, it does not 'see' the second, valid key, or maybe the 'unknown' status is causing problems? |
Please note that Terraform 1.6.1 was released couple of days ago an you should be able to use that version without facing that error. |
Sorry for polluting the thread, not 'aware' that v1.6.1 was released. Doh. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform Version
Debug Output
Expected Behavior
Terraform init must work as expected
Actual Behavior
Terraform init fails throwing a key expired error.
Steps to Reproduce
terraform init
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: