You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating the account's UID and GID, S3 put objects fail with AccessDenied.
Expected behavior
After updating account's UID and GID, succeed in S3 putobject or explicitly clarify in the docs (what will happen to the objects that we written with the previous UID and GID? what we should do before updating the UID and GID?)
currently what we have (link):
uid/gid/user - An account's access key is mapped to a file system uid/gid (or user). Before performing any file system operation, NooBaa switches to the account's UID/GID, ensuring that accounts access to buckets and objects is enforced by the file system.
Steps to reproduce
Create account with the CLI: sudo node src/cmd/manage_nsfs account add --name shira-1001 --new_buckets_path /tmp/nsfs_root1 --access_key <access-key> --secret_key <secret-key> --uid <uid> --gid <gid>
Note: before creating the account need to give permission to the new_buckets_path: chmod 777 /tmp/nsfs_root2.
Create a bucket owned by the account with the CLI: sudo node src/cmd/manage_nsfs bucket add --name my-bucket --path /tmp/nsfs_root1/my-bucket --owner shira-1001
Start the NSFS server with: sudo node src/cmd/nsfs --debug 5
Notes:
Before starting the server please increase the debug level with: sudo vi /etc/noobaa.conf.d/config.json and then {"NOOBAA_LOG_LEVEL":"nsfs"}
I Change the config.NSFS_CHECK_BUCKET_BOUNDARIES = false; //SDSD because I'm using the /tmp/ and not /private/tmp/.
Create the alias for S3 service: alias nc-user-1-s3='AWS_ACCESS_KEY_ID=<access-key> AWS_SECRET_ACCESS_KEY=<secret-key> aws --no-verify-ssl --endpoint-url https://localhost:6443'.
Update UID and GID of the account: sudo node src/cmd/manage_nsfs account update --name shira-1001 --uid <uid> --gid <gid>
nc-user-1-s3 s3api put-object --bucket my-bucket --key hello2 (currently fails) - to avoid working with the accounts cache restart the server before this operation (ctrl +c on sudo node src/cmd/nsfs --debug 5 and run it again).
More information - Screenshots / Logs / Other output
Environment info
Actual behavior
AccessDenied
.Expected behavior
currently what we have (link):
Steps to reproduce
sudo node src/cmd/manage_nsfs account add --name shira-1001 --new_buckets_path /tmp/nsfs_root1 --access_key <access-key> --secret_key <secret-key> --uid <uid> --gid <gid>
Note: before creating the account need to give permission to the
new_buckets_path
:chmod 777 /tmp/nsfs_root2
.sudo node src/cmd/manage_nsfs bucket add --name my-bucket --path /tmp/nsfs_root1/my-bucket --owner shira-1001
sudo node src/cmd/nsfs --debug 5
Notes:
sudo vi /etc/noobaa.conf.d/config.json
and then{"NOOBAA_LOG_LEVEL":"nsfs"}
config.NSFS_CHECK_BUCKET_BOUNDARIES = false; //SDSD
because I'm using the/tmp/
and not/private/tmp/
.alias nc-user-1-s3='AWS_ACCESS_KEY_ID=<access-key> AWS_SECRET_ACCESS_KEY=<secret-key> aws --no-verify-ssl --endpoint-url https://localhost:6443'
.nc-user-1-s3 s3api put-object --bucket my-bucket --key hello
(should succeed)sudo node src/cmd/manage_nsfs account update --name shira-1001 --uid <uid> --gid <gid>
nc-user-1-s3 s3api put-object --bucket my-bucket --key hello2
(currently fails) - to avoid working with the accounts cache restart the server before this operation (ctrl +c onsudo node src/cmd/nsfs --debug 5
and run it again).More information - Screenshots / Logs / Other output
Logs:
The text was updated successfully, but these errors were encountered: