Skip to content

RFC7250 (RPK) support (Fixes #6929) - #18185

Closed
tmshort wants to merge 23 commits into
openssl:masterfrom
tmshort:master-rpk
Closed

tmshort wants to merge 23 commits into
openssl:masterfrom
tmshort:master-rpk

Conversation

@tmshort

@tmshort tmshort commented Apr 26, 2022

Copy link
Copy Markdown
Contributor

Add support for the RFC7250 extensions, allows the use of only private
keys for connection (i.e. certs not needed).

Fixes #6929
Replacement for #16620 (since github doesn't allow changing the source of a PR)

Add APIs
Add unit tests
Add documentation
Add s_client/s_server support

Checklist
  • documentation is added or updated
  • tests are added or updated

@tmshort tmshort added hold: need omc decision branch: master Applies to master branch approval: review pending This pull request needs review by a committer triaged: feature The issue/pr requests/adds a feature labels Apr 26, 2022
@openssl-machine

Copy link
Copy Markdown
Collaborator

This PR is in a state where it requires action by @openssl/omc but the last update was 30 days ago

@mattcaswell

Copy link
Copy Markdown
Member

OMC have voted to lift the OMC hold on this PR.

@openssl-machine

Copy link
Copy Markdown
Collaborator

This PR is in a state where it requires action by @openssl/otc but the last update was 30 days ago

@openssl-machine

Copy link
Copy Markdown
Collaborator

This PR is in a state where it requires action by @openssl/otc but the last update was 61 days ago

@github-actions github-actions Bot added the severity: fips change The pull request changes FIPS provider sources label Aug 18, 2022
@openssl-machine

Copy link
Copy Markdown
Collaborator

This PR is in a state where it requires action by @openssl/otc but the last update was 30 days ago

@tmshort
tmshort force-pushed the master-rpk branch 2 times, most recently from 3d6404b to 627a267 Compare October 12, 2022 18:35
@openssl-machine

Copy link
Copy Markdown
Collaborator

This PR is in a state where it requires action by @openssl/otc but the last update was 61 days ago

@tmshort
tmshort force-pushed the master-rpk branch 2 times, most recently from b81ba1e to 8e6bcdb Compare October 25, 2022 20:30
@tmshort

tmshort commented Oct 27, 2022

Copy link
Copy Markdown
Contributor Author

Had to reconcile with Certificate Compression. Since RPK is an explicit opt-in, certificate compression is opt-out, and RPKs are smaller than compressed certificates, RPKs are preferred over compressed certificates. In addition, RPKs will not be compressed (i.e. you won't find a RPK in a Compressed Certificate message).

@openssl-machine

Copy link
Copy Markdown
Collaborator

This PR is in a state where it requires action by @openssl/otc but the last update was 30 days ago

@tmshort

tmshort commented Dec 5, 2022

Copy link
Copy Markdown
Contributor Author

ping @openssl/committers ?

@vdukhovni

vdukhovni commented Dec 7, 2022

Copy link
Copy Markdown

The upper layer APis in this PR are heading down the wrong path and need to be reimplemented

We all already have a well established mechanism for verifying certificate chains by just their public KEY material. This is takes the form of DANE-EE(3) with a selector of SPKI(1). The mtype field can then be the full SPKI (DER) public key, or a SHA2-256 or SHA2-512 hash thereof. The caller can specify multiple acceptable keys by injecting multiple TLSA records into the SSL handle. See SSL_CTX_dane_enable(3) for details.

Note that the DANE support in OpenSSL does not perform any DNS lookups. The TLSA records configured for the SSL session can come from any source, including computed from explicit key material as in the DANE tests.

All the criticism aside, it is nice to see the low-level support implemented for raw public keys, this is a good time to hook it into the DANE layers of the library, improving both the RPK support and DANE.

@tmshort

tmshort commented Dec 7, 2022

Copy link
Copy Markdown
Contributor Author

Thanks @vdukhovni, I'm not familiar with DANE. Given that RPKs are just that, a single key, will using DANE work without a chain?

That being said, I'm a bit confused as to why DANE doesn't do DNS lookups, or how could handle keys that don't have any other identifying information.

DANE is mentioned as only one possible method of obtaining a public key for verification in RFC7250, but not the only method. It seems odd to me to have to configure DANE in order to use something as simple as raw public keys; the current APIs shouldn't preclude the use of DANE, but it also doesn't require the use of DANE. All references in RFC7250 mention acquiring a public key out-of-band (including DANE out-of-band). It's something I'll have to research.

@mattcaswell mattcaswell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved. Ping @vdukhovni to reconfirm your earlier approval

@vdukhovni vdukhovni left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I reviewed the changes, re-ran the tests, and also tested a Postfix+RPK build.
All good. Reconfirming approval.

@mattcaswell mattcaswell added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Mar 27, 2023
@openssl-machine openssl-machine added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Mar 28, 2023
@openssl-machine

Copy link
Copy Markdown
Collaborator

This pull request is ready to merge

openssl-machine pushed a commit that referenced this pull request Mar 28, 2023
Add support for the RFC7250 certificate-type extensions.
Alows the use of only private keys for connection (i.e. certs not needed).

Add APIs
Add unit tests
Add documentation
Add s_client/s_server support

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Viktor Dukhovni <[email protected]>
(Merged from #18185)
@tmshort

tmshort commented Mar 28, 2023

Copy link
Copy Markdown
Contributor Author

Merged to master. Thank you all for your efforts in getting this in!

@tmshort tmshort closed this Mar 28, 2023
@tmshort
tmshort deleted the master-rpk branch March 28, 2023 17:55
@mattcaswell

Copy link
Copy Markdown
Member

Thanks @tmshort for your work on this!

@vdukhovni

Copy link
Copy Markdown

Thanks @tmshort for your work on this!

Yes, very much appreciated, especially for being willing to adapt the design to benefit from and in turn enrich the existing DANE support.
Thanks also to @mattcaswell for the timely review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch triaged: feature The issue/pr requests/adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Raw Public Key (RFC 7250) support

8 participants