|
22 | 22 | #include <unordered_set> |
23 | 23 |
|
24 | 24 | #include "iceberg/catalog/rest/auth/auth_manager_internal.h" |
25 | | -#ifdef ICEBERG_BUILD_SIGV4 |
26 | | -# include "iceberg/catalog/rest/auth/sigv4_auth_manager.h" |
27 | | -#endif |
28 | 25 | #include "iceberg/catalog/rest/auth/auth_properties.h" |
29 | 26 | #include "iceberg/util/string_util.h" |
30 | 27 |
|
@@ -105,30 +102,4 @@ Result<std::unique_ptr<AuthManager>> AuthManagers::Load( |
105 | 102 | return it->second(name, properties); |
106 | 103 | } |
107 | 104 |
|
108 | | -#ifdef ICEBERG_BUILD_SIGV4 |
109 | | -Result<std::unique_ptr<AuthManager>> MakeSigV4AuthManager( |
110 | | - std::string_view name, |
111 | | - const std::unordered_map<std::string, std::string>& properties) { |
112 | | - // Determine the delegate auth type. Default to OAuth2 if not specified. |
113 | | - std::string delegate_type = AuthProperties::kAuthTypeOAuth2; |
114 | | - auto it = properties.find(AuthProperties::kSigV4DelegateAuthType); |
115 | | - if (it != properties.end() && !it->second.empty()) { |
116 | | - delegate_type = StringUtils::ToLower(it->second); |
117 | | - } |
118 | | - |
119 | | - // Prevent circular delegation (sigv4 -> sigv4 -> ...). |
120 | | - ICEBERG_PRECHECK(delegate_type != AuthProperties::kAuthTypeSigV4, |
121 | | - "Cannot delegate a SigV4 auth manager to another SigV4 auth " |
122 | | - "manager (delegate_type='{}')", |
123 | | - delegate_type); |
124 | | - |
125 | | - // Load the delegate auth manager. |
126 | | - auto delegate_props = properties; |
127 | | - delegate_props[AuthProperties::kAuthType] = delegate_type; |
128 | | - |
129 | | - ICEBERG_ASSIGN_OR_RAISE(auto delegate, AuthManagers::Load(name, delegate_props)); |
130 | | - return std::make_unique<SigV4AuthManager>(std::move(delegate)); |
131 | | -} |
132 | | -#endif |
133 | | - |
134 | 105 | } // namespace iceberg::rest::auth |
0 commit comments