Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 Store Credential Provider #494

Conversation

adam-singer
Copy link
Member

@adam-singer adam-singer commented Dec 15, 2023

Description

Credential provider is not supplied when creating aws_config::from_env(), that leads to failure responses seen in #428.

Pass the aws_config::default_provider::credentials.default_provider into the aws_config::from_env() builder which should pick up the proper credentials for the environment based on the following resolution order.

Fixes # (issue)

#428

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Manually tested credentials provider with https://gist.github.com/adam-singer/8123e54aa990816ef400200d3de32591, since test depends on live buckets/environments an integration test was not provided (yet?).

Without the credential provider the expected response object would contain

Err(
    DispatchFailure(
        DispatchFailure {
            source: ConnectorError {
                kind: Other(
                    None,
                ),
                source: CredentialsNotLoaded(
                    CredentialsNotLoaded {
                        source: "no providers in chain provided credentials",
                    },
                ),
                connection: Unknown,
            },
        },
    ),
)

With the credential provider the expected response object should contain

[...]
Ok(
    ListObjectsOutput {
        is_truncated: false,
        marker: Some(
            "",
        ),
        next_marker: None,
        contents: Some(
            [
                Object {
                    key: Some(
                        "test1.txt",
                    ),
[...]

This change is Reviewable

@adam-singer adam-singer force-pushed the adams/use-aws-credentials-provider-issues-428 branch from 8be3175 to 5cb5fc6 Compare December 21, 2023 07:26
Copy link
Member Author

@adam-singer adam-singer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@allada I think we could land this as is, testing a default provider thats part of object configuration which we don't have access to in this context just means we are testing a set on config, doesn't seem high value enough atm.

Reviewable status: 0 of 1 LGTMs obtained, and pending CI: Analyze (javascript-typescript), Analyze (python), Bazel Dev / ubuntu-22.04, Cargo Dev / ubuntu-22.04, Local / ubuntu-22.04, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), pre-commit-checks, publish-image, ubuntu-20.04, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, windows-2022 / stable

Copy link
Member

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained

@adam-singer adam-singer merged commit 1039ea0 into TraceMachina:main Dec 21, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants