Skip to content

Commit 421192f

Browse files
committed
fix: Disallow WIF Impersonation support for AWS and Azure
1 parent 6aff24d commit 421192f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

cpp/AwsAttestation.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ namespace Snowflake {
2222
};
2323

2424
boost::optional<Attestation> createAwsAttestation(const AttestationConfig& config) {
25+
if (config.workloadIdentityImpersonationPath &&
26+
!config.workloadIdentityImpersonationPath.get().empty()) {
27+
CXX_LOG_ERROR("Workload identity impersonation is not supported for AWS");
28+
return boost::none;
29+
}
30+
2531
auto awsSdkInit = AwsUtils::initAwsSdk();
2632
auto creds = config.awsSdkWrapper->getCredentials();
2733
if (creds.IsEmpty()) {

cpp/AzureAttestation.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ namespace {
1313
namespace Snowflake {
1414
namespace Client {
1515
boost::optional<Attestation> createAzureAttestation(AttestationConfig& config) {
16+
if (config.workloadIdentityImpersonationPath &&
17+
!config.workloadIdentityImpersonationPath.get().empty()) {
18+
CXX_LOG_ERROR("Workload identity impersonation is not supported for Azure");
19+
return boost::none;
20+
}
21+
1622
auto azureConfigOpt = AzureAttestationConfig::fromConfig(config);
1723
if (!azureConfigOpt) {
1824
return boost::none;

0 commit comments

Comments
 (0)