Skip to content

Fragment COSE Sign1 support.#1575

Merged
anmaxvl merged 1 commit intomicrosoft:mainfrom
SeanTAllen:ken/squashed-did
Jan 28, 2023
Merged

Fragment COSE Sign1 support.#1575
anmaxvl merged 1 commit intomicrosoft:mainfrom
SeanTAllen:ken/squashed-did

Conversation

@KenGordon
Copy link
Copy Markdown
Collaborator

Fragment COSE Sign1 support. Allows for a fragment presented by the host to be checked for a good cert chain and a valid issuer DID that matches the certs and so the signature. Includes DID and COSE Sign1 packages and tooling.

Signed-off-by: Ken Gordon [email protected]

@KenGordon KenGordon requested a review from a team as a code owner November 23, 2022 14:46
@KenGordon KenGordon mentioned this pull request Nov 23, 2022
Comment thread cmd/gcs/main.go Outdated
Comment thread internal/tools/sign1util/main.go Outdated
Comment thread internal/tools/sign1util/main.go
Comment thread internal/cosesign1/check.go Outdated
Comment thread internal/cosesign1/check.go Outdated
Comment thread internal/did-x509-resolver/resolver.go
Comment thread internal/guest/runtime/hcsv2/uvm.go Outdated
Comment thread internal/guest/runtime/hcsv2/uvm.go Outdated
Comment thread internal/guest/runtime/hcsv2/uvm.go Outdated
Comment thread internal/guest/runtime/hcsv2/uvm.go Outdated
@kevpar
Copy link
Copy Markdown
Member

kevpar commented Nov 30, 2022

The PR title is too long for one line. Can you please format it so the title is a short description, and the PR body has a more detailed description.

Comment thread internal/cosesign1/check.go
Comment thread internal/cosesign1/check.go
Comment thread internal/cosesign1/check.go Outdated
Comment thread internal/cosesign1/check.go Outdated
Comment thread internal/tools/sign1util/README.md Outdated
Comment thread internal/tools/sign1util/README.md Outdated
Comment thread internal/cosesign1/Makefile
Comment thread internal/cosesign1/cosesign1util_test.go
Comment thread internal/cosesign1/create.go Outdated
Copy link
Copy Markdown
Contributor

@anmaxvl anmaxvl left a comment

Choose a reason for hiding this comment

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

I haven't gotten to resolver yet... now that we figured out what's up with the kernel, I'd really suggest splitting either into multiple commits or PRs...

Comment thread internal/cosesign1/check.go
Comment thread internal/cosesign1/check.go Outdated
Comment thread internal/cosesign1/check.go Outdated
Comment thread internal/cosesign1/check.go Outdated
Comment thread internal/cosesign1/check.go
Comment thread internal/cosesign1/create.go Outdated
Comment thread internal/cosesign1/makedidx509.go Outdated
Comment thread internal/cosesign1/makedidx509.go Outdated
Comment thread internal/cosesign1/makedidx509.go
Comment thread internal/cosesign1/misc.go
@KenGordon KenGordon changed the title Fragment COSE Sign1 support. Allows for a fragment presented by the h… Fragment COSE Sign1 support. Dec 2, 2022
@KenGordon
Copy link
Copy Markdown
Collaborator Author

KenGordon commented Dec 5, 2022 via email

Comment thread internal/cosesign1/cosesign1util_test.go Outdated
Comment thread internal/tools/sign1util/main.go Outdated
Comment thread internal/cosesign1/check.go Outdated
Comment thread internal/cosesign1/cosesign1util_test.go
Comment thread internal/cosesign1/makedidx509.go Outdated
Comment thread internal/cosesign1/misc.go Outdated
Comment thread internal/cosesign1/check.go Outdated
Comment thread internal/did-x509-resolver/resolver.go
Comment thread internal/did-x509-resolver/resolver.go Outdated
Comment thread internal/did-x509-resolver/resolver.go
Comment thread internal/did-x509-resolver/resolver.go
Comment thread internal/guest/runtime/hcsv2/uvm.go
Comment thread internal/did-x509-resolver/resolver.go Outdated
Comment thread internal/did-x509-resolver/resolver.go Outdated
Comment thread internal/cosesign1/misc.go Outdated
Copy link
Copy Markdown
Contributor

@helsaawy helsaawy left a comment

Choose a reason for hiding this comment

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

Overall, LGTM
Feel free to ignore nits for a later PR

},
cli.StringFlag{
Name: "salt",
Usage: "salt type [rand|zero] (default: rand)",
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.

Nit: we should probably add error checking for the salt and policy flags in a future PR, to make sure the values provided are valid.

Comment thread internal/oci/uvm.go

When adding an option here which must match some security policy by default, make sure that the correct default (ie matches
a default security policy) is applied in handleSecurityPolicy. Inadvertantly adding an "option" which defaults to false but MUST be
true for a default security policy to work will force the annotation to have be set by the team that owns the box. That will
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.

nit: tab instead of space

Comment thread internal/guest/storage/scsi/scsi.go Outdated
to be checked for a good cert chain and a valid issuer DID that matches
the certs and so the signature. Includes DID and COSE Sign1 packages and
tooling.

Support extracting a DID directly from a COSE Sign1 document and also
support single cert COSE Sign document checking, but not DID generation.

`signutil` is a debug tool that allows generating valid DID given a
COSE Sign1 document and provides other utility functions like printing
cert chain, leaf certs, displaying COSE Sign1 document content etc.

Signed-off-by: Ken Gordon <[email protected]>
@anmaxvl anmaxvl merged commit fbcafad into microsoft:main Jan 28, 2023
@anmaxvl anmaxvl deleted the ken/squashed-did branch January 28, 2023 05:40
takuro-sato pushed a commit to takuro-sato/hcsshim that referenced this pull request Apr 25, 2023
…ost (microsoft#1575)

to be checked for a good cert chain and a valid issuer DID that matches
the certs and so the signature. Includes DID and COSE Sign1 packages and
tooling.

Support extracting a DID directly from a COSE Sign1 document and also
support single cert COSE Sign document checking, but not DID generation.

`signutil` is a debug tool that allows generating valid DID given a
COSE Sign1 document and provides other utility functions like printing
cert chain, leaf certs, displaying COSE Sign1 document content etc.

Signed-off-by: Ken Gordon <[email protected]>
takuro-sato pushed a commit to takuro-sato/hcsshim that referenced this pull request Apr 25, 2023
…ost (microsoft#1575)

to be checked for a good cert chain and a valid issuer DID that matches
the certs and so the signature. Includes DID and COSE Sign1 packages and
tooling.

Support extracting a DID directly from a COSE Sign1 document and also
support single cert COSE Sign document checking, but not DID generation.

`signutil` is a debug tool that allows generating valid DID given a
COSE Sign1 document and provides other utility functions like printing
cert chain, leaf certs, displaying COSE Sign1 document content etc.

Signed-off-by: Ken Gordon <[email protected]>
princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
…ost (microsoft#1575)

to be checked for a good cert chain and a valid issuer DID that matches
the certs and so the signature. Includes DID and COSE Sign1 packages and
tooling.

Support extracting a DID directly from a COSE Sign1 document and also
support single cert COSE Sign document checking, but not DID generation.

`signutil` is a debug tool that allows generating valid DID given a
COSE Sign1 document and provides other utility functions like printing
cert chain, leaf certs, displaying COSE Sign1 document content etc.

Signed-off-by: Ken Gordon <[email protected]>
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.

7 participants