Skip to content

feat: Added notation certificate command for trust store#405

Merged
shizhMSFT merged 50 commits intonotaryproject:mainfrom
patrickzheng200:truststore
Oct 31, 2022
Merged

feat: Added notation certificate command for trust store#405
shizhMSFT merged 50 commits intonotaryproject:mainfrom
patrickzheng200:truststore

Conversation

@patrickzheng200
Copy link
Copy Markdown
Contributor

@patrickzheng200 patrickzheng200 commented Oct 19, 2022

This PR is the implementation of notation certificate command regarding the use of trust store.
Based on community meeting, this command only effects on User level.

Signed-off-by: Patrick Zheng patrickzheng@microsoft.com

Patrick Zheng added 18 commits October 12, 2022 11:02
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 19, 2022

Codecov Report

Merging #405 (4e0fc5c) into main (8d1d4dc) will decrease coverage by 0.89%.
The diff coverage is 28.12%.

@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
- Coverage   33.84%   32.95%   -0.90%     
==========================================
  Files          21       25       +4     
  Lines        1105     1232     +127     
==========================================
+ Hits          374      406      +32     
- Misses        722      814      +92     
- Partials        9       12       +3     
Impacted Files Coverage Δ
cmd/notation/cert/cmd.go 0.00% <0.00%> (ø)
cmd/notation/main.go 0.00% <0.00%> (ø)
cmd/notation/cert/list.go 13.79% <13.79%> (ø)
cmd/notation/cert/add.go 29.09% <29.09%> (ø)
cmd/notation/cert/show.go 30.76% <30.76%> (ø)
cmd/notation/cert/delete.go 33.33% <33.33%> (ø)
cmd/notation/cert/generateTest.go 17.92% <48.71%> (ø)
cmd/notation/list.go 23.94% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Patrick Zheng added 2 commits October 31, 2022 11:10
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Patrick Zheng added 3 commits October 31, 2022 14:49
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Patrick Zheng added 2 commits October 31, 2022 16:07
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Copy link
Copy Markdown
Contributor

@priteshbandi priteshbandi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


if opts.all {
// Delete all certificates under storeType/namedStore
errorSlice = truststore.DeleteAllCerts(storeType, namedStore, opts.confirmed, errorSlice)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

errorSlice is []error. We can define a type type Errors []error and implement func (errs Error) Error string() to reduce duplicated code. This can be done later in the notation CLI code refactoring. Of course, we need an issue to track.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created an issue to track this.

Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Patrick Zheng added 2 commits October 31, 2022 20:46
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Copy link
Copy Markdown
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shizhMSFT shizhMSFT merged commit f0e77eb into notaryproject:main Oct 31, 2022
@patrickzheng200 patrickzheng200 deleted the truststore branch October 31, 2022 13:10
7h3-3mp7y-m4n pushed a commit to 7h3-3mp7y-m4n/notation that referenced this pull request Mar 29, 2025
…ject#405)

This PR is the implementation of `notation certificate` command
regarding the use of trust store.
Based on community meeting, this command only effects on User level.

Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
FeynmanZhou pushed a commit to FeynmanZhou/notation that referenced this pull request May 15, 2025
…ject#405)

This PR is the implementation of `notation certificate` command
regarding the use of trust store.
Based on community meeting, this command only effects on User level.

Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Update notation cert add/remove commands for RC1

7 participants