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

Make NSS test-suite and spec compliant #1557

Merged
merged 6 commits into from
Jan 26, 2021
Merged

Make NSS test-suite and spec compliant #1557

merged 6 commits into from
Jan 26, 2021

Conversation

bourgeoa
Copy link
Member

With this PR all tests from the test-suite are passing. Considering the following upgrades to be made :

This is a bit large upgrade. I am sorry for it.

The main changes are :

  • creation of container with PUT (changes in ldp.js)
  • resource creation needs acl:accessTo Append and acl:default Write (changes in acl-checker.js, handlers/allow.js, handlers/patch.js)
  • delete do not need acl check on folder (changes in ldp-middleware.js)
  • content-type is needed (except for create container with PUT. There is no default value.)
  • pubsub notification for folder is now send in line with test-suite

Some more changes to comply with spec :

  • resource and container cannot only differ with / (changes in handlers/patch.js and ldp.js)

NSS implementation changes :

  • aclCache implement clearing cache with clearAclCache(url) in ldp.delete and ldp.put (changes in ldp.js and acl-checker.js)
  • delete of root and root.acl are forbidden
  • use the same functions in ldp.js and handlers/patch to create intermediate directories and resource and container doe not use same name differing with /

This PR + NSS 5.6.0 is running on https://solidcommunity.net:8443 test server with mashlib 1.6.5 latest published version working for long chat.

* delete root returns 405

* delete root/rootAcl throw 405

* no POST for auxiliary resources

* no resource and container with same name

* fake commit

* reverse fake commit

* fake

* reverse fake

* fake

* reverse fake

* delete pod

* cleaning

* cleaning

* some more cleaning

* content-type must

* cleaning

* content-type do not default

* cleaning

* update CRUD checks to solid specifications

* PATCH check filename is not a folder

* cleaning

* pubsub on parent

* add PUT for container

* cleaning
* delete root/rootAcl
* no POST for auxiliary resources
* no resource and container with same name except '/'
* content-type is a MUST (is it a must for create container ?)
* content-type do not default
* update CRUD checks to solid specifications
* pubsub on parent
* add PUT for container
* function createDirectory() for PUT PATCH
* delete acl from cache if not exists
* PUT do not need req.headers link

* make NSS test-suite compliant
@Vinnl
Copy link
Contributor

Vinnl commented Jan 19, 2021

It looks like this would also fix #1465, is that correct? (If so, great!)

@bourgeoa
Copy link
Member Author

@Vinnl yes this solves #1465 however header link is not needed following @csarven comment in https://gitter.im/solid/test-suite

btw, that Link header is not necessary for PUT because the effective request URI already has a trailing slash

lib/acl-checker.js Outdated Show resolved Hide resolved
lib/acl-checker.js Outdated Show resolved Hide resolved
Copy link
Member

@michielbdejong michielbdejong left a comment

Choose a reason for hiding this comment

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

Sounds great!

bourgeoa and others added 2 commits January 26, 2021 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants