-
Notifications
You must be signed in to change notification settings - Fork 44
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
plugins contract: use cli arguments instead of json as input #152
Comments
Thanks @qmuntal. We briefly discussed in the Notary v2 meeting today. @rgnote, @gokarnm and @shizhMSFT were going to review. |
@qmuntal that is an interesting idea. The think the current approach is more appropriate though as
Decoupling the configuration data model from the plugin contract makes a lot of sense, it allows us to evolve the config without breaking contract, I'm open to ideas here. The simplest approach, maybe to just pass a map with some provision for custom config data for the plugin (current key config does not support that yet). @shizhMSFT any feedback? |
The first drawback is indeed a hard limitation, but do you think we will ever reach even 1KB input? The largest component of the payload is the digested content, which should be at most 32 bytes when using SHA512.
Do you envision if we will ever pass sensitive data? I can see that using Edit: The previous issues with vscode and go-delve are not debugging blockers, as there are multiple hacks on could do to overcome it. |
What about this: // signing request
{
"contractVersion": "<contract version>",
"keyName": "<key name>",
"keyId": "<key id>",
"payload": "<base64 string>",
}
// signing envelope request
{
"contractVersion": "<contract version>",
"keyName": "<key name>",
"keyId": "<key id>",
"payload": "<base64 string>",
"payloadType": "<payload type>",
"signatureEnvelopeType": "<signature envelope type>",
} |
The payload for image signing are small, as they are detached from the actual image payload. We want to keep the option open to sign arbitrary payloads in future which are not limited to OCI artifacts.
We won't as part of plugin contract, but we intend to support pass through config for plugins, for users to pass additional plugin specific configuration as CLI params or in key config alongside plugin name. These may contain sensitive data (say kms authentication details), even though we'll advice users/plugin developers not to pass sensitive data.
Got it. One workaround would be for the plugin developer to support alternate way to pass request that does not rely on stdin (say a |
Looks good, I'd additionally include a map for pass through config for plugin itself. // key definition for plugin with additional config
"keyDefinition" : {
"name": "mysigningkey",
"id" : "keyid",
"plugin": "com.example.nv2plugin"
"pluginConfig" : {
"kms-region" : "asia-1"
}
} // signing request
{
"contractVersion": "<contract version>",
"keyName": "<key name>",
"keyId": "<key id>",
"pluginConfig" : { // map string-string
"kms-region" : "asia-1"
}
"payload": "<base64 string>"
} |
@qmuntal can we close this issue? |
Yes! |
The plugin extensibility spec defines the plugin cli input as a json file, such as:
I'm not convinced that using json as input format is better than just using cli arguments, such as:
Using plain cli arguments have the following advantages:
keyDefinition
as a json object is a bad business, as a change in how we store our config could mean breaking some plugins.@SteveLasker @gokarnm @shizhMSFT
The text was updated successfully, but these errors were encountered: