aws / aws/aws-sdk-cpp

STS does not respect ca cert setting

Open
#2,920 5 comments 3 reactions 0 assignees View on GitHub
bug p2
Dominant language
C++
Stars
2.2k
Forks
1.2k
Avg merge
3d 14h
Merged PRs (30d)
12

Description

### Describe the bug

https://github.com/aws/aws-sdk-cpp/blob/e9d0d247be909ade39f213a3e2915aa262755a78/src/aws-cpp-sdk-core/source/auth/STSCredentialsProvider.cpp#L110

The SDK Client Configuration allows user to set [caPath and caFIle](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/client-config.html) but STS authentication doesn't use/respect the setting

### Expected Behavior

All authentication respects caPath and caFile setting.

### Current Behavior

The SDK Client Configuration allows user to set [caPath and caFIle](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/client-config.html) but STS authentication doesn't use/respect the setting

### Reproduction Steps
In the below code, `caFile` is pointed to wrong ca file. Yet STS auth should still be able to return a valid token yet the connection to the storage should fail.
```
Aws::Client::ClientConfiguration config;
config.caFile = "WRONG_CA_FILE";
Aws::S3::S3Client s3_client(config, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy::Never, false);
Aws::S3::Model::ListObjectsV2Request objects_request;
objects_request.WithBucket("abc");
auto list_objects_outcome = s3_client.ListObjectsV2(objects_request);
```

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### AWS CPP SDK version used

1.11.201

### Compiler and Version used

gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

### Operating System and version

Ubuntu 22.04

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.