aws / aws-sdk-php

Official repository of the AWS SDK for PHP (@awsforphp)
http://aws.amazon.com/sdkforphp
Apache License 2.0
6.04k stars 1.23k forks source link

feat: multi-auth #2891

Closed stobrien89 closed 6 months ago

stobrien89 commented 9 months ago

Description of changes:

Adds support for the service and operation-level auth trait, which allows a service to model multiple signature versions. When modeled, this trait will contain a non-empty priority-ordered list of signature versions to select from. Selection is dependent on a few different factors: e.g. v4a signatures require installation of the crt extension; bearer signatures require that you are using bearer token credentials. Selection will be performed on a per-request basis, with the operation-level modeled auth taking precedence over the service level modeled auth.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

stobrien89 commented 7 months ago

Integration and smoke test suites have been run and are passing.

rubas commented 5 months ago

🚨 This breaks Aws\SecretsManager\SecretsManagerClient.

$client = new SecretsManagerClient([
      'credentials' => new Credentials(),
      'region'      => 'eu-central-1',
    ]);

$client->getSecretValue(['SecretId' => $name]);

---

Aws\Auth\Exception\UnresolvedAuthSchemeException  in AuthSchemeResolver.php on line 83:

Could not resolve an authentication scheme: Signature V4 requires AWS credentials for request signing