Skip to content

Commit

Permalink
chore: add x-tenant-id in encryption service call (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
NishantJoshi00 authored Jan 7, 2025
1 parent 890c9e6 commit 46d0eef
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/crypto/keymanager/external_keymanager/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ use std::collections::HashSet;

use base64::Engine;
use hyper::header::{AUTHORIZATION, CONTENT_TYPE};
use masking::Maskable;
use masking::{Mask, Maskable};

use crate::storage::consts::X_TENANT_ID;
use crate::{app::TenantAppState, crypto::consts::BASE64_ENGINE};

pub fn get_key_manager_header(
Expand All @@ -20,7 +21,11 @@ pub fn get_key_manager_header(
(CONTENT_TYPE.to_string(), "application/json".into()),
(
AUTHORIZATION.to_string(),
format!("Basic {}", broken_master_key).into(),
format!("Basic {}", broken_master_key).into_masked(),
),
(
X_TENANT_ID.to_string(),
tenant_app_state.config.tenant_id.clone().into(),
),
]
.into_iter()
Expand Down

0 comments on commit 46d0eef

Please sign in to comment.