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

Choose client cert dynamically #91

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

plv
Copy link

@plv plv commented Aug 4, 2024

Description

N.B.: This PR is based on top of #90

This PR exists a way to use rustls's ConfigBuilder::with_client_cert_resolver for client auth. This allows us to do two things:

  1. Dynamically choose a client cert + private key
  2. Issue signatures without direct access to private key pem

Reason 2 is personally why I implemented this. We generate our keypairs inside AWS KMS which does not allow for retrieving the private key -- we can only call into AWS KMS to perform a sign()

Resolves # (issue) N/A

How Has This Been Tested?

I've pulled my fork into our own internal codebase and tested this by integrating it into our own push notification flow. Got push notifications successfully sending to my device!

* Writing a unit test is fairly difficult here, so please let me know if you'd like me to add to examples/certificate_client.rs

Due Dilligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@plv plv requested a review from geekbrother as a code owner August 4, 2024 19:54
@plv plv changed the title Client cert resolver merge Choose client cert dynamically Aug 4, 2024
@plv plv mentioned this pull request Aug 4, 2024
3 tasks
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.

1 participant