Merge pull request #25451 from nextcloud/backport/24700/stable21
[stable21] Resolves #24699, Support ES2 and ECS instance providers for S3 buckets
This commit is contained in:
commit
f24ce39733
|
@ -32,6 +32,7 @@ namespace OC\Files\ObjectStore;
|
||||||
|
|
||||||
use Aws\ClientResolver;
|
use Aws\ClientResolver;
|
||||||
use Aws\Credentials\CredentialProvider;
|
use Aws\Credentials\CredentialProvider;
|
||||||
|
use Aws\Credentials\EcsCredentialProvider;
|
||||||
use Aws\Credentials\Credentials;
|
use Aws\Credentials\Credentials;
|
||||||
use Aws\Exception\CredentialsException;
|
use Aws\Exception\CredentialsException;
|
||||||
use Aws\S3\Exception\S3Exception;
|
use Aws\S3\Exception\S3Exception;
|
||||||
|
@ -105,7 +106,10 @@ trait S3ConnectionTrait {
|
||||||
CredentialProvider::chain(
|
CredentialProvider::chain(
|
||||||
$this->paramCredentialProvider(),
|
$this->paramCredentialProvider(),
|
||||||
CredentialProvider::env(),
|
CredentialProvider::env(),
|
||||||
CredentialProvider::instanceProfile()
|
CredentialProvider::assumeRoleWithWebIdentityCredentialProvider(),
|
||||||
|
!empty(getenv(EcsCredentialProvider::ENV_URI))
|
||||||
|
? CredentialProvider::ecsCredentials()
|
||||||
|
: CredentialProvider::instanceProfile()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue