Skip to content

rust: Support client controlled signers#76

Merged
AkshatM merged 2 commits intocloudflare:mainfrom
eqtylab:feat/support-client-controlled-signing
Mar 6, 2026
Merged

rust: Support client controlled signers#76
AkshatM merged 2 commits intocloudflare:mainfrom
eqtylab:feat/support-client-controlled-signing

Conversation

@cameronfyfe
Copy link
Contributor

@cameronfyfe cameronfyfe commented Mar 6, 2026

closes #75

This PR adds a GenerateSignature trait so callers have the option of passing in their own signing logic. This enables the crate to be used with things like yubikeys, cloud kms, etc.

The public API is backwards compatible (&Vec<u8> can still be passed in) with just an argument name change from signing_key to signer to indicate other custom signer types can also be used now.

There are some clippy breakages to the public API since things like &[u8] are now also possible to pass in so clippy will want something like

generate_signature_headers_content(_, _, _, &my_u8_array.to_vec())

to simplify to

generate_signature_headers_content(_, _, _, &my_u8_array)

@cameronfyfe cameronfyfe changed the title Support client controlled signers rust: Support client controlled signers Mar 6, 2026
message: &mut impl UnsignedMessage,
expires: Duration,
algorithm: Algorithm,
signing_key: &Vec<u8>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is a great change! Looks good to me and is a great addition

@thibmeu thibmeu requested a review from AkshatM March 6, 2026 17:55
Copy link
Contributor

@AkshatM AkshatM left a comment

Choose a reason for hiding this comment

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

Looks good to me. Can you please update the version in Cargo.toml to 0.6.1? That'll trigger an automatic release on merge.

@cameronfyfe
Copy link
Contributor Author

Looks good to me. Can you please update the version in Cargo.toml to 0.6.1? That'll trigger an automatic release on merge.

Done

@AkshatM AkshatM merged commit 8a2bc3b into cloudflare:main Mar 6, 2026
3 checks passed
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.

rust: Add support for client-controlled signers

3 participants