-
-
Notifications
You must be signed in to change notification settings - Fork 157
fix: allow to specify custom signatureKey in the config.ini
#1024
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1024 +/- ##
==========================================
+ Coverage 20.14% 20.23% +0.09%
==========================================
Files 42 42
Lines 3222 3242 +20
==========================================
+ Hits 649 656 +7
- Misses 2488 2499 +11
- Partials 85 87 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
signatureKey in the config.ini
lucarin91
left a comment
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 have some concerns on the ini file parsing, it seems not so stable to do a replace all on the \\n. I would try to investigate if we can do better then that.
To avoid possible issue with the replaceAll, we may allow only the Supported formatMultiline using the backtick Rejected format
Rejected with the error
Error: |
|
@dido18 Can you please add some documentation about this new key format in the ini file? |
I update the wiki page with a new section |
cmaglie
left a comment
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.
Tested locally, it's working for me 👍🏼
Co-authored-by: Luca Rinaldi <[email protected]>
Co-authored-by: Luca Rinaldi <[email protected]>
Co-authored-by: Luca Rinaldi <[email protected]>
Please check if the PR fulfills these requirements
before creating one)
Bug fix. Verify the signatures using a custom public key is not working anymore.
The create-agent ignores the
signatureKeyin theconfig.iniand always uses the Arduino public key, so the signature verification fails.signatureKeyinto the/home/<user>/.config/ArduinoCreateAgent/config.inihellowith the private key generated in the step before with the go code belowtest.shscript:Add the
signatureKeyinto theconfig.iniwith this format (using backtick)If the
test.shis launched, the result isIt should not.
Notable changes are the following:
/uploadendpoint logs an error if the signature verification failslog.WithField("err", err).Error("Error verifying the command")(while before the error was not shown anywhere)signatureKeymust be specified in the confi.ini wrapped with backthick ( ` )Other correlated issues
Forum discussion about this issue: https://forum.arduino.cc/t/signing-command-line-for-arduino-create-agent/1366082/2