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

Remote Signing #51

Merged
merged 2 commits into from Apr 21, 2022
Merged

Remote Signing #51

merged 2 commits into from Apr 21, 2022

Conversation

shizhMSFT
Copy link
Contributor

@shizhMSFT shizhMSFT requested review from SteveLasker, thomas-fossati and a team and removed request for SteveLasker and thomas-fossati April 20, 2022 11:20
@shizhMSFT
Copy link
Contributor Author

shizhMSFT commented Apr 20, 2022

@thomas-fossati The DCO check fails on 5 commits with error message:

Author: Quim Muntal, Committer: GitHub; Expected "Quim Muntal quimmuntal@gmail.com", but got "qmuntal qmuntaldiaz@microsoft.com".

How can we resolve it? or should we just set DCO to pass?

/cc @qmuntal

@shizhMSFT shizhMSFT added this to the v1-alpha.1 milestone Apr 20, 2022
@SteveLasker
Copy link
Contributor

unfortunately, bypassing dco bypasses the licensing and introduces the potential for ownership of the code.
Can you resolve in the branch and resubmit?

Co-authored-by: qmuntal <qmuntaldiaz@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
@shizhMSFT
Copy link
Contributor Author

Squashed commits with DCO fixed.

@thomas-fossati
Copy link
Contributor

LGTM, thanks all for the incredible work.

Should we explicitly tag main before merging? (I think Steve suggested this some time ago.)

@SteveLasker
Copy link
Contributor

awesome work!
Yeah, let’s tag main into a branch.
Naming is hard. @thomas-fossati, what tag/branch name would be meaningful for you? If we look 6 months from now, what name would make sense?

@thomas-fossati
Copy link
Contributor

thomas-fossati commented Apr 20, 2022

Naming is hard. @thomas-fossati, what tag/branch name would be meaningful for you? If we look 6 months from now, what name would make sense?

I'm after something that evokes legacy / impending deprecation.
Any suggestions? :-)

DESIGN.md Outdated

Here are the gaps between the current implementation and the objectives:

- The current implementation implements `COSE_Sign` and `COSE_Sign1`. However, the verification process does not follow [RFC8152](https://datatracker.ietf.org/doc/html/rfc8152) and causes [issue #7](https://github.com/veraison/go-cose/issues/7). There are also implementation errors in signing and verification (see [issue #8](https://github.com/veraison/go-cose/issues/8)).
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the tense of the sentence should now reflect past tense with the implementation, example like earlier implementation. It should also say, had caused issues like #7 and #8 which is been fixed in the current implementation.

Copy link
Contributor

Choose a reason for hiding this comment

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

@shizhMSFT, can you make this minor wording change?
Suggested change:

Prior versions of go-cose implemented COSE_Sign and COSE_Sign1. However, the verification process did not follow RFC8152 which had caused issues like #7 and #8 which have been fixed in the current implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated in 6ef3dd4

DESIGN.md Outdated
- All conventional signature schemes are _signature with appendix_.
- `RS256`, `RS384`, `RS512`, `ES256K` are marked **NOT RECOMMENDED** by [RFC8812](https://datatracker.ietf.org/doc/html/rfc8812).
- The current implementation has solid `Signer` and `Verify` structures and can only sign or verify against certain algorithms (see [issue #9](https://github.com/veraison/go-cose/issues/9)). The implementation cannot be extended to have new algorithms or new implementation for existing algorithms.
- The current implementation is not golang native.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is Line 28 referring to veraison/go-cose or some other repo? when it refers to golang nativity ?

As far as I reckon that was with older notary implementation ? If so needs to be specified clearly.

Copy link
Contributor

Choose a reason for hiding this comment

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

@shizhMSFT, what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated in 6ef3dd4

@SteveLasker
Copy link
Contributor

Agreed on the fork info atop. We can update the readme a bit later when we’ve decoupled. For now, just getting the code merged is a great start so we can start the dependencies and flush out the next round of issues

@yogeshbdeshpande
Copy link
Contributor

anch name would be meaningful for

I suggest a simple strategy, example(Feel free to shoot it down):
go-cose-v.1.0.0

and then when Notary major release comes go-cose-v.2.0.0
2.0.1 for notary patches and 2.1.1 for notary enhancements?

@qmuntal
Copy link
Contributor

qmuntal commented Apr 20, 2022

anch name would be meaningful for

I suggest a simple strategy, example(Feel free to shoot it down): go-cose-v.1.0.0

and then when Notary major release comes go-cose-v.2.0.0 2.0.1 for notary patches and 2.1.1 for notary enhancements?

Module tags should strictly follow semantic versioning with v prefix, else Go toolchain won't like our releases. This is what I would do:

  • Tag main as-is now with v0.1.0.
  • Merge this PR and create a new tag named v0.2.0.
  • Once we pass all security reviews and we are confident we have a stable API, we can aim for the v1.0.0.

@yogeshbdeshpande
Copy link
Contributor

anch name would be meaningful for

I suggest a simple strategy, example(Feel free to shoot it down): go-cose-v.1.0.0
and then when Notary major release comes go-cose-v.2.0.0 2.0.1 for notary patches and 2.1.1 for notary enhancements?

Module tags should strictly follow semantic versioning with v prefix, else Go toolchain won't like our releases. This is what I would do:

  • Tag main as-is now with v0.1.0.
  • Merge this PR and create a new tag named v0.2.0.
  • Once we pass all security reviews and we are confident we have a stable API, we can aim for the v1.0.0.

Works for me!

@shizhMSFT
Copy link
Contributor Author

Golang projects follows SemVer2.

Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards compatible manner, and
  3. PATCH version when you make backwards compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

The previous go-cose implementation is not SemVer2 versioned. To golang, it is still at v0.0.0. Then we can start with v1.0.0.

If the previous implementation is required to be v1.0.0, then we can have this implementation as v2.0.0. However, if we do want v2.0.0, we need to update the go.mod file to github.com/veraison/go-cose/v2. Meanwhile, we have to fix all vulnerabilities in v1.0.0 or deprecate v1.0.0 immediately after tagging it for security concerns.

@SteveLasker
Copy link
Contributor

SteveLasker commented Apr 20, 2022

what about v0.0.0-sign1 , with comments that this is NOT a supported release with 1.0 as the supported codebase

@qmuntal
Copy link
Contributor

qmuntal commented Apr 20, 2022

what about v0.0.0-sign1 , with comments that this is NOT a supported release with 1.0 as the supported codebase

Like it and +1 one what @shizhMSFT said. I would just not start with the v1.0.0 but with v0.1.0 so we can still iterate on the API a few weeks more without breaking any compatibility promise.

@SteveLasker
Copy link
Contributor

I've created tag v0.0.0-sign1-alpha.0 and created the branch v0.0.0-sign1-alpha.0

I've also updated issue #37 to reflect the steps

@shizhMSFT, if you could make the minor changes noted above

I believe we're ready to merge

Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Copy link
Contributor

@thomas-fossati thomas-fossati left a comment

Choose a reason for hiding this comment

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

🚢 it!

@yogeshbdeshpande
Copy link
Contributor

Great Job Shiwei! Thank you for all the Hard Work.

Copy link
Contributor

@SteveLasker SteveLasker left a comment

Choose a reason for hiding this comment

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

LGTM

@SteveLasker SteveLasker merged commit 52f40e3 into main Apr 21, 2022
@SteveLasker SteveLasker deleted the remote-signing branch April 21, 2022 12:47
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.

Merge Remote Signing Branch into Main
5 participants