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

aws_smithy_experimental: support no TLS and custom TLS providers #1221

Open
1 of 2 tasks
howardjohn opened this issue Dec 16, 2024 · 2 comments
Open
1 of 2 tasks

aws_smithy_experimental: support no TLS and custom TLS providers #1221

howardjohn opened this issue Dec 16, 2024 · 2 comments
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue

Comments

@howardjohn
Copy link

Describe the feature

aws_smithy_experimental currently requires you to specify a CryptoMode - Ring, AwsLc, or AwsLcFips.

Internally this gets translated into an

#[derive(Clone)]
enum Inner {
    Standard(CryptoMode),
    #[allow(dead_code)]
    Custom(CryptoProvider),
}

The following are needed:

  1. The ability to run with no crypto at all, for use cases where calls are made to only HTTP endpoints (IMDS, etc)
  2. The ability to directly pass a custom crypto provider

Use Case

  1. I have use cases that need a specific crypto provider for compliance
  2. I have use cases where I know I will never do TLS and want to ensure that is the case.

Proposed Solution

  1. Add CryptoMode::Custom
  2. Add CryptoMode::None

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

A note for the community

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue, please leave a comment
@howardjohn howardjohn added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 16, 2024
@aajtodd
Copy link
Contributor

aajtodd commented Dec 20, 2024

Thanks for the request.

The purpose of the HTTP abstractions in smithy runtime is to serve as a suitable default that should work well for most use cases out of the box. It is not meant to handle every possible use case or customization.

I have use cases that need a specific crypto provider for compliance

One of the issues we have with this is how to expose it in a backwards compatible way. We can't really without exposing unstable 3P crates. We also aren't sure we want to given the point above. You're likely better off just wrapping your own HTTP client (which is what we will be recommending going forward for use cases that go beyond the level of customization/configuration that most users require).

I have use cases where I know I will never do TLS and want to ensure that is the case.

The client can still be used with HTTP endpoints (that's how IMDS and ECS credential providers work today). We are not inclined to add less secure defaults.

@aajtodd aajtodd added response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Dec 20, 2024
@howardjohn
Copy link
Author

We can't really without exposing unstable 3P crates.

I wouldn't expect that and its not needed. Rustls already has a standardized interface to plugin in arbitrary providers (https://docs.rs/rustls/latest/rustls/crypto/struct.CryptoProvider.html). The interface to use this is already in the code, just in private enums (Inner).

You're likely better off just wrapping your own HTTP client

This would be an option but the interface required to implement this is massive -- the hyper 1.0 implementation in-tree is >1000 LOC. At that point we might as well just implement our own library entirely and drop aws-sdk-rust (which we are considering anyways due to binary size issues).

We are not inclined to add less secure defaults.

I am not looking for a default or something less secure -- only the ability to not depend on ring or aws_lc. its fine if it panics or otherwise restricts access to TLS endpoints.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

2 participants