Add AWS Process Credential Resolver - #658
Open
jonathan343 wants to merge 14 commits into
Open
Conversation
jonathan343
force-pushed
the
process-cred-resolver
branch
from
March 16, 2026 15:15
0e39eb8 to
246f957
Compare
jonathan343
marked this pull request as ready for review
March 16, 2026 16:51
SamRemis
suggested changes
Mar 18, 2026
SamRemis
reviewed
Mar 18, 2026
arandito
reviewed
Mar 19, 2026
Replace ProcessCredentialsConfig with a keyword-only timeout argument on ProcessCredentialsResolver. Default to no timeout to match the SEP and existing AWS SDK behavior.
Wrap non-UTF-8 stdout and malformed Expiration in SmithyIdentityError, drop the redundant version None check, and fall back to the profile's aws_account_id when the process output omits AccountId.
jonathan343
force-pushed
the
process-cred-resolver
branch
from
August 2, 2026 05:31
e341b1c to
0c48d90
Compare
jonathan343
commented
Aug 2, 2026
jonathan343
left a comment
Contributor
Author
There was a problem hiding this comment.
I'm bringing this PR back to life now that we have a foundation for the default credentials chain and config resolution. I've adapted this to the pattern introduced in #749.
jonathan343
commented
Aug 2, 2026
| return shlex.split(command) | ||
|
|
||
|
|
||
| def _split_windows_command(command: str) -> list[str]: |
Contributor
Author
There was a problem hiding this comment.
Note for reviewer: This is inspired by botocore's _windows_shell_split utility function.
jonathan343
commented
Aug 2, 2026
| from .conftest import OtherIdentity | ||
|
|
||
|
|
||
| @pytest.mark.parametrize( |
Contributor
Author
There was a problem hiding this comment.
Note for reviewer:
Most cases are ported from botocore: https://github.com/boto/botocore/blob/develop/tests/unit/test_compat.py#L111-L134
I also added two realistic Windows path cases
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.
Overview
This PR adds an AWS process-based credentials resolver to
smithy-aws-coreso credential providers can source credentials from an external command, while handling the common failure modes and caching behavior expected for both long-lived and temporary credentials.This PR adds AWS process-based credential support to
smithy-aws-core. It introduces aProcessCredentialsResolverthat sources credentials from an external command, and wires it into the default AWS identity chain so that a profile'scredential_processsetting is automatically honored. It also handles the common failure modes and caching behavior expected for both long-lived and temporary credentials.Testing
Note
This was tested with internal AWS process tools for sourcing credentials. TODO: Test with popular external tools.
The identity chain is currently opt-in. We'll construct one and set it as the config's credentials resolver. Once set, credentials sourced from a
credential_processprofile are resolved through the chain:Example Script:
The resolver can also be used directly, bypassing the chain and profile configuration entirely:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.