Skip to content

Commit

Permalink
Initial assumeRole chain
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Jan 10, 2024
1 parent 3ce2463 commit 67c213b
Show file tree
Hide file tree
Showing 3 changed files with 250 additions and 59 deletions.
11 changes: 5 additions & 6 deletions source/credentials_provider_profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: Apache-2.0.
*/

#include "aws/sdkutils/aws_profile.h"
#include <aws/auth/credentials.h>

#include <aws/auth/private/aws_profile.h>
Expand Down Expand Up @@ -291,13 +292,11 @@ static struct aws_credentials_provider *s_create_sts_based_provider(
"static: source_profile set to %s",
aws_string_c_str(aws_profile_property_get_value(source_profile_property)));

sts_options.creds_provider = s_create_profile_based_provider(
allocator,
credentials_file_path,
config_file_path,
aws_profile_property_get_value(source_profile_property),
options->profile_collection_cached);
struct aws_credentials_provider_profile_options profile_provider_options = *options;
profile_provider_options.profile_name_override =
aws_byte_cursor_from_string(aws_profile_property_get_value(source_profile_property));

sts_options.creds_provider = aws_credentials_provider_new_profile(allocator, &profile_provider_options);
if (!sts_options.creds_provider) {
goto done;
}
Expand Down
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ add_net_test_case(credentials_provider_sts_direct_config_invalid_doc)
add_net_test_case(credentials_provider_sts_direct_config_connection_failed)
add_net_test_case(credentials_provider_sts_direct_config_service_fails)
add_net_test_case(credentials_provider_sts_from_profile_config_succeeds)
add_net_test_case(credentials_provider_sts_from_profile_config_with_chain)
add_net_test_case(credentials_provider_sts_from_profile_config_manual_tls_succeeds)
add_net_test_case(credentials_provider_sts_from_profile_config_environment_succeeds)
add_net_test_case(credentials_provider_sts_cache_expiration_conflict)
Expand Down
Loading

0 comments on commit 67c213b

Please sign in to comment.