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 | NC | Prevent Adding Additional Properties (Bucket Schema) #7830

Merged

Conversation

shirady
Copy link
Contributor

@shirady shirady commented Feb 18, 2024

Explain the changes

  1. Prevent adding additional properties (bucket schema) - by using strictly on objects under schema that use ref (with an object underneath).

Issues: Fixed #7757

  1. Currently a user can add additional properties to the JSON of s3_policy, website, and encryption objects.

Testing Instructions:

  1. Using unit tests, please run: npx jest test_nc_nsfs_bucket_schema_validation.test.js.
  • Doc added/updated
  • Tests added (we had tests that were it.skip and in this PR we removed the skip part.

@shirady
Copy link
Contributor Author

shirady commented Feb 18, 2024

@guymguym as I understand the strictify function is recursive - but it doesn't handle the ref.
The solution I suggest solves the issue, but I would like to discuss if you have a better idea.

@shirady shirady requested a review from liranmauda March 3, 2024 09:50
@shirady shirady force-pushed the nsfs-nc-prevent-additional-properties branch 2 times, most recently from 8db60ce to 9377127 Compare March 6, 2024 08:16
Signed-off-by: shirady <57721533+shirady@users.noreply.github.com>
@shirady shirady force-pushed the nsfs-nc-prevent-additional-properties branch from def84b7 to 0d17ba6 Compare March 6, 2024 15:30
@shirady shirady merged commit 8363cf7 into noobaa:master Mar 6, 2024
10 checks passed
@shirady shirady deleted the nsfs-nc-prevent-additional-properties branch March 6, 2024 18:27
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.

NSFS | NC | Prevent Adding Additional Properties (Bucket Schema)
2 participants