-
Notifications
You must be signed in to change notification settings - Fork 84
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
doc: update spec for feature sign/verify local images #601
Merged
Merged
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6fbe842
doc: update spec for sign/verify local images
yizha1 390a997
doc: update spec for sign/verify local images
yizha1 8f59b9c
doc: update spec for sign/verify local images
yizha1 3fea2b2
doc: update per comments
yizha1 ea2563e
doc: update per comments
yizha1 3c0fa94
doc: update per comments
yizha1 184dcf1
doc: update per comments
yizha1 cea38f6
doc: update per comments
yizha1 32234f3
doc: update to using experimental flag
yizha1 d73dc13
doc: update per comments
yizha1 a310de7
doc:update per comments
yizha1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
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.
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.
For the option, what if we considered something more flexible than just a boolean. If we use something like --type (maybe this isn't the best name, but I think the concept is interesting) we could specify through the option that it is a directory. That would allow us to easily incorporate new modes for tarballs, SBOMs, or other files that could be added in the future.
Example:
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.
@shizhMSFT @patrickzheng200 @qweeah @priteshbandi @vaninrao10 @FeynmanZhou @toddysm @sajayantony please take a look at Kody's comment above. Now we have these options:
--local-content
--local-artifact
--path <file path | dir path>
--file
--use-oci-layout
--oci-dir
--offline
file://./
--dirpath
--target-path
--type <dir|tar|other types>
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.
In fact, if @yizha1 could remember, the very first version of my design was pretty similar to Kody's suggestion, i.e. specifying type of the user input. So personally speaking, I think it's a good idea as long as there's no usability concern (users need to know what options are available in Notation, and what type their input belong to).
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 vote for option 3:
--path <file path | dir path>
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.
Agree with adding
--target type=...
flag in v1.0.0. There is only one target typeoci-layout
in RC.4, it's reasonable to use--oci-layout
as a shorthand for--target type=oci-layout
.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 am not sure having shorthand is a good idea. Having too many switches pollutes the CLI and makes its use hard to use.
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.
@toddysm We will consider adding
--target type=
if the time allows for 1.0. For RC.4 it is a good start, since we only have one type now, compared to--target type=oci-layout
,--oci-layout
is short and convenient. Shorthand could be a good practice for some scenarios, if we have multiple choice, and we know what option 80% users will choose, then shorthand will be convenient for them, since it is short. In the meantime, we could also support 20% scenarios with the full flag. In our cases, OCI image layout could be the most choice, since it is the only standard now OCI images and other OCI artifacts can be stored in a directory structure under filesystem (could be completely offline), and easy to copy to remote registry.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.
My problem is that the main scenario is not that one. People do not want to create the layout before signing. A good user experience will be to reference the docker image and do all the work behind the scenes. Also, another local signing scenario is just signing a blob, like file for example, which doesn't require OCI layout at all. The current experience to ask the user to expand the image in OCI layout is suboptimal. If this is the only option then yes - this will be > 80% of the cases but it is a very little percentage of what people really want to do.
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.
As discussed,
--oci-layout
and--scope
will be experimental feature which requires system variableNOTATION_EXPERIMENTAL
to be set.