Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect owner id in list object versions output #953

Closed
evgeniiz321 opened this issue May 16, 2024 · 6 comments
Closed

Incorrect owner id in list object versions output #953

evgeniiz321 opened this issue May 16, 2024 · 6 comments
Assignees
Labels
bug Something isn't working I4 No visible changes S4 Routine U2 Seriously planned
Milestone

Comments

@evgeniiz321
Copy link

Create objects
Get objects ACL:

[{'ETag': 'fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9', 'Size': 3, 'Key': 'bar', 'VersionId': 'FNWVaXLabfpPB3sTYdoWZEyRR8CP5pHwts8xigkhgJ6k', 'IsLatest': True, 'LastModified': datetime.datetime(2024, 5, 16, 2, 33, 46, tzinfo=tzutc()), 'Owner': {'DisplayName': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp', 'ID': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp'}}, {'ETag': 'baa5a0964d3320fbc0c6a922140453c8513ea24ab8fd0577034804a967248096', 'Size': 3, 'Key': 'baz', 'VersionId': '4BjSZz7yLXKAH4HQXm1T3KyFoMBcoNhxsqaG14CCzKQE', 'IsLatest': True, 'LastModified': datetime.datetime(2024, 5, 16, 2, 33, 46, tzinfo=tzutc()), 'Owner': {'DisplayName': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp', 'ID': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp'}}, {'ETag': '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae', 'Size': 3, 'Key': 'foo', 'VersionId': '5ZediAKYqDheD7rC4Prt8Jf3rDt2wMdFb1dkGoPEU6Mz', 'IsLatest': True, 'LastModified': datetime.datetime(2024, 5, 16, 2, 33, 46, tzinfo=tzutc()), 'Owner': {'DisplayName': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp', 'ID': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp'}}]

Notice that Owner ID is equal to NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp.

Now issue list_object_versions:

'Owner': {'DisplayName': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp', 'ID': '024ff90ae96bfa3447c2e656b595e0d88f8a7bb4f2c75ac2feac2ff6f0e86fbbe2'}

Owner ID is equal to something else. But should be NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp as in the object ACL output.

test_bucket_list_return_data_versioning

@evgeniiz321 evgeniiz321 added bug Something isn't working U2 Seriously planned labels May 16, 2024
@roman-khimov roman-khimov added S4 Routine I4 No visible changes labels May 16, 2024
@roman-khimov roman-khimov added this to the v0.30.1 milestone May 16, 2024
@roman-khimov
Copy link
Member

IIRC the key was used intentionally here.

@smallhive smallhive self-assigned this Jun 3, 2024
@smallhive
Copy link
Contributor

smallhive commented Jun 4, 2024

$ aws --no-paginate s3api get-object-acl --bucket heh1717474686 --key file-1717474690.txt --endpoint http://localhost:19080

{
    "Owner": {
        "DisplayName": "NiskPF9pfRMzg7V7PeB4d6ogLzu74a1L2Q",
        "ID": "03a0c9429ca04596dbef6eca53f0ed60e10a9d43a9efcedcf627cf4305dcef8b9a"
    },
    "Grants": [
        {
            "Grantee": {
                "DisplayName": "NiskPF9pfRMzg7V7PeB4d6ogLzu74a1L2Q",
                "ID": "03a0c9429ca04596dbef6eca53f0ed60e10a9d43a9efcedcf627cf4305dcef8b9a",
                "Type": "CanonicalUser"
            },
            "Permission": "FULL_CONTROL"
        },
        {
            "Grantee": {
                "Type": "Group",
                "URI": "http://acs.amazonaws.com/groups/global/AllUsers"
            },
            "Permission": "READ"
        }
    ]
}

The right and only valid definition of owner is

"Owner": {
        "DisplayName": "NiskPF9pfRMzg7V7PeB4d6ogLzu74a1L2Q",
        "ID": "03a0c9429ca04596dbef6eca53f0ed60e10a9d43a9efcedcf627cf4305dcef8b9a"
    },

Where DisplayName is the address of the owner from its wallet. ID is a pub key

Any variants as

'Owner': {'DisplayName': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp', 'ID': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp'}

are not valid. I'm fixing the places when see them in the code. But it requires time.

test_bucket_list_return_data_versioning behaviour is valid. Tested on the latest master as well.

What test leads to this situation? @evgeniiz321

[{'ETag': 'fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9', 'Size': 3, 'Key': 'bar', 'VersionId': 'FNWVaXLabfpPB3sTYdoWZEyRR8CP5pHwts8xigkhgJ6k', 'IsLatest': True, 'LastModified': datetime.datetime(2024, 5, 16, 2, 33, 46, tzinfo=tzutc()), 'Owner': {'DisplayName': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp', 'ID': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp'}}, {'ETag': 'baa5a0964d3320fbc0c6a922140453c8513ea24ab8fd0577034804a967248096', 'Size': 3, 'Key': 'baz', 'VersionId': '4BjSZz7yLXKAH4HQXm1T3KyFoMBcoNhxsqaG14CCzKQE', 'IsLatest': True, 'LastModified': datetime.datetime(2024, 5, 16, 2, 33, 46, tzinfo=tzutc()), 'Owner': {'DisplayName': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp', 'ID': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp'}}, {'ETag': '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae', 'Size': 3, 'Key': 'foo', 'VersionId': '5ZediAKYqDheD7rC4Prt8Jf3rDt2wMdFb1dkGoPEU6Mz', 'IsLatest': True, 'LastModified': datetime.datetime(2024, 5, 16, 2, 33, 46, tzinfo=tzutc()), 'Owner': {'DisplayName': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp', 'ID': 'NPvy7w9qrB2qyS2wVMxwKiNWRfykgFCCmp'}}]

@roman-khimov
Copy link
Member

Refs. nspcc-dev/neofs-api#278

@smallhive
Copy link
Contributor

Double checked. The test test_bucket_list_return_data_versioning is green, but here not in master. It should be checked after merge

@smallhive
Copy link
Contributor

Merged, could be rechecked. @evgeniiz321

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working I4 No visible changes S4 Routine U2 Seriously planned
Projects
None yet
Development

No branches or pull requests

3 participants