aws / aws/aws-sdk-cpp

STS does not respect ca cert setting

Offen
#2,920 5 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug p2
Vorherrschende Sprache
C++
Sterne
2.2k
Forks
1.2k
Ø Merge
4 T. 11 Std.
Gemergte PRs (30 T.)
13

Beschreibung

### 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie bei src/aws-cpp-sdk-core/source/auth/STSCredentialsProvider.cpp ungefähr in Zeile 110 und vergleichen Sie den STS-Authentifizierungspfad mit den in der verlinkten Dokumentation beschriebenen Einstellungen caPath und caFile von ClientConfiguration. Reproduzieren Sie das Verhalten mit dem bereitgestellten S3-Beispiel und überprüfen Sie, dass die STS-Authentifizierung die konfigurierten CA-Einstellungen berücksichtigt und die daraus resultierende Speicheranforderung das erwartete Ergebnis hat.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, cpp
Bereich
authentication, security
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
38/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.