-
Notifications
You must be signed in to change notification settings - Fork 42
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
update: improve missing trustpolicy error message #282
Conversation
Signed-off-by: Kody Kimberl <[email protected]>
Signed-off-by: Kody Kimberl <[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.
I made a new commit that addresses the above comments. It now checks the error type to determine what message to return.
Output when trustpolicy is missing:
c889f3b9d811:notation kodysk$ ./bin/notation verify $IMAGE
Warning: Always verify the artifact using digest(@sha256:...) rather than a tag(:v1) because resolved digest may not point to the same signed artifact, as tags are mutable.
Error: trust policy is not present, please create trust policy at /Users/kodysk/Library/Application Support/notation/trustpolicy.json
Output when trustpolicy has 000 permissions:
c889f3b9d811:notation kodysk$ ./bin/notation verify $IMAGE
Warning: Always verify the artifact using digest(@sha256:...) rather than a tag(:v1) because resolved digest may not point to the same signed artifact, as tags are mutable.
Error: unable to read trust policy due to file permissions, please verify the permissions of /Users/kodysk/Library/Application Support/notation/trustpolicy.json
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
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
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
This PR improves the error message for a missing trustpolicy file
This PR intends to resolve the last comment in the following issue:
notaryproject/notation/#128
This is the output when the trustpolicy is missing:
Signed-off-by: Kody Kimberl [email protected]