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

fix: Explicitly set private key type for GPG key generation #11944

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

jannfis
Copy link
Member

@jannfis jannfis commented Jan 10, 2023

While running make test-local on a Fedora 37 box, the GnuPG key creation failed in the unit tests. After doing some research, it seems that recent versions of GnuPG have a bug [1] when specifying the key type to be generated as Default, so this PR explicitly sets it to RSA. We really don't care about the long term security of the private key, as it's only used to initialize the trust db and is transient by nature.

Submitting this fix before it hits us :)

Current version of GnuPG in our most recent release (v2.5.4):

$ docker run --rm -it quay.io/argoproj/argocd:v2.5.4 gpg --version | head -1
gpg (GnuPG) 2.2.27

Version from Fedora 37:

$ gpg --version | head -1
gpg (GnuPG) 2.3.8

[1] https://dev.gnupg.org/T5444

Signed-off-by: jannfis jann@mistrust.net

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

Signed-off-by: jannfis <jann@mistrust.net>
@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Base: 47.29% // Head: 47.29% // No change to project coverage 👍

Coverage data is based on head (2fcaa26) compared to base (57d01a4).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11944   +/-   ##
=======================================
  Coverage   47.29%   47.29%           
=======================================
  Files         245      245           
  Lines       41669    41669           
=======================================
  Hits        19706    19706           
  Misses      19978    19978           
  Partials     1985     1985           
Impacted Files Coverage Δ
util/gpg/gpg.go 66.00% <ø> (ø)
util/settings/settings.go 48.42% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jannfis jannfis requested a review from crenshaw-dev January 11, 2023 00:57
@crenshaw-dev
Copy link
Member

No need to cherry-pick back, right? As I understand it, this can't bite us until we upgrade the base image.

@jannfis
Copy link
Member Author

jannfis commented Jan 11, 2023

Exactly. This is a forward-fix :)

@crenshaw-dev crenshaw-dev merged commit 1ccaefe into argoproj:master Jan 11, 2023
emirot pushed a commit to emirot/argo-cd that referenced this pull request Jan 27, 2023
…#11944)

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
Signed-off-by: emirot <emirot.nolan@gmail.com>
schakrad pushed a commit to schakrad/argo-cd that referenced this pull request Mar 14, 2023
…#11944)

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
Signed-off-by: schakrad <chakradari.sindhu@gmail.com>
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.

2 participants