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

[BUG]: OpenTofu registry is missing GPG keys for this provider #2183

Open
1 task done
venkatamutyala opened this issue Mar 5, 2024 · 12 comments
Open
1 task done

[BUG]: OpenTofu registry is missing GPG keys for this provider #2183

venkatamutyala opened this issue Mar 5, 2024 · 12 comments
Labels
Type: Bug Something isn't working as documented

Comments

@venkatamutyala
Copy link

Expected Behavior

I wasn't expecting this notification when using opentofu:

image

Actual Behavior

I am being warned that signature validation was skipped

Terraform Version

opentofu 1.6.2

Affected Resource(s)

Initialization of the provider

Terraform Configuration Files

No response

Steps to Reproduce

Use opentofu and initalize with the github provider

Debug Output

No response

Panic Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@venkatamutyala venkatamutyala added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Mar 5, 2024
@venkatamutyala
Copy link
Author

venkatamutyala commented Mar 5, 2024

@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Mar 5, 2024
@cube2222
Copy link

cube2222 commented Mar 6, 2024

OpenTofu Technical Lead here - Just a note @kfcampbell, as you've marked this as up for grabs - the public gpg key needs to be submitted by a member of this organization, for the registry to accept it.

@kfcampbell kfcampbell removed the Status: Up for grabs Issues that are ready to be worked on by anyone label Mar 8, 2024
@kfcampbell
Copy link
Member

Hmm...our private key is stored as an Actions secret, which is great because the actual content of it isn't stored anywhere else to my knowledge. I unfortunately have no idea where our public key exists as a file. This could be a bit of a hassle.

@cube2222
Copy link

cube2222 commented Mar 8, 2024

@kfcampbell you’ve probably added it to the HashiCorp registry, and should be able to get it out of there.

@StephenWithPH
Copy link

@kfcampbell

If you can't get the your public key from any other source, you can get it via:

curl 'https://registry.terraform.io/v1/providers/integrations/github/6.0.1/download/linux/amd64' | jq --raw-output '.signing_keys | .gpg_public_keys | .[0] | .ascii_armor' > github_registry_key.pub

Note that the /6.0.1/download/linux/amd64 portion of the URL is necessary solely to satisfy the registry's API.

I attached the key for reference.
github_registry_key.pub.txt

You can get its fingerprint:

gpg2 --with-fingerprint github_registry_key.pub

... which should return

pub   rsa4096/0x38027F80D7FD5FB2 2020-09-03 [SC]
      Key fingerprint = F319 28FA CE52 F1A1 3A6C  60EA 3802 7F80 D7FD 5FB2
uid                             terraform-provider-github (https://www.terraform.io/docs/registry/providers/publishing.html#preparing-and-adding-a-signing-key) <jcudit@github.com>
sub   rsa4096/0x52C9A746AB3CA576 2020-09-03 [E]
      Key fingerprint = 7A4F 66FD EDDB 55B0 818A  B464 52C9 A746 AB3C A576

Key fingerprint = F319 28FA CE52 F1A1 3A6C 60EA 3802 7F80 D7FD 5FB2

matches your build logs:

https://github.com/integrations/terraform-provider-github/actions/runs/7934263784/job/21664855922#step:6:9

... since that env var is used by goreleaser to sign: https://github.com/goreleaser/goreleaser-action?tab=readme-ov-file#signing

@StephenWithPH
Copy link

@kfcampbell ... are you able to use the instructions above to get the key? Once you have that key, the PR to Open Tofu should be very easy: https://github.com/opentofu/registry/issues/new?assignees=&labels=provider-key%2Csubmission&projects=&template=provider_key.yml&title=Provider+Key%3A+

Only you (or someone else from GitHub) can take care of this.

Once you do so, it will allow users of GitHub and OpenTofu to securely use this provider to manage their GitHub resources.

@wjbabicz
Copy link

Bumping, trying to migrate our workflows to OpenTofu and cannot pull in the Github provider because of the missing GPG keys.

@pascal-hofmann
Copy link
Contributor

@kfcampbell Any update on this?

After several months in the "terraform vs. opentofu" limbo and being stuck on terraform 1.5 my organisation now also decided to switch to OpenTofu. It would be great to be able to properly install the GitHub provider.

@venkatamutyala
Copy link
Author

Just tried escalating via GitHub Support. here is their response:

image

@StephenWithPH
Copy link

Just tried escalating via GitHub Support. here is their response:

We had similar experience with support. For those of us using GitHub Enterprise, I suggest reaching out via sales channels to see if we can get traction.

@pascal-hofmann
Copy link
Contributor

@nickfloyd Can you maybe help with that?

Thanks in advance!
Pascal

@venkatamutyala
Copy link
Author

Just tried escalating via GitHub Support. here is their response:

We had similar experience with support. For those of us using GitHub Enterprise, I suggest reaching out via sales channels to see if we can get traction.

Anyone here spending a decent amount on GitHub enterprise that could help push this forward via their sales rep?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

6 participants