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

feat: validate gpg key against existing list of providers #1423

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

diofeher
Copy link
Member

@diofeher diofeher commented Jan 4, 2025

Closes #356

Depends on opentofu/libregistry#47

Code based on @cam72cam's work

Description

This code is used to verify if the provided key by the user is really signing the packages they meant to be signing. There were multiple instances when the user provided wrong keys and then commits had to be reverted in order to provide the right signing key.

Failing signature:
Screenshot 2025-01-10 at 12 44 55

Working signature:
Screenshot 2025-01-10 at 12 54 17

Signed-off-by: Diogenes Fernandes <[email protected]>
@diofeher diofeher changed the title feat: add initial code for checkers feat: validate gpg key against existing list of providers Jan 4, 2025
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
@diofeher diofeher marked this pull request as ready for review January 10, 2025 15:55
@abstractionfactory
Copy link
Contributor

Thanks @diofeher I'm out for the weekend, I'll review first thing on Monday!

@abstractionfactory abstractionfactory self-assigned this Jan 10, 2025
Signed-off-by: Diogenes Fernandes <[email protected]>
@diofeher diofeher force-pushed the validate-opentofu-keys branch from 23175ab to ed6662e Compare January 10, 2025 16:02
@diofeher
Copy link
Member Author

Thanks @abstractionfactory, enjoy your weekend!

Copy link
Contributor

@abstractionfactory abstractionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your work @diofeher !

src/cmd/verify-gpg-key/main.go Outdated Show resolved Hide resolved
src/cmd/verify-gpg-key/verify-key-in-providers.go Outdated Show resolved Hide resolved
src/cmd/verify-gpg-key/verify-key-in-providers.go Outdated Show resolved Hide resolved
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Copy link
Contributor

@abstractionfactory abstractionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I'd like someone else familiar with the registry to also take a look.

Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
@diofeher diofeher requested review from cam72cam and ollevche January 25, 2025 18:15
@diofeher diofeher requested a review from cam72cam January 29, 2025 12:39
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
@abstractionfactory abstractionfactory marked this pull request as draft January 30, 2025 10:54
@abstractionfactory
Copy link
Contributor

Moving back to draft since the PR in libregistry isn't merged yet. We will review this PR fully once the libregistry one is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate uploaded GPG keys against providers
4 participants