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

Forwarding the rustls provider settings #515

Open
LecrisUT opened this issue Sep 16, 2024 · 1 comment · May be fixed by #516
Open

Forwarding the rustls provider settings #515

LecrisUT opened this issue Sep 16, 2024 · 1 comment · May be fixed by #516
Labels
C-exporter Component: exporters such as Prometheus, TCP, etc. E-intermediate Effort: intermediate. T-ergonomics Type: ergonomics.

Comments

@LecrisUT
Copy link

A nice reference for this is axum-server

tls-rustls = ["tls-rustls-no-provider", "rustls/aws-lc-rs"]
tls-rustls-no-provider = [...]

Such a design would make it easy for downstream to select the appropriate provider they need. Regarding hyper-rustls where this package is inheriting, I've opened an equivalent issue for a similar design, but even in their current form this can be configured with:

default = ["http-listener", "push-gateway", "_hyper-rustls-aws-lc-rs"]
_hyper-client = [
    "http-body-util",
    "hyper/client",
    "hyper-util/client",
    "hyper-util/http1",
    "hyper-util/client-legacy",
    "_hyper-rustls-no-provider",
]
_hyper-rustls-aws-lc-rs = ["hyper-rustls/aws-lc-rs"]
_hyper-rustls-no-provider = ["hyper-rustls/native-tokio", "hyper-rustls/http1", "hyper-rustls/tls12", "hyper-rustls/logging"]

As long as it is easy to detach the aws-lc-rs from the top-most default, that would help with forwarding this option through the dependency chain

@LecrisUT LecrisUT linked a pull request Sep 17, 2024 that will close this issue
@tobz tobz added C-exporter Component: exporters such as Prometheus, TCP, etc. E-intermediate Effort: intermediate. T-ergonomics Type: ergonomics. labels Sep 21, 2024
@tobz
Copy link
Member

tobz commented Sep 21, 2024

Hey there! 👋🏻

I too am familiar with the pain of picking between different crypto provider backends in rustls all too well... 😅 I think your current PR (#516) is fine as an intermediate step, which I'll review/approve/merge shortly.

If you were interested in also trying to do something as you've described above, I'd be supportive of a PR going in that direction. 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-exporter Component: exporters such as Prometheus, TCP, etc. E-intermediate Effort: intermediate. T-ergonomics Type: ergonomics.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants