amzn / smoke-aws-credentials

A library to obtain and assume automatically rotating AWS IAM roles written in the Swift programming language.
Apache License 2.0
19 stars 14 forks source link

Swift Concurrency refactor. #30

Closed tachyonics closed 1 year ago

tachyonics commented 1 year ago

Issue #, if available:

Description of changes:

  1. Migrate to using Swift concurrency tasks to manage credential refreshes
  2. use NSLock rather than a raw mutex. Ensure there is sufficient locking around retrieving and updating credentials
  3. Remove conditional compilation around swift-concurrency code and remove Swift 5.5 support (as per our support document)
  4. Add v2 versions of the public APIs that are async, deprecating the existing versions. The only difference between the now deprecated versions and v2 is that the initial credential retrieval will now be done async - in both cases the subsequent background refreshes will use the Swift-concurrency tasks.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.