Skip to content

Commit a5282af

Browse files
authored
chore(rust): release 0.2.0 (#726)
1 parent d03ab27 commit a5282af

File tree

132 files changed

+9066
-1177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+9066
-1177
lines changed

AwsEncryptionSDK/runtimes/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aws-esdk"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
55
rust-version = "1.81.0"
66
keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"]

AwsEncryptionSDK/runtimes/rust/start_release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ perl -pe "s/^version = .*$/version = \"$1\"/" < Cargo.toml > new_Cargo.toml
2222
mv new_Cargo.toml Cargo.toml
2323

2424
# Remove all files and directories in src except for specified files
25-
find src -depth 1 | egrep -v '(lib.rs)' | xargs rm -rf
25+
find src -depth 1 | egrep -v '(lib.rs|README.md)' | xargs rm -rf
2626

2727
# Change to the parent directory and run make polymorph and transpile commands
2828
cd ../..

mpl

Submodule mpl updated from 23650a9 to 5997919

releases/rust/esdk/Cargo.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "aws-esdk"
3-
version = "0.1.0"
3+
version = "0.2.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"

releases/rust/esdk/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/releases/rust/esdk/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

releases/rust/esdk/examples/client_supplier/client_supplier_example.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
use super::regional_role_client_supplier::RegionalRoleClientSupplier;
1919
use aws_esdk::client as esdk_client;
2020
use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig;
21-
use aws_esdk::aws_cryptography_materialProviders::types::error::Error::AwsCryptographicMaterialProvidersException;
22-
use aws_esdk::aws_cryptography_materialProviders::client as mpl_client;
23-
use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig;
24-
use aws_esdk::aws_cryptography_materialProviders::types::DiscoveryFilter;
21+
use aws_esdk::material_providers::types::error::Error::AwsCryptographicMaterialProvidersException;
22+
use aws_esdk::material_providers::client as mpl_client;
23+
use aws_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig;
24+
use aws_esdk::material_providers::types::DiscoveryFilter;
2525
use std::collections::HashMap;
2626

2727
pub async fn encrypt_and_decrypt_with_keyring(

releases/rust/esdk/examples/client_supplier/regional_role_client_supplier.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use aws_config::Region;
5-
use aws_esdk::aws_cryptography_materialProviders::types::ClientSupplier;
6-
use aws_esdk::aws_cryptography_materialProviders::operation::get_client::GetClientInput;
7-
use aws_esdk::aws_cryptography_materialProviders::types::error::Error;
5+
use aws_esdk::material_providers::types::ClientSupplier;
6+
use aws_esdk::material_providers::operation::get_client::GetClientInput;
7+
use aws_esdk::material_providers::types::error::Error;
88
use aws_esdk::com_amazonaws_kms::client::Client as kms_client;
99
use super::regional_role_client_supplier_config;
1010

releases/rust/esdk/examples/cryptographic_materials_manager/required_encryption_context/required_encryption_context_example.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ On decrypt, the client MUST supply the key/value pair(s) that were not stored to
1010

1111
use aws_esdk::client as esdk_client;
1212
use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig;
13-
use aws_esdk::aws_cryptography_materialProviders::client as mpl_client;
14-
use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig;
13+
use aws_esdk::material_providers::client as mpl_client;
14+
use aws_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig;
1515
use aws_esdk::types::error::Error::AwsCryptographicMaterialProvidersError;
1616
use std::collections::HashMap;
1717
use std::vec::Vec;

releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/signing_only_example.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ use super::signing_suite_only_cmm::SigningSuiteOnlyCMM;
1010
use aws_esdk::client as esdk_client;
1111
use aws_esdk::types::aws_encryption_sdk_config::AwsEncryptionSdkConfig;
1212
use aws_esdk::types::error::Error::AwsCryptographicMaterialProvidersError;
13-
use aws_esdk::aws_cryptography_materialProviders::client as mpl_client;
14-
use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig;
15-
use aws_esdk::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef;
16-
use aws_esdk::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId;
13+
use aws_esdk::material_providers::client as mpl_client;
14+
use aws_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig;
15+
use aws_esdk::material_providers::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef;
16+
use aws_esdk::material_providers::types::EsdkAlgorithmSuiteId;
1717
use std::collections::HashMap;
1818

1919
pub async fn encrypt_and_decrypt_with_cmm(

releases/rust/esdk/examples/cryptographic_materials_manager/restrict_algorithm_suite/signing_suite_only_cmm.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use aws_esdk::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsInput;
5-
use aws_esdk::aws_cryptography_materialProviders::operation::get_encryption_materials::GetEncryptionMaterialsOutput;
6-
use aws_esdk::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsInput;
7-
use aws_esdk::aws_cryptography_materialProviders::operation::decrypt_materials::DecryptMaterialsOutput;
8-
use aws_esdk::aws_cryptography_materialProviders::types::error::Error;
9-
use aws_esdk::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManager;
10-
use aws_esdk::aws_cryptography_materialProviders::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef;
11-
use aws_esdk::aws_cryptography_materialProviders::types::keyring::KeyringRef;
12-
use aws_esdk::aws_cryptography_materialProviders::types::EsdkAlgorithmSuiteId;
13-
use aws_esdk::aws_cryptography_materialProviders::types::AlgorithmSuiteId;
14-
use aws_esdk::aws_cryptography_materialProviders::client as mpl_client;
15-
use aws_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig;
4+
use aws_esdk::material_providers::operation::get_encryption_materials::GetEncryptionMaterialsInput;
5+
use aws_esdk::material_providers::operation::get_encryption_materials::GetEncryptionMaterialsOutput;
6+
use aws_esdk::material_providers::operation::decrypt_materials::DecryptMaterialsInput;
7+
use aws_esdk::material_providers::operation::decrypt_materials::DecryptMaterialsOutput;
8+
use aws_esdk::material_providers::types::error::Error;
9+
use aws_esdk::material_providers::types::cryptographic_materials_manager::CryptographicMaterialsManager;
10+
use aws_esdk::material_providers::types::cryptographic_materials_manager::CryptographicMaterialsManagerRef;
11+
use aws_esdk::material_providers::types::keyring::KeyringRef;
12+
use aws_esdk::material_providers::types::EsdkAlgorithmSuiteId;
13+
use aws_esdk::material_providers::types::AlgorithmSuiteId;
14+
use aws_esdk::material_providers::client as mpl_client;
15+
use aws_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig;
1616
use std::vec::Vec;
1717

1818
/*

0 commit comments

Comments
 (0)