Skip to content

S3 ACL request owner display name sometimes returns null #6460

@dmytro-sylaiev

Description

@dmytro-sylaiev

Describe the bug

I got the issue with retrieving the acl response Owner displayName. Sometimes it returns null, sometimes not.

When execute this code:

`private static S3Client s3Client;

public static void main(String[] args) {
    s3Client = S3Client.builder()
            .accelerate(false)
            .region(Region.AP_SOUTHEAST_2)
            .crossRegionAccessEnabled(true)
            .credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create(getAccessKeyId(),
                    getSecretAccessKey())))
            .build();


    for (int i = 0 ; i< 10; i++) {
        System.out.println(getOwner(getBucketName(), getItemName()).displayName());
    }
}

public static Owner getOwner(String bucketName, String key) {
    GetObjectAclRequest aclRequest = GetObjectAclRequest.builder()
            .bucket(bucketName)
            .key(key)
            .build();

    GetObjectAclResponse aclResponse = s3Client.getObjectAcl(aclRequest);
    return aclResponse.owner();
}`

using amazon-s3-encryption-client-java:3.4.0 I got that response:

null
null
Real owner display name
Real owner display name
Real owner display name
null
Real owner display name
Real owner display name
Real owner display name
Real owner display name

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

ACL response contains Owner display name every time

Current Behavior

Randomly s3Client.getObjectAcl(aclRequest).owner().displayName() returns null

Reproduction Steps

Execute code from the description (increase the counter in the loop if needed)

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

2.31.62 and 2.34.8

JDK version used

openjdk 17.0.9 2023-10-17 LTS

Operating System and version

Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions