Skip to content

Commit bea3f29

Browse files
authored
chore(mpl;Rust): bump mpl to include rust input validation, aes-192 tests (#722)
1 parent 1c4d1c4 commit bea3f29

File tree

12 files changed

+103
-74
lines changed

12 files changed

+103
-74
lines changed

AwsEncryptionSDK/runtimes/rust/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ src/storm_tracker.rs
3030
src/time.rs
3131
src/types/
3232
src/uuid.rs
33+
src/validation.rs
3334
standard_library_conversions.rs
3435
standard_library_externs.rs
3536
target
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
11
# Changelog
22

3+
All notable changes to this project will be documented in this file.
4+
5+
## 0.2.0 (2024-12-18)
6+
7+
### Fixes
8+
- Support input validation
9+
10+
### Maintenance
11+
- Add version branch key example
12+
13+
## 0.1.0 (2024-12-09)
14+
15+
Initial launch of the AWS Encryption SDK for Rust.

AwsEncryptionSDK/runtimes/rust/Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "aws-esdk"
33
version = "0.1.0"
44
edition = "2021"
5-
rust-version = "1.80.0"
5+
rust-version = "1.81.0"
66
keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"]
77
license = "ISC AND (Apache-2.0 OR ISC)"
88
description = "aws-esdk is a library for implementing client side encryption."
@@ -16,14 +16,15 @@ readme = "README.md"
1616
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1717

1818
[dependencies]
19-
aws-config = "1.5.10"
20-
aws-lc-rs = "1.11.1"
21-
aws-lc-sys = "0.23.1"
19+
aws-config = "1.5.11"
20+
aws-lc-rs = "1.12.0"
21+
aws-lc-sys = "0.24.0"
2222
aws-sdk-dynamodb = "1.55.0"
2323
aws-sdk-kms = "1.51.0"
2424
aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] }
25-
aws-smithy-types = "1.2.9"
26-
chrono = "0.4.38"
25+
aws-smithy-types = "1.2.10"
26+
chrono = "0.4.39"
27+
cpu-time = "1.0.0"
2728
dafny-runtime = "0.1.1"
2829
dashmap = "6.1.0"
2930
pem = "3.0.4"

AwsEncryptionSDK/runtimes/rust/README.md

Lines changed: 12 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,25 @@
11
# AWS Encryption SDK for Rust
22

3-
AWS Encryption SDK for Rust
3+
[![build status](https://github.com/aws/aws-encryption-sdk-dafny/actions/workflows/daily_ci.yml/badge.svg?branch=mainline)](https://github.com/aws/aws-encryption-sdk-dafny/actions/workflows/daily_ci.yml)
4+
[![crates.io](https://img.shields.io/crates/v/aws-esdk.svg)](https://crates.io/crates/aws-esdk)
5+
[![docs](https://docs.rs/aws-esdk/badge.svg)](https://docs.rs/aws-esdk)
6+
[![rustc](https://img.shields.io/badge/rust-1.81%2B-orange.svg)](https://img.shields.io/badge/rust-1.81%2B-orange.svg)
47

5-
## Using the AWS Encryption SDK for Rust
8+
This is the official [AWS Encryption SDK for Rust](https://crates.io/crates/aws-esdk).
69

7-
The AWS Encryption SDK is available on [Crates.io](https://www.crates.io/).
10+
## [CHANGELOG](https://github.com/aws/aws-encryption-sdk-dafny/blob/mainline/AwsEncryptionSDK/runtimes/rust/CHANGELOG.md)
811

9-
For more details about the design and architecture of the AWS Encryption SDK, see the [AWS Encryption SDK Developer Guide](https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/introduction.html).
10-
11-
## Building the AWS Encryption SDK for Rust
12-
13-
To build, the AWS Encryption SDK requires the most up to date version of [Dafny](https://github.com/dafny-lang/dafny) on your PATH.
14-
15-
You will also need to ensure that you fetch all submodules using either `git clone --recursive ...` when cloning the repository or `git submodule update --init` on an existing clone.
16-
17-
To setup your project to use the AWS Encryption SDK in Rust, run:
18-
19-
```
20-
cd AwsEncryptionSDK
21-
# Polymorph smithy to Rust
22-
make polymorph_rust
23-
# Transpile Dafny to Rust
24-
make transpile_rust
25-
```
26-
27-
### (Optional) Set up the AWS Encryption SDK to work with AWS KMS
28-
29-
If you set up the AWS Encryption SDK to use the AWS KMS Keyring,
30-
the AWS Encryption SDK will make calls to AWS KMS on your behalf,
31-
using the appropriate AWS SDK.
12+
## Overview
3213

33-
However, you must first set up AWS credentials for use with the AWS SDK.
14+
The AWS Encryption SDK enables secure client-side encryption. It uses cryptography best practices to protect your data and protect the encryption keys that protect your data. Each data object is protected with a unique data encryption key, and the data encryption key is protected with a key encryption key called a wrapping key. The encryption method returns a single, portable [encrypted message](https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/message-format.html) that contains the encrypted data and the encrypted data key, so you don't need to keep track of the data encryption keys for your data. You can use KMS keys in [AWS Key Management Service](https://aws.amazon.com/kms/) (AWS KMS) as wrapping keys. The AWS Encryption SDK also provides APIs to define and use encryption keys from other key providers.
3415

35-
## Testing the AWS Encryption SDK for Rust
36-
37-
### Configure AWS credentials
38-
39-
To run the test suite you must first set up AWS credentials for use with the AWS SDK.
40-
This is required in order to run the integration tests, which use a KMS Keyring against a publicly accessible KMS CMK.
41-
42-
### Run the tests
43-
44-
Run the test suite with:
45-
46-
```
47-
cd AwsEncryptionSDK
48-
make test_rust
49-
```
50-
51-
Run tests on examples, to ensure they are up to date:
16+
For more details about the design and architecture of the AWS Encryption SDK, see the [AWS Encryption SDK Developer Guide](https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/introduction.html).
5217

53-
```
54-
cd AwsEncryptionSDK/runtimes/rust/
55-
cargo test --examples
56-
```
18+
## Examples for AWS Encryption SDK in Rust
5719

58-
Please look at the Examples on how to use the Encryption SDK in Rust [here](examples).
20+
Please look at the Examples on how to use the Encryption SDK in Rust [here](https://github.com/aws/aws-encryption-sdk-dafny/tree/mainline/AwsEncryptionSDK/runtimes/rust/examples).
5921

60-
Please note that tests and test vectors require internet access and valid AWS credentials, since calls to KMS are made as part of the test workflow.
22+
Please note that some examples MAY require internet access and valid AWS credentials, since calls to KMS are made.
6123

6224
## License
6325

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
## Building the AWS Encryption SDK for Rust from source
2+
3+
To build, the AWS Encryption SDK requires the most up to date version of [Dafny](https://github.com/dafny-lang/dafny) on your PATH.
4+
5+
You will also need to ensure that you fetch all submodules using either `git clone --recursive ...` when cloning the repository or `git submodule update --init` on an existing clone.
6+
7+
To setup your project to use the AWS Encryption SDK in Rust, run:
8+
9+
```
10+
cd AwsEncryptionSDK
11+
# Polymorph smithy to Rust
12+
make polymorph_rust
13+
# Transpile Dafny to Rust
14+
make transpile_rust
15+
```
16+
17+
### (Optional) Set up the AWS Encryption SDK to work with AWS KMS
18+
19+
If you set up the AWS Encryption SDK to use the AWS KMS Keyring,
20+
the AWS Encryption SDK will make calls to AWS KMS on your behalf,
21+
using the appropriate AWS SDK.
22+
23+
However, you must first set up AWS credentials for use with the AWS SDK.
24+
25+
## Testing the AWS Encryption SDK for Rust
26+
27+
### Configure AWS credentials
28+
29+
To run the test suite you must first set up AWS credentials for use with the AWS SDK.
30+
This is required in order to run the integration tests, which use a KMS Keyring against a publicly accessible KMS CMK.
31+
32+
### Run the tests
33+
34+
Run the test suite with:
35+
36+
```
37+
cd AwsEncryptionSDK
38+
make test_rust
39+
```
40+
41+
Run tests on examples, to ensure they are up to date:
42+
43+
```
44+
cd AwsEncryptionSDK/runtimes/rust/
45+
cargo test --examples
46+
```
47+
48+
Please note that tests and test vectors require internet access and valid AWS credentials, since calls to KMS are made as part of the test workflow.

AwsEncryptionSDK/runtimes/rust/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pub mod error;
1414
/// All operations that this crate can perform.
1515
pub mod operation;
1616
pub mod types;
17+
pub mod validation;
1718

1819
#[cfg(feature = "wrapped-client")]
1920
pub mod wrapped;

AwsEncryptionSDK/runtimes/rust/start_release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ cp -r . ../../../releases/rust/esdk
4040
cd ../../../releases/rust/esdk
4141

4242
# Remove unnecessary files and directories
43-
rm -rf *~ copy_externs.sh start_release.sh test_published.sh test_examples *.pem RELEASE.md CHANGELOG.md
43+
rm -rf *~ copy_externs.sh start_release.sh test_published.sh test_examples *.pem RELEASE.md CHANGELOG.md src/README.md
4444

4545
# Create .gitignore file with specified entries
4646
echo Cargo.lock > .gitignore

AwsEncryptionSDK/runtimes/rust/test_examples/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[package]
22
name = "aws-esdk-examples"
33
edition = "2021"
4-
rust-version = "1.80.0"
4+
rust-version = "1.81.0"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
aws-config = "1.5.10"
10-
aws-lc-rs = "1.11.1"
11-
aws-lc-sys = "0.23.1"
9+
aws-config = "1.5.11"
10+
aws-lc-rs = "1.12.0"
11+
aws-lc-sys = "0.24.0"
1212
aws-sdk-dynamodb = "1.55.0"
1313
aws-sdk-kms = "1.51.0"
1414
aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] }
15-
aws-smithy-types = "1.2.9"
16-
chrono = "0.4.38"
15+
aws-smithy-types = "1.2.10"
16+
chrono = "0.4.39"
1717
dafny-runtime = "0.1.1"
1818
dashmap = "6.1.0"
1919
pem = "3.0.4"

TestVectors/runtimes/rust/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ src/types/
3434
src/uuid.rs
3535
src/wrapped.rs
3636
src/wrapped/
37+
src/validation.rs
3738
target

TestVectors/runtimes/rust/Cargo.toml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "aws-esdk-test-vectors"
33
version = "0.1.0"
44
edition = "2021"
5-
rust-version = "1.80.0"
5+
rust-version = "1.81.0"
66
description = "aws-esdk-test-vectors is a library for testing aws-esdk."
77
authors = ["AWS-CryptoTools"]
88
autoexamples = false
@@ -14,20 +14,21 @@ readme = "README.md"
1414
wrapped-client = []
1515

1616
[dependencies]
17-
aws-config = "1.5.6"
18-
aws-lc-rs = "1.11.1"
19-
aws-lc-sys = "0.23.1"
20-
aws-sdk-dynamodb = "1.55.0"
21-
aws-sdk-kms = "1.51.0"
22-
aws-smithy-runtime-api = {version = "1.7.2", features = ["client"] }
23-
aws-smithy-types = "1.2.6"
24-
chrono = "0.4.38"
17+
aws-config = "1.5.11"
18+
aws-lc-rs = "1.12.0"
19+
aws-lc-sys = "0.24.0"
20+
aws-sdk-dynamodb = "1.56.0"
21+
aws-sdk-kms = "1.52.0"
22+
aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] }
23+
aws-smithy-types = "1.2.10"
24+
chrono = "0.4.39"
25+
cpu-time = "1.0.0"
2526
dafny-runtime = "0.1.1"
2627
dashmap = "6.1.0"
2728
pem = "3.0.4"
2829
rand = "0.8.5"
2930
tokio = {version = "1.42.0", features = ["full"] }
30-
uuid = { version = "1.10.0", features = ["v4"] }
31+
uuid = { version = "1.11.0", features = ["v4"] }
3132

3233
[dev-dependencies]
3334
aws-esdk-test-vectors = { path = ".", features = ["wrapped-client"] }

0 commit comments

Comments
 (0)