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

NSFS | Support anonymous NSFS requests #7997

Merged
merged 1 commit into from
May 29, 2024

Conversation

naveenpaul1
Copy link
Contributor

@naveenpaul1 naveenpaul1 commented Apr 24, 2024

Explain the changes

  1. Support anonymous NSFS requests
  2. add CLI for add/updat/delete/status the anonymous account
  3. Ceph test test_post_object_wrong_bucket added to black list
  4. load_requesting_account() will load account from anonymous account. UID and GID or distinguished_name from anonymous account use for this.
  5. anonymous user to account_cache with empty access key and for that read_account_by_access_key() method is updated

Issues: Fixed #xxx / Gap #xxx

  1. Changes added to support anonymous request in namespace store
  2. remove namesapce store check in code that prevent anonymous request

Testing Instructions:

  1. Add anonymous account
    node src/cmd/manage_nsfs account add --anonymous --uid {uid} --gid {gid}
  2. Create Bucket with policy that support anonymous request
    { Effect: 'Allow', Principal: { AWS: ["*"] }, Action: ['s3:GetObject', 's3:ListBucket'], Resource: ['arn:aws:s3:::*'] }
  3. access object item using anonymous s3 request
  • Doc added/updated
  • Tests added

@naveenpaul1 naveenpaul1 marked this pull request as draft April 25, 2024 08:46
@guymguym guymguym added this to the 5.15.3 milestone Apr 25, 2024
@naveenpaul1 naveenpaul1 marked this pull request as ready for review April 25, 2024 11:21
@naveenpaul1 naveenpaul1 force-pushed the anonymous_namespace_req branch 2 times, most recently from 587d9f6 to 29b78b8 Compare April 28, 2024 11:10
@guymguym guymguym linked an issue Apr 28, 2024 that may be closed by this pull request
@guymguym guymguym modified the milestones: 5.15.3, 5.15.4 May 8, 2024
@naveenpaul1 naveenpaul1 force-pushed the anonymous_namespace_req branch 2 times, most recently from 54c3ad4 to 658345d Compare May 9, 2024 07:49
@naveenpaul1 naveenpaul1 changed the title Support anonymous NSFS requests NSFS | Support anonymous NSFS requests May 9, 2024
@romayalon
Copy link
Contributor

Hi @naveenpaul1 :)
This week I added the test_s3_bucket_policy.js to the Non Containerized tests, I saw some anonymous tests in this tests file and skipped them, can you please check it and unskip the relevant tests?
reference - #8022

src/endpoint/s3/s3_rest.js Outdated Show resolved Hide resolved
src/sdk/object_sdk.js Outdated Show resolved Hide resolved
@naveenpaul1 naveenpaul1 force-pushed the anonymous_namespace_req branch 6 times, most recently from e3bb799 to ee482a7 Compare May 14, 2024 11:17
@naveenpaul1 naveenpaul1 requested a review from guymguym May 14, 2024 12:20
@naveenpaul1 naveenpaul1 force-pushed the anonymous_namespace_req branch 3 times, most recently from e428fd8 to aeb811d Compare May 15, 2024 07:24
src/cmd/nsfs.js Outdated Show resolved Hide resolved
@romayalon
Copy link
Contributor

@naveenpaul1 Thanks for the hard work on this one!!!

src/sdk/object_sdk.js Outdated Show resolved Hide resolved
src/sdk/bucketspace_fs.js Outdated Show resolved Hide resolved
src/sdk/object_sdk.js Outdated Show resolved Hide resolved
src/sdk/object_sdk.js Outdated Show resolved Hide resolved
@naveenpaul1 naveenpaul1 force-pushed the anonymous_namespace_req branch 2 times, most recently from 626363a to 88bfc05 Compare May 28, 2024 07:55
src/sdk/object_sdk.js Outdated Show resolved Hide resolved
src/sdk/bucketspace_fs.js Outdated Show resolved Hide resolved
config.js Outdated Show resolved Hide resolved
config.js Outdated Show resolved Hide resolved
src/sdk/object_sdk.js Outdated Show resolved Hide resolved
src/sdk/object_sdk.js Outdated Show resolved Hide resolved
@naveenpaul1 naveenpaul1 force-pushed the anonymous_namespace_req branch 2 times, most recently from ba516cf to 9ecce2d Compare May 28, 2024 14:30
@naveenpaul1 naveenpaul1 requested a review from guymguym May 28, 2024 15:13
src/sdk/object_sdk.js Show resolved Hide resolved
config.js Outdated Show resolved Hide resolved
src/sdk/object_sdk.js Outdated Show resolved Hide resolved
Copy link
Member

@guymguym guymguym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just few comments left, but all in all this is looks great to me.

@naveenpaul1 naveenpaul1 merged commit a97af1d into noobaa:master May 29, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

standalone nsfs: process getting crashed when we hit anonymous tests
4 participants