Skip to content

Commit 73650c5

Browse files
authored
Merge pull request #83 from cipherstash/fix/allow-cts-config-from-env
Pass in `cts_config` to `ZeroKMSConfigBuilder` in `EncryptedTable::init_headless`
2 parents 0e432fa + 9014442 commit 73650c5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/encrypted_table/mod.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ use crate::{
1818
};
1919
use aws_sdk_dynamodb::types::{AttributeValue, Delete, Put, TransactWriteItem};
2020
use cipherstash_client::{
21-
config::{console_config::ConsoleConfig, zero_kms_config::ZeroKMSConfig},
21+
config::{
22+
console_config::ConsoleConfig, cts_config::CtsConfig, zero_kms_config::ZeroKMSConfig,
23+
},
2224
credentials::{
2325
auto_refresh::AutoRefresh,
2426
service_credentials::{ServiceCredentials, ServiceToken},
@@ -66,11 +68,16 @@ impl<D> EncryptedTable<D> {
6668
impl EncryptedTable<Headless> {
6769
pub async fn init_headless() -> Result<Self, InitError> {
6870
info!("Initializing...");
71+
6972
let console_config = ConsoleConfig::builder().with_env().build()?;
73+
74+
let cts_config = CtsConfig::builder().with_env().build()?;
75+
7076
let zero_kms_config = ZeroKMSConfig::builder()
7177
.decryption_log(true)
7278
.with_env()
7379
.console_config(&console_config)
80+
.cts_config(&cts_config)
7481
.build_with_client_key()?;
7582

7683
let zero_kms_client = ZeroKMS::new_with_client_key(

0 commit comments

Comments
 (0)