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
cmd/build: don't expect key if alg is non-empty #5343
Merged
srenatus
merged 1 commit into
open-policy-agent:main
from
srenatus:sr/cmd/fix-signing-key-missing-error
Nov 2, 2022
Merged
cmd/build: don't expect key if alg is non-empty #5343
srenatus
merged 1 commit into
open-policy-agent:main
from
srenatus:sr/cmd/fix-signing-key-missing-error
Nov 2, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
srenatus
force-pushed
the
sr/cmd/fix-signing-key-missing-error
branch
from
November 2, 2022 12:33
2f60ed9
to
631210b
Compare
srenatus
commented
Nov 2, 2022
@@ -350,8 +348,8 @@ func buildVerificationConfig(pubKey, pubKeyID, alg, scope string, excludeFiles [ | |||
} | |||
|
|||
func buildSigningConfig(key, alg, claimsFile, plugin string) (*bundle.SigningConfig, error) { | |||
if key == "" && (plugin != "" || claimsFile != "" || alg != "") { | |||
return nil, fmt.Errorf("specify the secret (HMAC) or path of the PEM file containing the private key (RSA and ECDSA)") | |||
if key == "" && (plugin != "" || claimsFile != "") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☝️ This line is the relevant change, the rest is noise and cleanup 🧹
philipaconrad
previously approved these changes
Nov 2, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just minor nits:
Since `alg` has a default setting, we've gotten that error too often. Follow-up to open-policy-agent#5297 and open-policy-agent#4972. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
srenatus
force-pushed
the
sr/cmd/fix-signing-key-missing-error
branch
from
November 2, 2022 12:51
631210b
to
78f840f
Compare
will merge when green |
philipaconrad
approved these changes
Nov 2, 2022
I lied 😆 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since
alg
has a default setting, we've gotten that error too often.Follow-up to #5297 and #4972.