-
Notifications
You must be signed in to change notification settings - Fork 23
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: add .NET verion generate-signature command #91
Conversation
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #91 +/- ##
=======================================
Coverage 69.60% 69.60%
=======================================
Files 6 6
Lines 306 306
=======================================
Hits 213 213
Misses 87 87
Partials 6 6 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
I guess my first question would be: has this new feature been tested with our notation CLI and AKV? |
Signed-off-by: Junjie Gao <[email protected]>
Yes, it was tested with Notation CLI. Updated the PR description. |
Signed-off-by: Junjie Gao <[email protected]>
@@ -9,22 +9,62 @@ namespace Notation.Plugin.Protocol | |||
public class GenerateSignatureRequest |
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.
Just curious if record can be applied or not.
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.
I think it works, but it may not help a lot because I still need to define the JsonPropertyName and manually do the the parameter validation during initialization.
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.
Thanks Shiwei! Updated to use record
in KeyVaultClient.
|
||
if (signResult.KeyId != _keyId) | ||
{ | ||
throw new PluginException("Invalid keys or certificates identifier."); |
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.
It is not invalid but mismatch? When will this happen? What's the scenario for that? If the exception is thrown, should we also include the key id we want and got?
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.
I tested invalid key names and versions, and in both cases, SignDataAsync
raised exceptions. Although I didn't find a real case that could trigger the exception, it's included to handle server errors that might return unexpected values.
Also updated the exception to include the KeyId.
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
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
Features:
ca_certs
pluginConfig to build the cert chain from custom certificate bundleTested with Notation CLI:
Resolve part of #90
Signed-off-by: Junjie Gao [email protected]