Skip to content
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

refactor!: refactor code to support more signature envelopes #72

Merged
merged 3 commits into from
Sep 21, 2022

Conversation

shizhMSFT
Copy link
Contributor

@shizhMSFT shizhMSFT commented Sep 9, 2022

This PR is a sum of PRs to refactor code to support more future signature envelopes like COSE.

All commits / PRs in this PR have been reviewed individually as follows.

@shizhMSFT shizhMSFT requested review from a team September 9, 2022 03:10
@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2022

Codecov Report

Merging #72 (9c1169a) into main (21758d7) will increase coverage by 5.46%.
The diff coverage is 93.50%.

@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
+ Coverage   70.33%   75.79%   +5.46%     
==========================================
  Files          23       27       +4     
  Lines        1591     1669      +78     
==========================================
+ Hits         1119     1265     +146     
+ Misses        355      311      -44     
+ Partials      117       93      -24     
Impacted Files Coverage Δ
signature/types.go 0.00% <0.00%> (ø)
signature/jws/envelope.go 88.88% <88.88%> (ø)
signature/jws/jws.go 89.89% <89.89%> (ø)
signature/errors.go 94.73% <94.73%> (ø)
signature/signer.go 96.61% <96.61%> (ø)
signature/internal/base/envelope.go 97.72% <97.72%> (ø)
signature/algorithm.go 100.00% <100.00%> (ø)
signature/envelope.go 100.00% <100.00%> (ø)
signature/jws/jwt.go 100.00% <100.00%> (ø)
signature/jws/types.go 100.00% <100.00%> (ø)

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

@shizhMSFT
Copy link
Contributor Author

Although the DCO check fails in this PR, the DCO checks are actually passed in the sub-PRs.

@gokarnm We can "set DCO to pass" before merging this PR.

@shizhMSFT shizhMSFT changed the title COSE Support refactor!: refactor code to support more signature envelopes Sep 21, 2022
@shizhMSFT
Copy link
Contributor Author

NOTE This PR will be merged by rebase merging.

Copy link

@patrickzheng200 patrickzheng200 left a comment

Choose a reason for hiding this comment

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

I've reviewed all individual PRs of this PR, so LGTM.

Copy link
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. Verified that all 3 commits were reviewed earlier as part of #71 , #73 and #76

Copy link
Contributor

@binbin-li binbin-li left a comment

Choose a reason for hiding this comment

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

left some minor comments, lgtm

PrivateKey() crypto.PrivateKey
}

// remoteSigningMethod wraps the remote signer to be a SigningMethod
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: missing period in the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's address them in other PRs.

// Specifies the Notary v2 Signing Scheme used by the signature.
SigningScheme signature.SigningScheme `json:"io.cncf.notary.signingScheme"`

// The time at which the signature was generated. only valid when signing scheme is `notary.x509`
Copy link
Contributor

Choose a reason for hiding this comment

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

same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's address them in other PRs.

// as defined at https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.6.
CertChain [][]byte `json:"x5c"`

// SigningAgent used for signing
Copy link
Contributor

Choose a reason for hiding this comment

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

same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's address them in other PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants