Add credential_process support#695
Open
sebsto wants to merge 7 commits into
Open
Conversation
Implement the `credential_process` configuration key from AWS shared credentials/config files. When a profile specifies this key, the SDK executes the command via /bin/sh -c, parses JSON credentials from stdout, and returns either static or expiring credentials depending on the presence of an Expiration field. Includes a test helper binary for end-to-end testing and comprehensive Swift Testing coverage for config parsing, process execution, and error handling. Closes soto-project#641 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
111dc42 to
f5570bb
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #695 +/- ##
==========================================
+ Coverage 81.13% 81.29% +0.15%
==========================================
Files 91 93 +2
Lines 6580 6665 +85
==========================================
+ Hits 5339 5418 +79
- Misses 1241 1247 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Foundation.Process is not available on iOS/tvOS/watchOS. The credential_process feature only makes sense on platforms with a shell. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
credential_processconfiguration key from AWS shared credentials/config files (#641)/bin/sh -c, parses JSON credentials from stdout, and returns either static or expiring credentialsRotatingCredentialProviderfor automatic credential refresh whenExpirationis presentcredential_processas a source credential forrole_arnassume-role chainsChanges
Package.swiftcredential-process-test-helperexecutable targetCredentialProcessProvider.swiftFoundation.Process, error types, JSON decodingConfigFileLoader.swiftcredentialProcessfield to structs, newSharedCredentialscase, resolution logicConfigFileCredentialProvider.swift.credentialProcessdispatchCredentialProvider.swift.credentialProcess(command:)factory methodiso8601.swiftcredential-process-test-helper/main.swiftCredentialProcessProviderTests.swiftTest plan
swift buildcompiles without errors or warningsswift test— all 346 XCTest + 62 Swift Testing tests pass (0 failures)swift run credential-process-test-helperoutputs valid JSONCloses #641