Skip to content

Proposal #129: Dual TLS certification and crypto agility#130

Open
ansasaki wants to merge 1 commit into
keylime:masterfrom
ansasaki:dual-certification
Open

Proposal #129: Dual TLS certification and crypto agility#130
ansasaki wants to merge 1 commit into
keylime:masterfrom
ansasaki:dual-certification

Conversation

@ansasaki

Copy link
Copy Markdown
Contributor

This adds the proposal to add dual TLS certification and crypto agility support to all servers (verifier, registrar, and pull agent).

@coderabbitai

coderabbitai Bot commented Mar 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • 129_dual-certification-crypto-agility.md is excluded by !**/*.md

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 475d471e-ca37-4214-a1d1-58760d352306

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread 129_dual-certification-crypto-agility.md Outdated

@sergio-correia sergio-correia 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.

Good proposal. I pointed out a few design gaps to address, mostly around the tenant's role in forwarding the secondary agent cert and the trust model for that cert relative to the TPM identity chain.

Comment thread 129_dual-certification-crypto-agility.md Outdated
Comment thread 129_dual-certification-crypto-agility.md
Comment thread 129_dual-certification-crypto-agility.md
Comment thread 129_dual-certification-crypto-agility.md Outdated
Comment on lines +401 to +414
1. Extend the agent's TLS context to accept multiple certificate/key pairs.
Use `set_certificate()`/`set_private_key()` for the first pair and
`add_certificate()`/`add_private_key()` for subsequent pairs:
```rust
ssl_context_builder.set_certificate(&tls_certs[0])?;
ssl_context_builder.set_private_key(&keys[0])?;
for (cert, key) in tls_certs[1..].iter().zip(keys[1..].iter()) {
ssl_context_builder.add_certificate(cert)?;
ssl_context_builder.add_private_key(key)?;
}
```
If the `openssl` crate does not expose `add_certificate()` on
`SslAcceptorBuilder`, use lower-level `SslContextBuilder` methods which
map directly to OpenSSL's `SSL_CTX_use_certificate()` C API.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If I'm not mistaken, the Rust openssl crate does not have an add_certificate() or add_private_key() method on SslContextBuilder or SslAcceptorBuilder. The fallback you describe on lines 412-414 is essentially the right approach though, just using set_certificate() / set_private_key() instead:

for (cert, key) in tls_certs.iter().zip(keys.iter()) {
    ssl_context_builder.set_certificate(cert)?;
    ssl_context_builder.set_private_key(key)?;
}

Despite the set_ naming, OpenSSL internally indexes by key type, so each call with a different key type populates a new slot rather than overwriting. Have you had a chance to prototype this?

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.

Yes, I have a PoC here https://github.com/ansasaki/dual-cert

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.

I updated the example code snippet

@ansasaki ansasaki mentioned this pull request May 26, 2026
33 tasks
@ansasaki ansasaki force-pushed the dual-certification branch from f7c4e73 to 4abdb22 Compare May 26, 2026 19:56
This adds the proposal to add dual TLS certification and crypto agility
support to all servers (verifier, registrar, and pull agent).

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
@ansasaki ansasaki force-pushed the dual-certification branch from 4abdb22 to 064c42b Compare May 26, 2026 19:57
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.

3 participants