File tree Expand file tree Collapse file tree
src/iceberg/catalog/rest/auth Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616# under the License.
1717
1818# AWS-related tests. ICEBERG_S3 and ICEBERG_SIGV4 are exercised individually and
19- # together; with both on, Arrow's S3 reuses SigV4's system AWS SDK
20- # (AWSSDK_SOURCE=SYSTEM) so a single AWS SDK is linked (no ODR).
19+ # together; with both on, ICEBERG_AWSSDK_SOURCE defaults to BUNDLED so SigV4
20+ # reuses Arrow's bundled aws-cpp-sdk-core — a single AWS SDK is linked (no ODR).
2121name : AWS Tests
2222
2323on :
Original file line number Diff line number Diff line change @@ -430,6 +430,17 @@ Result<std::shared_ptr<AuthSession>> SigV4AuthManager::WrapSession(
430430 } else {
431431 ICEBERG_ASSIGN_OR_RAISE (credentials, MakeCredentialsProvider (properties));
432432 }
433+ // Fail fast when the provider cannot resolve credentials (e.g. an empty
434+ // default chain) instead of sending an effectively unsigned request later.
435+ if (credentials->GetAWSCredentials ().IsEmpty ()) {
436+ return std::unexpected<Error>(
437+ Error{.kind = ErrorKind::kAuthenticationFailed ,
438+ .message = " SigV4: AWS credentials provider returned empty credentials; "
439+ " set '" +
440+ AuthProperties::kSigV4AccessKeyId + " ' and '" +
441+ AuthProperties::kSigV4SecretAccessKey +
442+ " ' or configure the AWS credentials chain" });
443+ }
433444 auto session =
434445 std::make_shared<SigV4AuthSession>(std::move (delegate_session), std::move (region),
435446 std::move (service), std::move (credentials));
You can’t perform that action at this time.
0 commit comments