From f460a86dd91e26cbc01aa2fd8201f981cac2ece7 Mon Sep 17 00:00:00 2001 From: Omar Salloum Date: Wed, 5 Jun 2024 05:15:27 +0200 Subject: [PATCH] STS needs to be statically linked This is needed to support loading roles on kubernetes pod using web identity federation, if STS is not there, the aws-sdk credentials chain will ignore this method and fallback to the instance metadata role which would not be the expected role for the application code --- CMakeLists.txt | 2 +- vcpkg.json | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 98569d7..ec780c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ build_loadable_extension(${TARGET_NAME} ${PARAMETERS} ${EXTENSION_SOURCES}) # Weirdly we need to manually to this, otherwise linking against # ${AWSSDK_LINK_LIBRARIES} fails for some reason find_package(ZLIB REQUIRED) -find_package(AWSSDK REQUIRED COMPONENTS core) +find_package(AWSSDK REQUIRED COMPONENTS core sts) # Build static lib target_include_directories(${EXTENSION_NAME} diff --git a/vcpkg.json b/vcpkg.json index 2da224f..f3b90b5 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,9 +1,12 @@ { "dependencies": [ "zlib", - "aws-sdk-cpp", + { + "name": "aws-sdk-cpp", + "features": [ "sts" ] + }, "openssl" ], "builtin-baseline": "a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6", "overrides": [{"name": "openssl", "version": "3.0.8"}] -} \ No newline at end of file +}