8#include <aws/core/utils/memory/stl/AWSSet.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/ConcurrentCache.h>
11#include <aws/core/auth/signer/AWSAuthSignerBase.h>
12#include <aws/s3-crt/S3ExpressIdentity.h>
13#include <smithy/identity/resolver/AwsIdentityResolverBase.h>
15#include <condition_variable>
19 struct ServiceSpecificParameters;
29 GetS3ExpressIdentity(
const std::shared_ptr<Aws::Http::ServiceSpecificParameters> &serviceSpecificParameters) = 0;
43 mutable std::mutex m_bucketNameMapMutex;
64 mutable std::shared_ptr<Aws::Utils::ConcurrentCache<Aws::String, S3ExpressIdentity>> m_credentialsCache;
70 std::chrono::minutes refreshPeriod = std::chrono::minutes(1));
74 std::chrono::minutes refreshPeriod = std::chrono::minutes(1));
86 void refreshIdentities(std::chrono::minutes refreshPeriod);
89 void threadSafeKeyEmpty();
91 mutable std::shared_ptr<Aws::Utils::ConcurrentCache<Aws::String, S3ExpressIdentity>> m_credentialsCache;
93 mutable std::mutex m_keysUsedMutex;
94 mutable bool m_shouldStopBackgroundRefresh;
96 mutable std::mutex m_shutDownMutex;
97 mutable std::condition_variable m_shutdownCondition;
DefaultAsyncS3ExpressIdentityProvider(const S3CrtClient &m_s3Client, std::chrono::minutes refreshPeriod=std::chrono::minutes(1))
DefaultAsyncS3ExpressIdentityProvider & operator=(DefaultAsyncS3ExpressIdentityProvider &&other) noexcept=delete
DefaultAsyncS3ExpressIdentityProvider(const S3CrtClient &s3Client, std::shared_ptr< Utils::ConcurrentCache< Aws::String, S3ExpressIdentity > > credentialsCache, std::chrono::minutes refreshPeriod=std::chrono::minutes(1))
S3ExpressIdentity GetS3ExpressIdentity(const std::shared_ptr< Aws::Http::ServiceSpecificParameters > &serviceSpecificParameters) override
DefaultAsyncS3ExpressIdentityProvider(const DefaultAsyncS3ExpressIdentityProvider &other)=delete
DefaultAsyncS3ExpressIdentityProvider & operator=(const DefaultAsyncS3ExpressIdentityProvider &other)=delete
virtual ~DefaultAsyncS3ExpressIdentityProvider() override
DefaultAsyncS3ExpressIdentityProvider(DefaultAsyncS3ExpressIdentityProvider &&other) noexcept=delete
DefaultS3ExpressIdentityProvider(const S3CrtClient &s3Client, std::shared_ptr< Utils::ConcurrentCache< Aws::String, S3ExpressIdentity > > credentialsCache)
DefaultS3ExpressIdentityProvider(const DefaultS3ExpressIdentityProvider &other)=delete
DefaultS3ExpressIdentityProvider & operator=(const DefaultS3ExpressIdentityProvider &other)=delete
DefaultS3ExpressIdentityProvider(const S3CrtClient &m_s3Client)
virtual ~DefaultS3ExpressIdentityProvider() override=default
DefaultS3ExpressIdentityProvider & operator=(DefaultS3ExpressIdentityProvider &&other) noexcept=delete
S3ExpressIdentity GetS3ExpressIdentity(const std::shared_ptr< Aws::Http::ServiceSpecificParameters > &serviceSpecificParameters) override
DefaultS3ExpressIdentityProvider(DefaultS3ExpressIdentityProvider &&other) noexcept=delete
virtual S3ExpressIdentity GetS3ExpressIdentity(const std::shared_ptr< Aws::Http::ServiceSpecificParameters > &serviceSpecificParameters)=0
S3ExpressIdentityProvider(const S3CrtClient &s3Client)
virtual ~S3ExpressIdentityProvider()
S3ExpressIdentity getIdentity(const Aws::String &bucketName)
ResolveIdentityFutureOutcome getIdentity(const IdentityProperties &identityProperties, const AdditionalParameters &additionalParameters) override
std::shared_ptr< std::mutex > GetMutexForBucketName(const Aws::String &bucketName)
Aws::UnorderedMap< Aws::String, Aws::Crt::Variant< Aws::String, bool > > AdditionalParameters
Aws::UnorderedMap< Aws::String, Aws::Crt::Variant< Aws::String, bool > > IdentityProperties
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::set< T, std::less< T >, Aws::Allocator< T > > Set
std::unique_ptr< T, D > UniquePtr