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

Environment and shared profile config for ignoring endpoint urls is not respected for service specific config #1194

Open
aajtodd opened this issue Sep 20, 2024 · 2 comments · May be fixed by smithy-lang/smithy-rs#3873
Labels
bug This issue is a bug. p2 This is a standard priority issue

Comments

@aajtodd
Copy link
Contributor

aajtodd commented Sep 20, 2024

Describe the bug

AWS_IGNORE_CONFIGURED_ENDPOINT_URLS and ignore_configured_endpoint_urls are used to disable endpoint urls via environment and shared profile config.

We seem to respect them for the global config when using config loader but not for service specific env/keys (example)

Expected Behavior

Service specific environment should also take these settings into account when loading from SdkConfig.

Current Behavior

Service clients still use environment settings.

Reproduction Steps

let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest()).load().await;
let sts = aws_sdk_sts::Client::new(&aws_config);
let result = sts.get_caller_identity().send().await;
println!("resolved ident: {:#?}", result);
export AWS_ENDPOINT_URL_STS=http://127.0.0.1:4566
export AWS_IGNORE_CONFIGURED_ENDPOINT_URLS=true
export AWS_PROFILE=my-profile
RUST_LOG=trace cargo run

Possible Solution

No response

Additional Information/Context

No response

Version

`aws-config: 1.5.6` and latest service clients (sts `1.43.0` at this time).

Environment details (OS name and version, etc.)

all

Logs

No response

@aajtodd aajtodd added bug This issue is a bug. p2 This is a standard priority issue labels Sep 20, 2024
@aajtodd
Copy link
Contributor Author

aajtodd commented Oct 15, 2024

related issue: #1193

@aajtodd
Copy link
Contributor Author

aajtodd commented Oct 15, 2024

NOTE the SEP has this to say:

SDKs MUST read a parameter using the standard parameter resolution logic (idiomatic client configuration, environment variable, and shared configuration file) boolean option to disable the feature. The client configuration and shared configuration profile value MUST be named ignore_configured_endpoint_urls, and the environment variable AWS_IGNORE_CONFIGURED_ENDPOINT_URLS.

This would indicate SdkConfig should also have an option for programmatically disabling endpoint URL detection via environment/shared profiles. This would also be how we change codegen From<SdkConfig> implementation to look at that field and decide whether to look at the service specific env/profile keys.

We only implemented support for ignoring these at the config loader level .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant