Skip to content

Expose jsonwebtoken crypto backend as a feature#108

Merged
slinkydeveloper merged 4 commits into
restatedev:mainfrom
jackkleeman:jsonwebtoken-backend-passthrough
Apr 28, 2026
Merged

Expose jsonwebtoken crypto backend as a feature#108
slinkydeveloper merged 4 commits into
restatedev:mainfrom
jackkleeman:jsonwebtoken-backend-passthrough

Conversation

@jackkleeman

Copy link
Copy Markdown
Contributor

restate-sdk-shared-core's request_identity feature currently bakes in jsonwebtoken's rust_crypto backend. If a consuming workspace has jsonwebtoken with aws_lc_rs enabled elsewhere in its graph, Cargo feature unification turns both on and jsonwebtoken's provider auto-detection panics at first use. Setting default-features = false on restate-sdk doesn't help today because request_identity is in the unconditional feature list on the shared-core dependency.

This adds rust_crypto and aws_lc_rs pass-through features (the same pattern rustls / tokio-rustls use) and puts rust_crypto in the default set so out-of-the-box behaviour is unchanged. Consumers that need aws_lc_rs can now do:

restate-sdk = { version = "...", default-features = false, features = ["http_server", "aws_lc_rs"] }

or enable neither and call jsonwebtoken::crypto::CryptoProvider::install_default() themselves.

Depends on restatedev/sdk-shared-core#76. The [patch.crates-io] entry pointing at that branch is temporary so CI can build — it must be replaced with a version bump on the restate-sdk-shared-core dependency before this merges.

restate-sdk-shared-core's request_identity feature previously baked in
jsonwebtoken's rust_crypto backend. If a consuming workspace also has
jsonwebtoken with aws_lc_rs enabled elsewhere in its graph, Cargo
feature unification turns both on and jsonwebtoken's provider
auto-detection panics at first use. default-features = false on
restate-sdk did not help because request_identity is in the
unconditional feature list on the shared-core dependency.

This adds rust_crypto and aws_lc_rs pass-through features (mirroring
the rustls / tokio-rustls pattern) and puts rust_crypto in the default
set so the out-of-the-box behaviour is unchanged. Consumers that need
aws_lc_rs can now do:

    restate-sdk = { default-features = false, features = ["http_server", "aws_lc_rs"] }

Depends on the corresponding shared-core change; the [patch.crates-io]
entry is temporary and must be replaced with a version bump before
merge.
@slinkydeveloper slinkydeveloper marked this pull request as ready for review April 27, 2026 17:39

@slinkydeveloper slinkydeveloper left a comment

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.

lgtm, will merge later after releasing the shared core. as usual, gh outages are timely

@slinkydeveloper slinkydeveloper merged commit 2f28a47 into restatedev:main Apr 28, 2026
3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants