├── .acl ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .npmignore ├── .nvmrc ├── .snyk ├── .well-known └── .acl ├── CHANGELOG.md ├── CONTRIBUTING.md ├── CONTRIBUTORS.md ├── Dockerfile ├── LICENSE.md ├── README.md ├── bin ├── config.json ├── lib │ ├── cli-utils.js │ ├── cli.js │ ├── init.js │ ├── invalidUsernames.js │ ├── migrateLegacyResources.js │ ├── options.js │ ├── start.js │ └── updateIndex.js ├── solid ├── solid-test └── solid.js ├── common ├── css │ └── solid.css ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── img │ ├── .gitkeep │ └── solid-emblem.svg ├── js │ ├── auth-buttons.js │ ├── index-buttons.js │ └── solid.js └── well-known │ └── security.txt ├── config.json-default ├── config ├── defaults.js └── usernames-blacklist.json ├── default-templates ├── emails │ ├── delete-account.js │ ├── invalid-username.js │ ├── reset-password.js │ └── welcome.js ├── new-account │ ├── .acl │ ├── .meta │ ├── .meta.acl │ ├── .well-known │ │ └── .acl │ ├── favicon.ico │ ├── favicon.ico.acl │ ├── inbox │ │ └── .acl │ ├── private │ │ └── .acl │ ├── profile │ │ ├── .acl │ │ └── card$.ttl │ ├── public │ │ └── .acl │ ├── robots.txt │ ├── robots.txt.acl │ └── settings │ │ ├── .acl │ │ ├── prefs.ttl │ │ ├── privateTypeIndex.ttl │ │ ├── publicTypeIndex.ttl │ │ ├── publicTypeIndex.ttl.acl │ │ ├── serverSide.ttl.acl │ │ └── serverSide.ttl.inactive └── server │ ├── .acl │ ├── .well-known │ └── .acl │ ├── favicon.ico │ ├── favicon.ico.acl │ ├── index.html │ ├── robots.txt │ └── robots.txt.acl ├── default-views ├── account │ ├── account-deleted.hbs │ ├── delete-confirm.hbs │ ├── delete-link-sent.hbs │ ├── delete.hbs │ ├── invalid-username.hbs │ ├── register-disabled.hbs │ ├── register-form.hbs │ └── register.hbs ├── auth │ ├── auth-hidden-fields.hbs │ ├── change-password.hbs │ ├── goodbye.hbs │ ├── login-required.hbs │ ├── login-tls.hbs │ ├── login-username-password.hbs │ ├── login.hbs │ ├── no-permission.hbs │ ├── password-changed.hbs │ ├── reset-link-sent.hbs │ ├── reset-password.hbs │ └── sharing.hbs └── shared │ ├── create-account.hbs │ └── error.hbs ├── docker-compose.yml ├── docker-image ├── .dockerignore ├── .gitignore ├── CONTRIBUTING.md ├── Makefile ├── README.md ├── examples │ ├── docker-compose.all-in-one.yml │ ├── docker-compose.nginx.yml │ └── docker-compose.simple.yml ├── src │ ├── Dockerfile │ ├── checks.sh │ ├── create-temporary-cert.sh │ └── entrypoint.sh └── test │ ├── __init__.py │ ├── conftest.py │ ├── test_image_foundations.py │ ├── test_non_accessible_key_cert.py │ ├── test_precondition_checks.py │ ├── test_solid_default_config.py │ ├── test_volumes.py │ └── wait_for_container.py ├── docs ├── how-to-delete-your-account.md └── login-and-grant-access-to-application.md ├── examples ├── custom-error-handling.js ├── ldp-with-webid.js ├── simple-express-app.js └── simple-ldp-server.js ├── favicon.ico ├── favicon.ico.acl ├── index.html ├── index.js ├── lib ├── acl-checker.js ├── api │ ├── accounts │ │ └── user-accounts.js │ ├── authn │ │ ├── force-user.js │ │ ├── index.js │ │ ├── webid-oidc.js │ │ └── webid-tls.js │ └── index.js ├── capability-discovery.js ├── common │ ├── fs-utils.js │ ├── template-utils.js │ └── user-utils.js ├── create-app.js ├── create-server.js ├── debug.js ├── handlers │ ├── allow.js │ ├── auth-proxy.js │ ├── copy.js │ ├── cors-proxy.js │ ├── delete.js │ ├── error-pages.js │ ├── get.js │ ├── index.js │ ├── notify.js │ ├── options.js │ ├── patch.js │ ├── patch │ │ ├── n3-patch-parser.js │ │ └── sparql-update-parser.js │ ├── post.js │ ├── put.js │ └── restrict-to-top-domain.js ├── header.js ├── http-error.js ├── ldp-container.js ├── ldp-copy.js ├── ldp-middleware.js ├── ldp.js ├── lock.js ├── metadata.js ├── models │ ├── account-manager.js │ ├── account-template.js │ ├── authenticator.js │ ├── oidc-manager.js │ ├── solid-host.js │ ├── user-account.js │ └── webid-tls-certificate.js ├── payment-pointer-discovery.js ├── rdf-notification-template.js ├── requests │ ├── add-cert-request.js │ ├── auth-request.js │ ├── create-account-request.js │ ├── delete-account-confirm-request.js │ ├── delete-account-request.js │ ├── login-request.js │ ├── password-change-request.js │ ├── password-reset-email-request.js │ └── sharing-request.js ├── resource-mapper.js ├── server-config.js ├── services │ ├── blacklist-service.js │ ├── email-service.js │ └── token-service.js ├── utils.js └── webid │ ├── index.js │ ├── lib │ ├── get.js │ └── parse.js │ └── tls │ └── index.js ├── package-lock.json ├── package.json ├── renovate.json ├── robots.txt ├── robots.txt.acl ├── static ├── account-recovery.html ├── popup-redirect.html ├── signup.html └── signup.html.acl └── test ├── .meta ├── integration ├── account-creation-tls-test.js ├── account-manager-test.js ├── account-template-test.js ├── acl-oidc-test.js ├── acl-tls-test.js ├── auth-proxy-test.js ├── authentication-oidc-test.js ├── authentication-oidc-with-strict-origins-turned-off-test.js ├── capability-discovery-test.js ├── cors-proxy-test.js ├── errors-oidc-test.js ├── errors-test.js ├── formats-test.js ├── header-test.js ├── http-copy-test.js ├── http-test.js ├── ldp-test.js ├── oidc-manager-test.js ├── params-test.js ├── patch-sparql-update-test.js ├── patch-test.js ├── payment-pointer-test.js ├── prep-test.js ├── quota-test.js ├── special-root-acl-handling.js ├── validate-tts.js └── www-account-creation-oidc-test.js ├── keys ├── cert.pem ├── client-cert.pem ├── client-key.pem ├── key.pem ├── user1-cert.pem ├── user1-key.pem ├── user2-cert.pem └── user2-key.pem ├── mocha.opts ├── resources ├── .acl ├── .meta ├── .permissions ├── Makefile ├── accounts-acl │ ├── config │ │ ├── templates │ │ │ ├── emails │ │ │ │ └── welcome-test.js │ │ │ ├── new-account │ │ │ │ ├── .acl │ │ │ │ ├── .meta │ │ │ │ ├── .meta.acl │ │ │ │ ├── favicon.ico │ │ │ │ ├── favicon.ico.acl │ │ │ │ ├── inbox │ │ │ │ │ └── .acl │ │ │ │ ├── index.html │ │ │ │ ├── index.html.acl │ │ │ │ ├── profile │ │ │ │ │ ├── card │ │ │ │ │ └── card.acl │ │ │ │ └── settings │ │ │ │ │ ├── .acl │ │ │ │ │ ├── prefs.ttl │ │ │ │ │ ├── privateTypeIndex.ttl │ │ │ │ │ ├── publicTypeIndex.ttl │ │ │ │ │ ├── publicTypeIndex.ttl.acl │ │ │ │ │ └── serverSide.ttl │ │ │ └── server │ │ │ │ ├── .acl │ │ │ │ ├── index.html │ │ │ │ └── index.html.acl │ │ └── views │ │ │ ├── account │ │ │ └── register.hbs │ │ │ └── auth │ │ │ ├── consent.hbs │ │ │ ├── goodbye.hbs │ │ │ ├── login-required.hbs │ │ │ ├── login.hbs │ │ │ └── no-permission.hbs │ ├── db │ │ └── oidc │ │ │ ├── op │ │ │ ├── clients │ │ │ │ └── _key_77bb3b35edb1f3f7b887c25d1211a491.json │ │ │ └── provider.json │ │ │ └── rp │ │ │ └── clients │ │ │ └── _key_https%3A%2F%2Flocalhost%3A7777.json │ ├── localhost │ │ ├── .acl │ │ ├── index.html │ │ └── index.html.acl │ ├── nicola.localhost │ │ ├── .acl │ │ ├── index.html │ │ └── index.html.acl │ ├── quota │ │ └── settings │ │ │ └── serverSide.ttl │ └── tim.localhost │ │ ├── .meta │ │ ├── .meta.acl │ │ ├── append-acl │ │ ├── .acl │ │ ├── abc.ttl │ │ ├── abc.ttl.acl │ │ ├── abc2.ttl │ │ └── abc2.ttl.acl │ │ ├── append-inherited │ │ └── .acl │ │ ├── dot-acl │ │ └── .acl │ │ ├── empty-acl │ │ └── .acl │ │ ├── fake-account │ │ ├── .acl │ │ └── hello.html │ │ ├── group │ │ └── test-folder │ │ │ ├── .acl │ │ │ ├── group-listing-error.ttl │ │ │ ├── group-listing.ttl │ │ │ └── some-other-file.txt │ │ ├── multi-server │ │ ├── protected.txt │ │ └── protected.txt.acl │ │ ├── no-acl │ │ └── test-file.html │ │ ├── no-control │ │ └── .acl │ │ ├── origin │ │ └── .acl │ │ ├── owner-only │ │ └── .acl │ │ ├── read-acl │ │ ├── .acl │ │ └── deeper-tree │ │ │ ├── .acl │ │ │ └── acls-only-on-top │ │ │ └── example.ttl │ │ └── write-acl │ │ ├── .acl │ │ ├── bad-acl-access │ │ └── .acl │ │ ├── empty-acl │ │ ├── .acl │ │ └── another-empty-folder │ │ │ └── .acl │ │ └── test-file$.txt ├── accounts-scenario │ ├── alice │ │ ├── .acl-override │ │ ├── db │ │ │ └── oidc │ │ │ │ └── op │ │ │ │ └── provider.json │ │ ├── private-for-alice.txt │ │ ├── private-for-alice.txt.acl │ │ └── profile │ │ │ └── card$.ttl │ ├── bob │ │ ├── .acl-override │ │ ├── db │ │ │ └── oidc │ │ │ │ └── op │ │ │ │ └── provider.json │ │ ├── profile │ │ │ └── card$.ttl │ │ ├── shared-with-alice.txt │ │ └── shared-with-alice.txt.acl │ └── charlie │ │ ├── db │ │ └── oidc │ │ │ └── op │ │ │ └── provider.json │ │ └── profile │ │ └── card$.ttl ├── accounts-strict-origin-off │ ├── alice │ │ ├── .acl-override │ │ ├── db │ │ │ └── oidc │ │ │ │ └── op │ │ │ │ └── provider.json │ │ ├── private-for-alice.txt │ │ ├── private-for-alice.txt.acl │ │ └── profile │ │ │ └── card$.ttl │ └── bob │ │ ├── .acl-override │ │ ├── db │ │ └── oidc │ │ │ └── op │ │ │ └── provider.json │ │ ├── shared-with-alice.txt │ │ └── shared-with-alice.txt.acl ├── accounts │ ├── alice.localhost │ │ └── profile │ │ │ └── card │ ├── db │ │ └── oidc │ │ │ └── op │ │ │ └── provider.json │ ├── errortests │ │ ├── .acl-override │ │ └── public │ │ │ └── .acl │ ├── localhost │ │ ├── api │ │ │ └── .acl │ │ ├── samplePublicContainer │ │ │ ├── .acl │ │ │ └── nicola.jpg │ │ └── sampleUser1Container │ │ │ └── .acl │ └── tim.localhost │ │ ├── .acl │ │ ├── hello.html │ │ └── profile │ │ └── card ├── acl-tls │ ├── config │ │ ├── templates │ │ │ ├── emails │ │ │ │ ├── delete-account.js │ │ │ │ ├── invalid-username.js │ │ │ │ ├── reset-password.js │ │ │ │ └── welcome.js │ │ │ ├── new-account │ │ │ │ ├── .acl │ │ │ │ ├── .meta │ │ │ │ ├── .meta.acl │ │ │ │ ├── .well-known │ │ │ │ │ └── .acl │ │ │ │ ├── favicon.ico │ │ │ │ ├── favicon.ico.acl │ │ │ │ ├── inbox │ │ │ │ │ └── .acl │ │ │ │ ├── private │ │ │ │ │ └── .acl │ │ │ │ ├── profile │ │ │ │ │ ├── .acl │ │ │ │ │ └── card$.ttl │ │ │ │ ├── public │ │ │ │ │ └── .acl │ │ │ │ ├── robots.txt │ │ │ │ ├── robots.txt.acl │ │ │ │ └── settings │ │ │ │ │ ├── .acl │ │ │ │ │ ├── prefs.ttl │ │ │ │ │ ├── privateTypeIndex.ttl │ │ │ │ │ ├── publicTypeIndex.ttl │ │ │ │ │ ├── publicTypeIndex.ttl.acl │ │ │ │ │ ├── serverSide.ttl.acl │ │ │ │ │ └── serverSide.ttl.inactive │ │ │ └── server │ │ │ │ ├── .acl │ │ │ │ ├── .well-known │ │ │ │ └── .acl │ │ │ │ ├── favicon.ico │ │ │ │ ├── favicon.ico.acl │ │ │ │ ├── index.html │ │ │ │ ├── robots.txt │ │ │ │ └── robots.txt.acl │ │ └── views │ │ │ ├── account │ │ │ ├── account-deleted.hbs │ │ │ ├── delete-confirm.hbs │ │ │ ├── delete-link-sent.hbs │ │ │ ├── delete.hbs │ │ │ ├── invalid-username.hbs │ │ │ ├── register-disabled.hbs │ │ │ ├── register-form.hbs │ │ │ └── register.hbs │ │ │ ├── auth │ │ │ ├── auth-hidden-fields.hbs │ │ │ ├── change-password.hbs │ │ │ ├── goodbye.hbs │ │ │ ├── login-required.hbs │ │ │ ├── login-tls.hbs │ │ │ ├── login-username-password.hbs │ │ │ ├── login.hbs │ │ │ ├── no-permission.hbs │ │ │ ├── password-changed.hbs │ │ │ ├── reset-link-sent.hbs │ │ │ ├── reset-password.hbs │ │ │ └── sharing.hbs │ │ │ └── shared │ │ │ ├── create-account.hbs │ │ │ └── error.hbs │ ├── localhost │ │ ├── .acl │ │ ├── .well-known │ │ │ └── .acl │ │ ├── favicon.ico │ │ ├── favicon.ico.acl │ │ ├── index.html │ │ ├── robots.txt │ │ └── robots.txt.acl │ ├── tim.localhost │ │ ├── .acl │ │ ├── append-acl │ │ │ ├── abc.ttl │ │ │ ├── abc.ttl.acl │ │ │ ├── abc2.ttl │ │ │ └── abc2.ttl.acl │ │ ├── append-inherited │ │ │ └── .acl │ │ ├── empty-acl │ │ │ └── .acl │ │ ├── fake-account │ │ │ ├── .acl │ │ │ └── hello.html │ │ ├── no-acl │ │ │ └── test-file.html │ │ ├── origin │ │ │ └── .acl │ │ ├── owner-only │ │ │ └── .acl │ │ ├── profile │ │ │ ├── .acl │ │ │ └── card$.ttl │ │ └── read-acl │ │ │ └── .acl │ └── write-acl │ │ ├── .acl │ │ ├── empty-acl │ │ └── .acl │ │ └── test-file$.ttl ├── auth-proxy │ ├── .acl │ ├── index.html │ └── index.html.acl ├── config │ ├── defaults.js │ ├── templates │ └── views ├── empty.spatch ├── errorPages │ ├── 401.html │ ├── 403.html │ ├── 404.html │ ├── 405.html │ ├── 415.html │ └── 500.html ├── example_spkac.cnf ├── external-servers │ └── example.com │ │ ├── jwks.json │ │ └── openid-configuration.json ├── headers │ ├── .acl │ ├── index.html │ ├── public-ra │ ├── public-ra.acl │ ├── user-rw-public-r │ ├── user-rw-public-r.acl │ ├── user-rwac-public-0 │ └── user-rwac-public-0.acl ├── hello.html ├── invalid1.ttl ├── invalid2.ttl ├── ldpatch-example-final.ttl ├── ldpatch-example-initial.ttl ├── ldpatch-example-patch-1.spatch ├── ldpatch-example-patch-2.spatch ├── ldpatch-example-patch-3.spatch ├── ldpatch-example-patch.ldpatch ├── ldpatch-example-patch.spatch ├── lennon.jsonld ├── lfs-0.sparql ├── lfs-1-final.json ├── lfs-1.sparql ├── messaging-scenario │ └── user1.databox.me │ │ └── profile │ │ └── card ├── nicola.jpg ├── patch-1-initial.ttl ├── patch-2-final.ttl ├── patch-2-initial.ttl ├── patch-2.spatch ├── patch-2n.spatch ├── patch-3-final.ttl ├── patch-4-final.ttl ├── patch-5-final.ttl ├── patch-5-initial.ttl ├── patch-5.spatch ├── patch │ ├── .acl │ ├── append-only.ttl │ ├── append-only.ttl.acl │ ├── index.html │ ├── read-append.ttl │ ├── read-append.ttl.acl │ ├── read-only.ttl │ ├── read-only.ttl.acl │ ├── read-write.ttl │ ├── read-write.ttl.acl │ ├── write-only.ttl │ └── write-only.ttl.acl ├── put-input-2.html ├── put-input.txt ├── sampleContainer │ ├── blank │ ├── cert.pkcs │ ├── example1.ttl │ ├── example2.ttl │ ├── example3.ttl │ ├── example4$.ttl │ ├── filename with spaces.txt │ ├── index.html │ ├── post2.ttl │ ├── put1.ttl │ ├── solid.png │ ├── user1.pfx │ └── user2.pfx ├── sampleContainer2 │ ├── example1.ttl │ └── example2.ttl └── timbl.jpg ├── scenarios.md ├── settings └── serverSide.ttl ├── surface ├── docker │ ├── cookie │ │ ├── .dockerignore │ │ ├── Dockerfile │ │ └── app │ │ │ ├── index.js │ │ │ ├── package-lock.json │ │ │ └── package.json │ ├── server │ │ ├── .db │ │ │ └── oidc │ │ │ │ ├── op │ │ │ │ └── clients │ │ │ │ │ ├── _key_7e5c0fede7682892e36b2ef3ecda05a6.json │ │ │ │ │ ├── _key_coolApp1.json │ │ │ │ │ └── _key_coolApp2.json │ │ │ │ ├── rp │ │ │ │ └── clients │ │ │ │ │ └── _key_https%3A%2F%2Fserver.json │ │ │ │ └── users │ │ │ │ ├── users-by-email │ │ │ │ └── _key_alice%40pdsinterop.org.json │ │ │ │ └── users │ │ │ │ ├── _key_server%2Fprofile%2Fcard%23me.json │ │ │ │ └── _key_thirdparty%2Fprofile%2Fcard%23me.json │ │ ├── .dockerignore │ │ ├── Dockerfile │ │ ├── config.json │ │ ├── config │ │ │ ├── defaults.js │ │ │ ├── templates │ │ │ │ ├── emails │ │ │ │ │ ├── delete-account.js │ │ │ │ │ ├── invalid-username.js │ │ │ │ │ ├── reset-password.js │ │ │ │ │ └── welcome.js │ │ │ │ ├── new-account │ │ │ │ │ ├── .acl │ │ │ │ │ ├── .meta │ │ │ │ │ ├── .meta.acl │ │ │ │ │ ├── .well-known │ │ │ │ │ │ └── .acl │ │ │ │ │ ├── favicon.ico │ │ │ │ │ ├── favicon.ico.acl │ │ │ │ │ ├── inbox │ │ │ │ │ │ └── .acl │ │ │ │ │ ├── private │ │ │ │ │ │ └── .acl │ │ │ │ │ ├── profile │ │ │ │ │ │ ├── .acl │ │ │ │ │ │ └── card$.ttl │ │ │ │ │ ├── public │ │ │ │ │ │ └── .acl │ │ │ │ │ ├── robots.txt │ │ │ │ │ ├── robots.txt.acl │ │ │ │ │ └── settings │ │ │ │ │ │ ├── .acl │ │ │ │ │ │ ├── prefs.ttl │ │ │ │ │ │ ├── privateTypeIndex.ttl │ │ │ │ │ │ ├── publicTypeIndex.ttl │ │ │ │ │ │ ├── publicTypeIndex.ttl.acl │ │ │ │ │ │ ├── serverSide.ttl.acl │ │ │ │ │ │ └── serverSide.ttl.inactive │ │ │ │ └── server │ │ │ │ │ ├── .acl │ │ │ │ │ ├── .well-known │ │ │ │ │ └── .acl │ │ │ │ │ ├── favicon.ico │ │ │ │ │ ├── favicon.ico.acl │ │ │ │ │ ├── index.html │ │ │ │ │ ├── robots.txt │ │ │ │ │ └── robots.txt.acl │ │ │ ├── usernames-blacklist.json │ │ │ └── views │ │ │ │ ├── account │ │ │ │ ├── account-deleted.hbs │ │ │ │ ├── delete-confirm.hbs │ │ │ │ ├── delete-link-sent.hbs │ │ │ │ ├── delete.hbs │ │ │ │ ├── invalid-username.hbs │ │ │ │ ├── register-disabled.hbs │ │ │ │ ├── register-form.hbs │ │ │ │ └── register.hbs │ │ │ │ ├── auth │ │ │ │ ├── auth-hidden-fields.hbs │ │ │ │ ├── change-password.hbs │ │ │ │ ├── goodbye.hbs │ │ │ │ ├── login-required.hbs │ │ │ │ ├── login-tls.hbs │ │ │ │ ├── login-username-password.hbs │ │ │ │ ├── login.hbs │ │ │ │ ├── no-permission.hbs │ │ │ │ ├── password-changed.hbs │ │ │ │ ├── reset-link-sent.hbs │ │ │ │ ├── reset-password.hbs │ │ │ │ └── sharing.hbs │ │ │ │ └── shared │ │ │ │ ├── create-account.hbs │ │ │ │ └── error.hbs │ │ ├── data │ │ │ ├── .acl │ │ │ ├── .meta │ │ │ ├── .meta.acl │ │ │ ├── .well-known │ │ │ │ └── .acl │ │ │ ├── favicon.ico │ │ │ ├── favicon.ico.acl │ │ │ ├── inbox │ │ │ │ └── .acl │ │ │ ├── index.html │ │ │ ├── private │ │ │ │ └── .acl │ │ │ ├── profile │ │ │ │ ├── .acl │ │ │ │ └── card$.ttl │ │ │ ├── public │ │ │ │ └── .acl │ │ │ ├── robots.txt │ │ │ ├── robots.txt.acl │ │ │ └── settings │ │ │ │ ├── .acl │ │ │ │ ├── prefs.ttl │ │ │ │ ├── privateTypeIndex.ttl │ │ │ │ ├── publicTypeIndex.ttl │ │ │ │ ├── publicTypeIndex.ttl.acl │ │ │ │ ├── serverSide.ttl │ │ │ │ ├── serverSide.ttl.acl │ │ │ │ └── serverSide.ttl.inactive │ │ └── env.list │ ├── solid-crud │ │ └── Dockerfile │ ├── web-access-control │ │ └── Dockerfile │ └── webid-provider │ │ └── Dockerfile ├── run-solid-test-suite.sh ├── server-env.list ├── solid-crud-tests-env.list ├── thirdparty-config.json ├── thirdparty-env.list ├── web-access-control-tests-env.list └── webid-provider-tests-env.list ├── unit ├── account-manager-test.js ├── account-template-test.js ├── acl-checker-test.js ├── add-cert-request-test.js ├── auth-handlers-test.js ├── auth-proxy-test.js ├── auth-request-test.js ├── authenticator-test.js ├── blacklist-service-test.js ├── create-account-request-test.js ├── delete-account-confirm-request-test.js ├── delete-account-request-test.js ├── email-service-test.js ├── email-welcome-test.js ├── error-pages-test.js ├── force-user-test.js ├── login-request-test.js ├── oidc-manager-test.js ├── options.js ├── password-authenticator-test.js ├── password-change-request-test.js ├── password-reset-email-request-test.js ├── resource-mapper-test.js ├── solid-host-test.js ├── tls-authenticator-test.js ├── token-service-test.js ├── user-account-test.js ├── user-accounts-api-test.js ├── user-utils-test.js └── utils-test.js ├── utils.js └── validate-turtle.js /.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the root 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | <#public> 6 | a acl:Authorization; 7 | acl:agentClass foaf:Agent; # everyone 8 | acl:accessTo ; 9 | acl:default ; 10 | acl:mode acl:Read. 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Keep this in sync with .npmignore 2 | *.swp 3 | *~ 4 | /.idea 5 | /.nyc_output 6 | /.tern-port 7 | /.db 8 | /accounts 9 | /config.json 10 | /config/account-template 11 | /config/email-templates 12 | /config/templates 13 | /config/views 14 | /data 15 | /coverage 16 | /node_modules 17 | /npm-debug.log 18 | .history/ -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Keep this in sync with .gitignore 2 | *.swp 3 | *~ 4 | /.idea 5 | /.nyc_output 6 | /.tern-port 7 | /.db 8 | /accounts 9 | /config.json 10 | /config/account-template 11 | /config/email-templates 12 | /config/templates 13 | /config/views 14 | /data 15 | /coverage 16 | /node_modules 17 | /npm-debug.log 18 | 19 | # Additional .npmignore entries (not in .gitignore) 20 | /test 21 | /docker-image 22 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v18.19.0 2 | -------------------------------------------------------------------------------- /.well-known/.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default .well-known/ resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:lts 2 | 3 | # build 4 | RUN mkdir -p /usr/src/app 5 | WORKDIR /usr/src/app 6 | COPY package.json /usr/src/app/ 7 | COPY package-lock.json /usr/src/app/ 8 | RUN npm install 9 | COPY . /usr/src/app 10 | 11 | # start 12 | EXPOSE 8443 13 | COPY config.json-default config.json 14 | RUN openssl req \ 15 | -new \ 16 | -newkey rsa:4096 \ 17 | -days 365 \ 18 | -nodes \ 19 | -x509 \ 20 | -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \ 21 | -keyout privkey.pem \ 22 | -out fullchain.pem 23 | CMD npm run solid start 24 | -------------------------------------------------------------------------------- /bin/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": "/Users/imyshor/Projects/solid/solidos/workspaces/node-solid-server/bin/data", 3 | "port": "8443", 4 | "serverUri": "https://localhost:8443", 5 | "webid": false, 6 | "mount": "/", 7 | "configPath": "./config", 8 | "configFile": "./config.json", 9 | "dbPath": "./.db", 10 | "sslKey": "../", 11 | "sslCert": "../", 12 | "multiuser": false, 13 | "server": { 14 | "name": "localhost", 15 | "description": "", 16 | "logo": "" 17 | } 18 | } -------------------------------------------------------------------------------- /bin/solid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env -S node --experimental-require-module 2 | const startCli = require('./lib/cli') 3 | startCli() 4 | -------------------------------------------------------------------------------- /bin/solid-test: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | COMMAND=$1 3 | ADD_FLAGS= 4 | shift 5 | 6 | # Disable rejectUnauthorized when starting the server 7 | if [ "$COMMAND" == "start" ]; then 8 | ADD_FLAGS="--no-reject-unauthorized" 9 | export NODE_TLS_REJECT_UNAUTHORIZED=0 10 | fi 11 | 12 | exec `dirname "$0"`/solid $COMMAND $ADD_FLAGS $@ 13 | -------------------------------------------------------------------------------- /bin/solid.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env -S node --experimental-require-module 2 | const startCli = require('./lib/cli') 3 | startCli() 4 | -------------------------------------------------------------------------------- /common/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/common/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /common/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/common/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /common/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/common/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /common/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/common/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /common/img/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/common/img/.gitkeep -------------------------------------------------------------------------------- /common/well-known/security.txt: -------------------------------------------------------------------------------- 1 | # Report security issues responsibly 2 | Contact: admin+security@inrupt.com 3 | -------------------------------------------------------------------------------- /config.json-default: -------------------------------------------------------------------------------- 1 | { 2 | "root": "./data", 3 | "port": "8443", 4 | "serverUri": "https://localhost:8443", 5 | "webid": true, 6 | "mount": "/", 7 | "configPath": "./config", 8 | "dbPath": "./.db", 9 | "sslKey": "./privkey.pem", 10 | "sslCert": "./fullchain.pem", 11 | "multiuser": true, 12 | "corsProxy": "/proxy", 13 | "server": { 14 | "name": "", 15 | "description": "", 16 | "logo": "" 17 | }, 18 | "enforceToc": true, 19 | "disablePasswordChecks": false, 20 | "tocUri": "https://your-toc", 21 | "supportEmail": "Your support email address" 22 | } 23 | -------------------------------------------------------------------------------- /config/defaults.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | auth: 'oidc', 5 | localAuth: { 6 | tls: true, 7 | password: true 8 | }, 9 | configPath: './config', 10 | dbPath: './.db', 11 | port: 8443, 12 | serverUri: 'https://localhost:8443', 13 | webid: true, 14 | strictOrigin: true, 15 | trustedOrigins: [], 16 | dataBrowserPath: 'default' 17 | 18 | // For use in Enterprises to configure a HTTP proxy for all outbound HTTP requests from the SOLID server (we use 19 | // https://www.npmjs.com/package/global-tunnel-ng). 20 | // "httpProxy": { 21 | // "tunnel": "neither", 22 | // "host": "proxy.example.com", 23 | // "port": 12345 24 | // } 25 | } 26 | -------------------------------------------------------------------------------- /config/usernames-blacklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "useTheBigUsernameBlacklist": true, 3 | "customBlacklistedUsernames": [] 4 | } 5 | -------------------------------------------------------------------------------- /default-templates/emails/invalid-username.js: -------------------------------------------------------------------------------- 1 | module.exports.render = render 2 | 3 | function render (data) { 4 | return { 5 | subject: `Invalid username for account ${data.accountUri}`, 6 | 7 | /** 8 | * Text version 9 | */ 10 | text: `Hi, 11 | 12 | We're sorry to inform you that the username for account ${data.accountUri} is not allowed after changes to username policy. 13 | 14 | This account has been set to be deleted at ${data.dateOfRemoval}. 15 | 16 | ${data.supportEmail ? `Please contact ${data.supportEmail} if you want to move your account.` : ''}`, 17 | 18 | /** 19 | * HTML version 20 | */ 21 | html: `

Hi,

22 | 23 |

We're sorry to inform you that the username for account ${data.accountUri} is not allowed after changes to username policy.

24 | 25 |

This account has been set to be deleted at ${data.dateOfRemoval}.

26 | 27 | ${data.supportEmail ? `

Please contact ${data.supportEmail} if you want to move your account.

` : ''} 28 | ` 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /default-templates/emails/welcome.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /** 4 | * Returns a partial Email object (minus the `to` and `from` properties), 5 | * suitable for sending with Nodemailer. 6 | * 7 | * Used to send a Welcome email after a new user account has been created. 8 | * 9 | * @param data {Object} 10 | * 11 | * @param data.webid {string} 12 | * 13 | * @return {Object} 14 | */ 15 | function render (data) { 16 | return { 17 | subject: 'Welcome to Solid', 18 | 19 | /** 20 | * Text version of the Welcome email 21 | */ 22 | text: `Welcome to Solid! 23 | 24 | Your account has been created. 25 | 26 | Your Web Id: ${data.webid}`, 27 | 28 | /** 29 | * HTML version of the Welcome email 30 | */ 31 | html: `

Welcome to Solid!

32 | 33 |

Your account has been created.

34 | 35 |

Your Web Id: ${data.webid}

` 36 | } 37 | } 38 | 39 | module.exports.render = render 40 | -------------------------------------------------------------------------------- /default-templates/new-account/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the user account 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The homepage is readable by the public 6 | <#public> 7 | a acl:Authorization; 8 | acl:agentClass foaf:Agent; 9 | acl:accessTo ; 10 | acl:mode acl:Read. 11 | 12 | # The owner has full access to every resource in their pod. 13 | # Other agents have no access rights, 14 | # unless specifically authorized in other .acl resources. 15 | <#owner> 16 | a acl:Authorization; 17 | acl:agent <{{webId}}>; 18 | # Optional owner email, to be used for account recovery: 19 | {{#if email}}acl:agent ;{{/if}} 20 | # Set the access to the root storage folder itself 21 | acl:accessTo ; 22 | # All resources will inherit this authorization, by default 23 | acl:default ; 24 | # The owner has all of the access modes allowed 25 | acl:mode 26 | acl:Read, acl:Write, acl:Control. 27 | -------------------------------------------------------------------------------- /default-templates/new-account/.meta: -------------------------------------------------------------------------------- 1 | # Root Meta resource for the user account 2 | # Used to discover the account's WebID URI, given the account URI 3 | <{{webId}}> 4 | 5 | . 6 | -------------------------------------------------------------------------------- /default-templates/new-account/.meta.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the Root Meta 2 | # Should be public-readable (since the root meta is used for WebID discovery) 3 | 4 | @prefix acl: . 5 | @prefix foaf: . 6 | 7 | <#owner> 8 | a acl:Authorization; 9 | 10 | acl:agent 11 | <{{webId}}>; 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode 16 | acl:Read, acl:Write, acl:Control. 17 | 18 | <#public> 19 | a acl:Authorization; 20 | 21 | acl:agentClass foaf:Agent; # everyone 22 | 23 | acl:accessTo ; 24 | 25 | acl:mode acl:Read. 26 | -------------------------------------------------------------------------------- /default-templates/new-account/.well-known/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the well-known folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent <{{webId}}>; 9 | acl:accessTo <./>; 10 | acl:default <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:default <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /default-templates/new-account/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/default-templates/new-account/favicon.ico -------------------------------------------------------------------------------- /default-templates/new-account/favicon.ico.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default favicon.ico resource 2 | # Individual users will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#owner> 9 | a acl:Authorization; 10 | 11 | acl:agent 12 | <{{webId}}>; 13 | 14 | acl:accessTo ; 15 | 16 | acl:mode 17 | acl:Read, acl:Write, acl:Control. 18 | 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo ; 25 | 26 | acl:mode acl:Read. 27 | -------------------------------------------------------------------------------- /default-templates/new-account/inbox/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the profile Inbox 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | <#owner> 7 | a acl:Authorization; 8 | 9 | acl:agent 10 | <{{webId}}>; 11 | 12 | acl:accessTo <./>; 13 | acl:default <./>; 14 | 15 | acl:mode 16 | acl:Read, acl:Write, acl:Control. 17 | 18 | # Public-appendable but NOT public-readable 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo <./>; 25 | 26 | acl:mode acl:Append. 27 | -------------------------------------------------------------------------------- /default-templates/new-account/private/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the private folder 2 | @prefix acl: . 3 | 4 | # The owner has all permissions 5 | <#owner> 6 | a acl:Authorization; 7 | acl:agent <{{webId}}>; 8 | acl:accessTo <./>; 9 | acl:default <./>; 10 | acl:mode acl:Read, acl:Write, acl:Control. 11 | -------------------------------------------------------------------------------- /default-templates/new-account/profile/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the profile folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent <{{webId}}>; 9 | acl:accessTo <./>; 10 | acl:default <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:default <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /default-templates/new-account/profile/card$.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | @prefix foaf: . 3 | @prefix pim: . 4 | @prefix schema: . 5 | @prefix ldp: . 6 | 7 | <> 8 | a foaf:PersonalProfileDocument ; 9 | foaf:maker <{{webId}}> ; 10 | foaf:primaryTopic <{{webId}}> . 11 | 12 | <{{webId}}> 13 | a foaf:Person ; 14 | a schema:Person ; 15 | 16 | foaf:name "{{name}}" ; 17 | 18 | solid:account ; # link to the account uri 19 | pim:storage ; # root storage 20 | solid:oidcIssuer <{{idp}}> ; # identity provider 21 | 22 | ldp:inbox ; 23 | 24 | pim:preferencesFile ; # private settings/preferences 25 | solid:publicTypeIndex ; 26 | solid:privateTypeIndex . 27 | -------------------------------------------------------------------------------- /default-templates/new-account/public/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the public folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent <{{webId}}>; 9 | acl:accessTo <./>; 10 | acl:default <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:default <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /default-templates/new-account/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | # Allow all crawling (subject to ACLs as usual, of course) 3 | Disallow: 4 | -------------------------------------------------------------------------------- /default-templates/new-account/robots.txt.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default robots.txt resource 2 | # Individual users will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#owner> 9 | a acl:Authorization; 10 | 11 | acl:agent 12 | <{{webId}}>; 13 | 14 | acl:accessTo ; 15 | 16 | acl:mode 17 | acl:Read, acl:Write, acl:Control. 18 | 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo ; 25 | 26 | acl:mode acl:Read. 27 | -------------------------------------------------------------------------------- /default-templates/new-account/settings/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the /settings/ container 2 | @prefix acl: . 3 | 4 | <#owner> 5 | a acl:Authorization; 6 | 7 | acl:agent 8 | <{{webId}}>; 9 | 10 | # Set the access to the root storage folder itself 11 | acl:accessTo <./>; 12 | 13 | # All settings resources will be private, by default, unless overridden 14 | acl:default <./>; 15 | 16 | # The owner has all of the access modes allowed 17 | acl:mode 18 | acl:Read, acl:Write, acl:Control. 19 | 20 | # Private, no public access modes 21 | -------------------------------------------------------------------------------- /default-templates/new-account/settings/prefs.ttl: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix pim: . 3 | @prefix foaf: . 4 | @prefix solid: . 5 | 6 | <> 7 | a pim:ConfigurationFile; 8 | 9 | dct:title "Preferences file" . 10 | 11 | {{#if email}}<{{webId}}> foaf:mbox .{{/if}} 12 | 13 | <{{webId}}> 14 | solid:publicTypeIndex ; 15 | solid:privateTypeIndex . 16 | -------------------------------------------------------------------------------- /default-templates/new-account/settings/privateTypeIndex.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | <> 3 | a solid:TypeIndex ; 4 | a solid:UnlistedDocument. 5 | -------------------------------------------------------------------------------- /default-templates/new-account/settings/publicTypeIndex.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | <> 3 | a solid:TypeIndex ; 4 | a solid:ListedDocument. 5 | -------------------------------------------------------------------------------- /default-templates/new-account/settings/publicTypeIndex.ttl.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the Public Type Index 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | <#owner> 7 | a acl:Authorization; 8 | 9 | acl:agent 10 | <{{webId}}>; 11 | 12 | acl:accessTo <./publicTypeIndex.ttl>; 13 | 14 | acl:mode 15 | acl:Read, acl:Write, acl:Control. 16 | 17 | # Public-readable 18 | <#public> 19 | a acl:Authorization; 20 | 21 | acl:agentClass foaf:Agent; # everyone 22 | 23 | acl:accessTo <./publicTypeIndex.ttl>; 24 | 25 | acl:mode acl:Read. 26 | -------------------------------------------------------------------------------- /default-templates/new-account/settings/serverSide.ttl.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | @prefix foaf: . 3 | 4 | <#owner> 5 | a acl:Authorization; 6 | 7 | acl:agent 8 | <{{webId}}>; 9 | 10 | acl:accessTo <./serverSide.ttl>; 11 | 12 | acl:mode acl:Read . 13 | 14 | -------------------------------------------------------------------------------- /default-templates/new-account/settings/serverSide.ttl.inactive: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix pim: . 3 | @prefix solid: . 4 | 5 | <> 6 | a pim:ConfigurationFile; 7 | 8 | dct:description "Administrative settings for the POD that the user can only read." . 9 | 10 | 11 | solid:storageQuota "25000000" . 12 | 13 | -------------------------------------------------------------------------------- /default-templates/server/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the root 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | <#public> 6 | a acl:Authorization; 7 | acl:agentClass foaf:Agent; # everyone 8 | acl:accessTo ; 9 | acl:default ; 10 | acl:mode acl:Read. 11 | -------------------------------------------------------------------------------- /default-templates/server/.well-known/.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default .well-known/ resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /default-templates/server/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/default-templates/server/favicon.ico -------------------------------------------------------------------------------- /default-templates/server/favicon.ico.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default favicon.ico resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /default-templates/server/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | # Allow all crawling (subject to ACLs as usual, of course) 3 | Disallow: 4 | -------------------------------------------------------------------------------- /default-templates/server/robots.txt.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default robots.txt resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /default-views/account/account-deleted.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Account Deleted 7 | 8 | 9 | 10 |
11 |

Account Deleted

12 |
13 |
14 |

Your account has been deleted.

15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /default-views/account/delete-link-sent.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Delete Account Link Sent 7 | 8 | 9 | 10 |
11 |

Confirm account deletion

12 |
13 |
14 |

A link to confirm the deletion of this account has been sent to your email.

15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /default-views/account/invalid-username.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Invalid username 7 | 8 | 9 | 10 |
11 |

Invalid username

12 |
13 |
14 |

We're sorry to inform you that this account's username ({{username}}) is not allowed after changes to username policy.

15 |

This account has been set to be deleted at {{dateOfRemoval}}.

16 | {{#if supportEmail}} 17 |

Please contact {{supportEmail}} if you want to move your account.

18 | {{/if}} 19 |

If you had an email address connected to this account, you should have received an email about this.

20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /default-views/account/register-disabled.hbs: -------------------------------------------------------------------------------- 1 |
2 |

3 | Registering a new account is disabled for the WebID-TLS authentication method. 4 | Please restart the server using another mode. 5 |

6 |
7 | -------------------------------------------------------------------------------- /default-views/account/register.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Register 7 | 8 | 9 | 10 | 11 |
12 | 13 | 16 | 17 | {{#if registerDisabled}} 18 | {{> account/register-disabled}} 19 | {{else}} 20 | {{> account/register-form}} 21 | {{/if}} 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /default-views/auth/auth-hidden-fields.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /default-views/auth/goodbye.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Logged Out 7 | 8 | 9 | 10 | 11 |
12 |
13 |

Logout

14 |
15 | 16 |
17 |

You have successfully logged out.

18 |
19 | 20 | Login Again 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /default-views/auth/login-tls.hbs: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /default-views/auth/no-permission.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | No permission 7 | 8 | 9 | 10 | 11 |
12 | 15 |
16 |

17 | You are currently logged in as {{webId}}, 18 | but do not have permission to access {{currentUrl}}. 19 |

20 |

21 | 22 |

23 |
24 |
25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /default-views/auth/password-changed.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Password Changed 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 |
17 |

Your password has been changed.

18 |
19 | 20 |

21 | 22 | Log in 23 | 24 |

25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /default-views/auth/reset-link-sent.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Reset Link Sent 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 |
17 |

A Reset Password link has been sent to the associated email account.

18 |
19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /default-views/shared/create-account.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 | New to Solid? 4 | 5 | Create an account 6 | 7 |
8 |
9 | -------------------------------------------------------------------------------- /default-views/shared/error.hbs: -------------------------------------------------------------------------------- 1 | {{#if error}} 2 |
3 |

{{error}}

4 |
5 | {{/if}} 6 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | solid-server: 4 | build: . 5 | container_name: solid 6 | ports: 7 | - "8443:8443" 8 | entrypoint: npm run solid start -- --no-reject-unauthorized 9 | environment: 10 | - NODE_TLS_REJECT_UNAUTHORIZED=0 11 | -------------------------------------------------------------------------------- /docker-image/.dockerignore: -------------------------------------------------------------------------------- 1 | test/ 2 | .pytest_cache/ 3 | .idea -------------------------------------------------------------------------------- /docker-image/.gitignore: -------------------------------------------------------------------------------- 1 | .pytest_cache/ 2 | __pycache__ 3 | *.pyc 4 | data/ 5 | -------------------------------------------------------------------------------- /docker-image/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | If you want to experiment with the image and/or contribute to its development, 4 | please read this document. 5 | 6 | ## Run tests 7 | 8 | ```bash 9 | make test 10 | ``` 11 | 12 | The first run might take a while, since the image has to be build. Follow up test runs will be faster. 13 | 14 | ## Start & stop locally 15 | 16 | Build and run a local container named solid-server via 17 | 18 | ```bash 19 | make start 20 | ``` 21 | 22 | and stop it via 23 | 24 | ```bash 25 | make stop 26 | ``` 27 | 28 | ## Inspect & debug 29 | 30 | To start a shell in a running container (started with `make start`) run `make attach`. 31 | 32 | To just run a shell in the built image (without starting solid) run `make inspect`. 33 | 34 | -------------------------------------------------------------------------------- /docker-image/src/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:20-alpine 2 | 3 | # hadolint ignore=DL3018 4 | RUN apk add --no-cache openssl 5 | 6 | ARG SOLID_SERVER_VERSION=latest 7 | RUN npm install -g solid-server@${SOLID_SERVER_VERSION} 8 | 9 | # image configuration 10 | ENV SOLID_HOME=/opt/solid 11 | ENV PROCESS_USER=node 12 | ENV TEMPORARY_CERT_NAME=solid-temporary 13 | 14 | WORKDIR ${SOLID_HOME} 15 | COPY ./entrypoint.sh ./entrypoint.sh 16 | COPY ./checks.sh ./checks.sh 17 | COPY ./create-temporary-cert.sh ./create-temporary-cert.sh 18 | RUN chown --recursive ${PROCESS_USER}:${PROCESS_USER} ${SOLID_HOME} 19 | 20 | USER ${PROCESS_USER} 21 | 22 | # solid configuration 23 | ENV SOLID_ROOT=${SOLID_HOME}/data 24 | ENV SOLID_SSL_KEY=${SOLID_HOME}/${TEMPORARY_CERT_NAME}.key 25 | ENV SOLID_SSL_CERT=${SOLID_HOME}/${TEMPORARY_CERT_NAME}.crt 26 | ENV SOLID_PORT=8443 27 | ENV SOLID_CORS_PROXY=false 28 | ENV DEBUG=solid:* 29 | 30 | VOLUME $SOLID_HOME 31 | 32 | ENTRYPOINT ["./entrypoint.sh"] 33 | 34 | CMD ["start"] 35 | -------------------------------------------------------------------------------- /docker-image/src/create-temporary-cert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | NAME=$1 5 | 6 | if [ -z $NAME ]; then 7 | echo "Usage: ./create-temporary-cert.sh some-name" 8 | exit 1 9 | fi 10 | 11 | openssl req -nodes -x509 -days 3 -newkey rsa:2048 \ 12 | -keyout ./$NAME.key \ 13 | -out ./$NAME.crt \ 14 | -subj "/O=$NAME/OU=$NAME/CN=$NAME" 15 | -------------------------------------------------------------------------------- /docker-image/src/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | ./create-temporary-cert.sh ${TEMPORARY_CERT_NAME} 6 | ./checks.sh 7 | 8 | solid "$@" 9 | -------------------------------------------------------------------------------- /docker-image/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/docker-image/test/__init__.py -------------------------------------------------------------------------------- /docker-image/test/conftest.py: -------------------------------------------------------------------------------- 1 | import docker 2 | import pytest 3 | import os 4 | 5 | 6 | @pytest.fixture(scope="session") 7 | def client(): 8 | return docker.from_env() 9 | 10 | 11 | @pytest.fixture(scope="session") 12 | def image(client): 13 | img, _ = client.images.build(path='./src', dockerfile='Dockerfile', 14 | buildargs={"SOLID_SERVER_VERSION": os.environ['SOLID_SERVER_VERSION']}) 15 | return img 16 | -------------------------------------------------------------------------------- /docker-image/test/wait_for_container.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | def wait_for_container(container, message="running on"): 4 | count = 0 5 | while (not message in str(container.logs())) and (count < 10): 6 | count = count + 1 7 | time.sleep(1) 8 | assert message in str(container.logs()), 'Expected message not present until timeout. Waited for "%s"' % message 9 | -------------------------------------------------------------------------------- /examples/custom-error-handling.js: -------------------------------------------------------------------------------- 1 | const solid = require('../') 2 | const path = require('path') 3 | 4 | solid 5 | .createServer({ 6 | webid: true, 7 | sslCert: path.resolve('../test/keys/cert.pem'), 8 | sslKey: path.resolve('../test/keys/key.pem'), 9 | errorHandler: function (err, req, res, next) { 10 | if (err.status !== 200) { 11 | console.log('Oh no! There is an error:' + err.message) 12 | res.status(err.status) 13 | 14 | // Now you can send the error how you want 15 | // Maybe you want to render an error page 16 | // res.render('errorPage.ejs', { 17 | // title: err.status + ": This is an error!", 18 | // message: err.message 19 | // }) 20 | // Or you want to respond in JSON? 21 | 22 | res.json({ 23 | title: err.status + ': This is an error!', 24 | message: err.message 25 | }) 26 | } 27 | } 28 | }) 29 | .listen(3456, function () { 30 | console.log('started ldp with webid on port ' + 3456) 31 | }) 32 | -------------------------------------------------------------------------------- /examples/ldp-with-webid.js: -------------------------------------------------------------------------------- 1 | const solid = require('../') // or require('solid') 2 | const path = require('path') 3 | 4 | solid 5 | .createServer({ 6 | webid: true, 7 | sslCert: path.resolve('../test/keys/cert.pem'), 8 | sslKey: path.resolve('../test/keys/key.pem') 9 | }) 10 | .listen(3456, function () { 11 | console.log('started ldp with webid on port ' + 3456) 12 | }) 13 | -------------------------------------------------------------------------------- /examples/simple-express-app.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const solid = require('../') // or require('solid') 3 | 4 | // Starting our express app 5 | const app = express() 6 | 7 | // My routes 8 | app.get('/', function (req, res) { 9 | console.log(req) 10 | res.send('Welcome to my server!') 11 | }) 12 | 13 | // Mounting solid on /ldp 14 | const ldp = solid() 15 | app.use('/ldp', ldp) 16 | 17 | // Starting server 18 | app.listen(3000, function () { 19 | console.log('Server started on port 3000!') 20 | }) 21 | -------------------------------------------------------------------------------- /examples/simple-ldp-server.js: -------------------------------------------------------------------------------- 1 | const solid = require('../') // or require('solid-server') 2 | 3 | // Startin solid server 4 | const ldp = solid.createServer() 5 | ldp.listen(3456, function () { 6 | console.log('Starting server on port ' + 3456) 7 | console.log('LDP will run on /') 8 | }) 9 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/favicon.ico -------------------------------------------------------------------------------- /favicon.ico.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default favicon.ico resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/create-app') 2 | module.exports.createServer = require('./lib/create-server') 3 | module.exports.startCli = require('./bin/lib/cli') 4 | -------------------------------------------------------------------------------- /lib/api/authn/force-user.js: -------------------------------------------------------------------------------- 1 | const debug = require('../../debug').authentication 2 | 3 | /** 4 | * Enforces the `--force-user` server flag, hardcoding a webid for all requests, 5 | * for testing purposes. 6 | */ 7 | function initialize (app, argv) { 8 | const forceUserId = argv.forceUser 9 | app.use('/', (req, res, next) => { 10 | debug(`Identified user (override): ${forceUserId}`) 11 | req.session.userId = forceUserId 12 | if (argv.auth === 'tls') { 13 | res.set('User', forceUserId) 14 | } 15 | next() 16 | }) 17 | } 18 | 19 | module.exports = { 20 | initialize 21 | } 22 | -------------------------------------------------------------------------------- /lib/api/authn/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | oidc: require('./webid-oidc'), 3 | tls: require('./webid-tls'), 4 | forceUser: require('./force-user.js') 5 | } 6 | -------------------------------------------------------------------------------- /lib/api/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | authn: require('./authn'), 5 | accounts: require('./accounts/user-accounts') 6 | } 7 | -------------------------------------------------------------------------------- /lib/debug.js: -------------------------------------------------------------------------------- 1 | const debug = require('debug') 2 | 3 | exports.handlers = debug('solid:handlers') 4 | exports.errors = debug('solid:errors') 5 | exports.ACL = debug('solid:ACL') 6 | exports.cache = debug('solid:cache') 7 | exports.parse = debug('solid:parse') 8 | exports.metadata = debug('solid:metadata') 9 | exports.authentication = debug('solid:authentication') 10 | exports.settings = debug('solid:settings') 11 | exports.server = debug('solid:server') 12 | exports.subscription = debug('solid:subscription') 13 | exports.container = debug('solid:container') 14 | exports.accounts = debug('solid:accounts') 15 | exports.email = debug('solid:email') 16 | exports.ldp = debug('solid:ldp') 17 | exports.fs = debug('solid:fs') 18 | exports.prep = debug('solid:prep') 19 | -------------------------------------------------------------------------------- /lib/handlers/delete.js: -------------------------------------------------------------------------------- 1 | module.exports = handler 2 | 3 | const debug = require('../debug').handlers 4 | 5 | async function handler (req, res, next) { 6 | debug('DELETE -- Request on' + req.originalUrl) 7 | 8 | const ldp = req.app.locals.ldp 9 | try { 10 | await ldp.delete(req) 11 | debug('DELETE -- Ok.') 12 | res.sendStatus(200) 13 | next() 14 | } catch (err) { 15 | debug('DELETE -- Failed to delete: ' + err) 16 | 17 | // method DELETE not allowed 18 | if (err.status === 405) { 19 | res.set('allow', 'OPTIONS, HEAD, GET, PATCH, POST, PUT') 20 | } 21 | next(err) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/handlers/patch/sparql-update-parser.js: -------------------------------------------------------------------------------- 1 | // Parses an application/sparql-update patch 2 | 3 | module.exports = parsePatchDocument 4 | 5 | const $rdf = require('rdflib') 6 | const error = require('../../http-error') 7 | 8 | // Parses the given SPARQL UPDATE document 9 | async function parsePatchDocument (targetURI, patchURI, patchText) { 10 | const baseURI = patchURI.replace(/#.*/, '') 11 | try { 12 | return $rdf.sparqlUpdateParser(patchText, $rdf.graph(), baseURI) 13 | } catch (err) { 14 | throw error(400, `Patch document syntax error: ${err}`) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/handlers/restrict-to-top-domain.js: -------------------------------------------------------------------------------- 1 | const HTTPError = require('../http-error') 2 | 3 | module.exports = function (req, res, next) { 4 | const locals = req.app.locals 5 | const ldp = locals.ldp 6 | const serverUri = locals.host.serverUri 7 | const hostname = ldp.resourceMapper.resolveUrl(req.hostname) 8 | if (hostname === serverUri) { 9 | return next() 10 | } 11 | const isLoggedIn = !!(req.session && req.session.userId) 12 | return next(new HTTPError(isLoggedIn ? 403 : 401, 'Not allowed to access top-level APIs on accounts')) 13 | } 14 | -------------------------------------------------------------------------------- /lib/http-error.js: -------------------------------------------------------------------------------- 1 | module.exports = HTTPError 2 | 3 | function HTTPError (status, message) { 4 | if (!(this instanceof HTTPError)) { 5 | return new HTTPError(status, message) 6 | } 7 | 8 | // Error.captureStackTrace(this, this.constructor) 9 | this.name = this.constructor.name 10 | 11 | // If status is an object it will be of the form: 12 | // {status: , message: } 13 | if (typeof status === 'number') { 14 | this.message = message || 'Error occurred' 15 | this.status = status 16 | } else { 17 | const err = status 18 | let _status 19 | let _code 20 | let _message 21 | if (err && err.status) { 22 | _status = err.status 23 | } 24 | if (err && err.code) { 25 | _code = err.code 26 | } 27 | if (err && err.message) { 28 | _message = err.message 29 | } 30 | this.message = message || _message 31 | this.status = _status || _code === 'ENOENT' ? 404 : 500 32 | } 33 | } 34 | require('util').inherits(module.exports, Error) 35 | -------------------------------------------------------------------------------- /lib/lock.js: -------------------------------------------------------------------------------- 1 | const AsyncLock = require('async-lock') 2 | 3 | const lock = new AsyncLock({ timeout: 30 * 1000 }) 4 | 5 | // Obtains a lock on the path, and maintains it until the task finishes 6 | async function withLock (path, executeTask) { 7 | return await lock.acquire(path, executeTask) 8 | } 9 | 10 | module.exports = withLock 11 | -------------------------------------------------------------------------------- /lib/metadata.js: -------------------------------------------------------------------------------- 1 | exports.Metadata = Metadata 2 | 3 | function Metadata () { 4 | this.filename = '' 5 | this.isResource = false 6 | this.isSourceResource = false 7 | this.isContainer = false 8 | this.isBasicContainer = false 9 | this.isDirectContainer = false 10 | this.isStorage = false 11 | } 12 | -------------------------------------------------------------------------------- /lib/services/blacklist-service.js: -------------------------------------------------------------------------------- 1 | const blacklistConfig = require('../../config/usernames-blacklist.json') 2 | const blacklist = require('the-big-username-blacklist').list 3 | 4 | class BlacklistService { 5 | constructor () { 6 | this.reset() 7 | } 8 | 9 | addWord (word) { 10 | this.list.push(BlacklistService._prepareWord(word)) 11 | } 12 | 13 | reset (config) { 14 | this.list = BlacklistService._initList(config) 15 | } 16 | 17 | validate (word) { 18 | return this.list.indexOf(BlacklistService._prepareWord(word)) === -1 19 | } 20 | 21 | static _initList (config = blacklistConfig) { 22 | return [ 23 | ...(config.useTheBigUsernameBlacklist ? blacklist : []), 24 | ...config.customBlacklistedUsernames 25 | ] 26 | } 27 | 28 | static _prepareWord (word) { 29 | return word.trim().toLocaleLowerCase() 30 | } 31 | } 32 | 33 | module.exports = new BlacklistService() 34 | -------------------------------------------------------------------------------- /lib/webid/index.js: -------------------------------------------------------------------------------- 1 | module.exports = webid 2 | 3 | const tls = require('./tls') 4 | 5 | function webid (type) { 6 | type = type || 'tls' 7 | 8 | if (type === 'tls') { 9 | return tls 10 | } 11 | 12 | throw new Error('No other WebID supported') 13 | } 14 | -------------------------------------------------------------------------------- /lib/webid/lib/get.js: -------------------------------------------------------------------------------- 1 | module.exports = get 2 | 3 | const request = require('request') 4 | const url = require('url') 5 | 6 | function get (webid, callback) { 7 | const uri = url.URL(webid) 8 | const options = { 9 | url: uri, 10 | method: 'GET', 11 | headers: { 12 | Accept: 'text/turtle, application/ld+json' 13 | } 14 | } 15 | 16 | request(options, function (err, res, body) { 17 | if (err) { 18 | return callback(new Error('Failed to fetch profile from ' + uri.href + ': ' + err)) 19 | } 20 | 21 | if (res.statusCode !== 200) { 22 | return callback(new Error('Failed to retrieve WebID from ' + uri.href + ': HTTP ' + res.statusCode)) 23 | } 24 | 25 | callback(null, body, res.headers['content-type']) 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /lib/webid/lib/parse.js: -------------------------------------------------------------------------------- 1 | module.exports = parse 2 | 3 | const $rdf = require('rdflib') 4 | 5 | function parse (profile, graph, uri, mimeType, callback) { 6 | try { 7 | $rdf.parse(profile, graph, uri, mimeType) 8 | return callback(null, graph) 9 | } catch (e) { 10 | return callback(new Error('Could not load/parse profile data: ' + e)) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | # Allow all crawling (subject to ACLs as usual, of course) 3 | Disallow: 4 | -------------------------------------------------------------------------------- /robots.txt.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default robots.txt resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /static/popup-redirect.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /static/signup.html.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the static resources 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | # Public-readable 7 | <#public> 8 | a acl:Authorization; 9 | 10 | acl:agentClass foaf:Agent; # everyone 11 | 12 | acl:accessTo <./signup.html>; 13 | 14 | acl:mode acl:Read. 15 | -------------------------------------------------------------------------------- /test/.meta: -------------------------------------------------------------------------------- 1 | # Root Meta resource for the user account 2 | # Used to discover the account's WebID URI, given the account URI 3 | 4 | 5 | . 6 | -------------------------------------------------------------------------------- /test/mocha.opts: -------------------------------------------------------------------------------- 1 | --recursive 2 | --timeout 10000 3 | -------------------------------------------------------------------------------- /test/resources/.acl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/.acl -------------------------------------------------------------------------------- /test/resources/.meta: -------------------------------------------------------------------------------- 1 | # Root Meta resource for the user account 2 | # Used to discover the account's WebID URI, given the account URI 3 | 4 | 5 | . 6 | -------------------------------------------------------------------------------- /test/resources/.permissions: -------------------------------------------------------------------------------- 1 | { 2 | "roles" : [ 3 | ["user", "hello.html", "GET"] 4 | ], 5 | "users" : [ 6 | ["https://martinmr.rww.io/profile/card#me", "user"] 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/emails/welcome-test.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /** 4 | * Returns a partial Email object (minus the `to` and `from` properties), 5 | * suitable for sending with Nodemailer. 6 | * 7 | * Used to send a Welcome email after a new user account has been created. 8 | * 9 | * @param data {Object} 10 | * 11 | * @param data.webid {string} 12 | * 13 | * @return {Object} 14 | */ 15 | function render (data) { 16 | return { 17 | subject: 'Welcome to Solid', 18 | 19 | /** 20 | * Text version of the Welcome email 21 | */ 22 | text: `Welcome to Solid! 23 | 24 | Your account has been created. 25 | 26 | Your Web Id: ${data.webid}`, 27 | 28 | /** 29 | * HTML version of the Welcome email 30 | */ 31 | html: `

Welcome to Solid!

32 | 33 |

Your account has been created.

34 | 35 |

Your Web Id: ${data.webid}

` 36 | } 37 | } 38 | 39 | module.exports.render = render 40 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the user account 2 | @prefix acl: . 3 | 4 | <#owner> 5 | a acl:Authorization; 6 | 7 | acl:agent <{{webId}}> ; 8 | 9 | # Optional owner email, to be used for account recovery: 10 | {{#if email}}acl:agent ;{{/if}} 11 | 12 | # Set the access to the root storage folder itself 13 | acl:accessTo ; 14 | 15 | # All resources will inherit this authorization, by default 16 | acl:default ; 17 | 18 | # The owner has all of the access modes allowed 19 | acl:mode 20 | acl:Read, acl:Write, acl:Control. 21 | 22 | # Data is private by default; no other agents get access unless specifically 23 | # authorized in other .acls 24 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/.meta: -------------------------------------------------------------------------------- 1 | # Root Meta resource for the user account 2 | # Used to discover the account's WebID URI, given the account URI 3 | <{{webId}}> 4 | 5 | . 6 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/.meta.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the Root Meta 2 | # Should be public-readable (since the root meta is used for WebID discovery) 3 | 4 | @prefix acl: . 5 | @prefix foaf: . 6 | 7 | <#owner> 8 | a acl:Authorization; 9 | 10 | acl:agent 11 | <{{webId}}>; 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode 16 | acl:Read, acl:Write, acl:Control. 17 | 18 | <#public> 19 | a acl:Authorization; 20 | 21 | acl:agentClass foaf:Agent; # everyone 22 | 23 | acl:accessTo ; 24 | 25 | acl:mode acl:Read. 26 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/accounts-acl/config/templates/new-account/favicon.ico -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/favicon.ico.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default favicon.ico resource 2 | # Individual users will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#owner> 9 | a acl:Authorization; 10 | 11 | acl:agent 12 | <{{webId}}>; 13 | 14 | acl:accessTo ; 15 | 16 | acl:mode 17 | acl:Read, acl:Write, acl:Control. 18 | 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo ; 25 | 26 | acl:mode acl:Read. 27 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/inbox/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the profile Inbox 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | <#owner> 7 | a acl:Authorization; 8 | 9 | acl:agent 10 | <{{webId}}>; 11 | 12 | acl:accessTo <./>; 13 | acl:default <./>; 14 | 15 | acl:mode 16 | acl:Read, acl:Write, acl:Control. 17 | 18 | # Public-appendable but NOT public-readable 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo <./>; 25 | 26 | acl:mode acl:Append. 27 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Solid User Profile 7 | 8 | 9 | 10 |
11 |

Solid User Profile

12 |
13 |
14 |
15 |
16 |

17 | Welcome to your Solid user profile. 18 |

19 |

20 | Your Web ID is:
21 | 22 | {{webId}} 23 |

24 |
25 |
26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/index.html.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | @prefix foaf: . 3 | 4 | <#owner> 5 | a acl:Authorization; 6 | 7 | acl:agent 8 | <{{webId}}>; 9 | 10 | acl:accessTo ; 11 | 12 | acl:mode 13 | acl:Read, acl:Write, acl:Control. 14 | 15 | <#public> 16 | a acl:Authorization; 17 | 18 | acl:agentClass foaf:Agent; # everyone 19 | 20 | acl:accessTo <./index.html>; 21 | 22 | acl:mode acl:Read. 23 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/profile/card: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | @prefix foaf: . 3 | @prefix pim: . 4 | @prefix schema: . 5 | @prefix ldp: . 6 | 7 | <> 8 | a foaf:PersonalProfileDocument ; 9 | foaf:maker <#me> ; 10 | foaf:primaryTopic <#me> . 11 | 12 | <#me> 13 | a foaf:Person ; 14 | a schema:Person ; 15 | 16 | foaf:name "{{name}}" ; 17 | 18 | solid:account ; # link to the account uri 19 | pim:storage ; # root storage 20 | solid:oidcIssuer <{{idp}}> ; # identity provider 21 | 22 | 23 | ldp:inbox ; 24 | 25 | pim:preferencesFile ; # private settings/preferences 26 | solid:publicTypeIndex ; 27 | solid:privateTypeIndex . 28 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/profile/card.acl: -------------------------------------------------------------------------------- 1 | # ACL for the WebID Profile document 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | <#owner> 7 | a acl:Authorization; 8 | 9 | acl:agent 10 | <{{webId}}>; 11 | 12 | acl:accessTo <./card>; 13 | 14 | acl:mode 15 | acl:Read, acl:Write, acl:Control. 16 | 17 | # Public-readable 18 | <#public> 19 | a acl:Authorization; 20 | 21 | acl:agentClass foaf:Agent; # everyone 22 | 23 | acl:accessTo <./card>; 24 | 25 | acl:mode acl:Read. 26 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/settings/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the /settings/ container 2 | @prefix acl: . 3 | 4 | <#owner> 5 | a acl:Authorization; 6 | 7 | acl:agent 8 | <{{webId}}>; 9 | 10 | # Set the access to the root storage folder itself 11 | acl:accessTo <./>; 12 | 13 | # All settings resources will be private, by default, unless overridden 14 | acl:default <./>; 15 | 16 | # The owner has all of the access modes allowed 17 | acl:mode 18 | acl:Read, acl:Write, acl:Control. 19 | 20 | # Private, no public access modes 21 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/settings/prefs.ttl: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix pim: . 3 | 4 | <> 5 | a pim:ConfigurationFile; 6 | 7 | dct:title "Preferences file" . 8 | 9 | {{#if email}}<{{webId}}> foaf:mbox .{{/if}} 10 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/settings/privateTypeIndex.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | <> 3 | a solid:TypeIndex ; 4 | a solid:UnlistedDocument. 5 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/settings/publicTypeIndex.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | <> 3 | a solid:TypeIndex ; 4 | a solid:ListedDocument. 5 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/settings/publicTypeIndex.ttl.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the Public Type Index 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | <#owner> 7 | a acl:Authorization; 8 | 9 | acl:agent 10 | <{{webId}}>; 11 | 12 | acl:accessTo <./publicTypeIndex.ttl>; 13 | 14 | acl:mode 15 | acl:Read, acl:Write, acl:Control. 16 | 17 | # Public-readable 18 | <#public> 19 | a acl:Authorization; 20 | 21 | acl:agentClass foaf:Agent; # everyone 22 | 23 | acl:accessTo <./publicTypeIndex.ttl>; 24 | 25 | acl:mode acl:Read. 26 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/new-account/settings/serverSide.ttl: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix pim: . 3 | @prefix solid: . 4 | @prefix unit: . 5 | 6 | <> 7 | a pim:ConfigurationFile; 8 | 9 | dct:description "Administrative settings for the server that are only readable to the user." . 10 | 11 | 12 | solid:storageQuota "2000" . 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/server/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the root 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | <#public> 6 | a acl:Authorization; 7 | acl:agentClass foaf:Agent; # everyone 8 | acl:accessTo ; 9 | acl:default ; 10 | acl:mode acl:Read. 11 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/templates/server/index.html.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | @prefix foaf: . 3 | 4 | <#public> 5 | a acl:Authorization; 6 | 7 | acl:agentClass foaf:Agent; # everyone 8 | 9 | acl:accessTo <./index.html>; 10 | 11 | acl:mode acl:Read. 12 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/views/auth/goodbye.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Logged Out 7 | 8 | 9 | 10 |
11 |

You have logged out.

12 |
13 |
14 |
15 | 17 |
18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/views/auth/login-required.hbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/accounts-acl/config/views/auth/login-required.hbs -------------------------------------------------------------------------------- /test/resources/accounts-acl/config/views/auth/no-permission.hbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/accounts-acl/config/views/auth/no-permission.hbs -------------------------------------------------------------------------------- /test/resources/accounts-acl/db/oidc/op/clients/_key_77bb3b35edb1f3f7b887c25d1211a491.json: -------------------------------------------------------------------------------- 1 | {"redirect_uris":["https://localhost:7777/api/oidc/rp/https%3A%2F%2Flocalhost%3A7777"],"client_id":"77bb3b35edb1f3f7b887c25d1211a491","client_secret":"98e44615d114b211dbafbf021d9d02aa","response_types":["code","id_token token","code id_token token"],"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"application_type":"web","client_name":"Solid OIDC RP for https://localhost:7777","id_token_signed_response_alg":"RS256","token_endpoint_auth_method":"client_secret_basic","default_max_age":86400,"post_logout_redirect_uris":["https://localhost:7777/goodbye"]} -------------------------------------------------------------------------------- /test/resources/accounts-acl/localhost/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the root 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | <#public> 6 | a acl:Authorization; 7 | acl:agentClass foaf:Agent; # everyone 8 | acl:accessTo ; 9 | acl:default ; 10 | acl:mode acl:Read. 11 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/localhost/index.html.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | @prefix foaf: . 3 | 4 | <#public> 5 | a acl:Authorization; 6 | 7 | acl:agentClass foaf:Agent; # everyone 8 | 9 | acl:accessTo <./index.html>; 10 | 11 | acl:mode acl:Read. 12 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/nicola.localhost/.acl: -------------------------------------------------------------------------------- 1 | # This ACL does nothing by default 2 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/nicola.localhost/index.html: -------------------------------------------------------------------------------- 1 | Everyone should get READ access for this file through
index.html.acl
. 2 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/nicola.localhost/index.html.acl: -------------------------------------------------------------------------------- 1 | # This file grants everyone READ access to ./index.html 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | <#public> 7 | a acl:Authorization; 8 | acl:agentClass foaf:Agent; 9 | acl:accessTo <./index.html>; 10 | acl:mode acl:Read. 11 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/quota/settings/serverSide.ttl: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix pim: . 3 | @prefix solid: . 4 | @prefix unit: . 5 | 6 | <> 7 | a pim:ConfigurationFile; 8 | 9 | dct:description "Administrative settings for the server that are only readable to the user." . 10 | 11 | # Nothing here... 12 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/.meta: -------------------------------------------------------------------------------- 1 | # Root Meta resource for the user account 2 | # Used to discover the account's WebID URI, given the account URI 3 | 4 | 5 | . 6 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/.meta.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the Root Meta 2 | # Should be public-readable (since the root meta is used for WebID discovery) 3 | 4 | @prefix acl: . 5 | @prefix foaf: . 6 | 7 | <#owner> 8 | a acl:Authorization; 9 | 10 | acl:agent 11 | ; 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode 16 | acl:Read, acl:Write, acl:Control. 17 | 18 | <#public> 19 | a acl:Authorization; 20 | 21 | acl:agentClass foaf:Agent; # everyone 22 | 23 | acl:accessTo ; 24 | 25 | acl:mode acl:Read. 26 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/append-acl/.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | 3 | <#authorization1> 4 | a acl:Authorization; 5 | 6 | acl:agent 7 | ; 8 | acl:accessTo <./>; 9 | acl:mode 10 | acl:Read, acl:Write, acl:Control; 11 | 12 | acl:default <./>. 13 | 14 | <#AppendOnly> 15 | a ; 16 | <./>; 17 | acl:default <./>; 18 | ; 19 | , . 20 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/append-acl/abc.ttl: -------------------------------------------------------------------------------- 1 | . 2 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/append-acl/abc.ttl.acl: -------------------------------------------------------------------------------- 1 | <#Owner> a ; 2 | <./abc.ttl>; 3 | ; 4 | , , . 5 | <#AppendOnly> a ; 6 | <./abc.ttl>; 7 | ; 8 | . 9 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/append-acl/abc2.ttl: -------------------------------------------------------------------------------- 1 | . 2 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/append-acl/abc2.ttl.acl: -------------------------------------------------------------------------------- 1 | <#Owner> a ; 2 | <./abc2.ttl>; 3 | ; 4 | , , . 5 | <#Restricted> a ; 6 | <./abc2.ttl>; 7 | ; 8 | , . 9 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/append-inherited/.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | 3 | <#authorization1> 4 | a acl:Authorization; 5 | 6 | acl:agent 7 | ; 8 | acl:accessTo <./>; 9 | acl:mode 10 | acl:Read, acl:Write, acl:Control; 11 | 12 | acl:default <./>. 13 | 14 | <#AppendOnly> 15 | a ; 16 | <./>; 17 | acl:default <./>; 18 | ; 19 | , . 20 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/dot-acl/.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | 3 | <#DotAcl> a acl:Authorization ; 4 | acl:accessTo <./.acl> ; 5 | acl:agent ; 6 | acl:mode acl:Read . 7 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/empty-acl/.acl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/accounts-acl/tim.localhost/empty-acl/.acl -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/fake-account/.acl: -------------------------------------------------------------------------------- 1 | <#0> 2 | a ; 3 | <./> ; 4 | ; 5 | , . 6 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/fake-account/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello 5 | 6 | 7 | Hello 8 | 9 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/group/test-folder/.acl: -------------------------------------------------------------------------------- 1 | @prefix : <#>. 2 | @prefix acl: . 3 | @prefix c: . 4 | @prefix foaf: . 5 | 6 | :owner 7 | a acl:Authorization; 8 | acl:accessTo <./> ; 9 | acl:agent c:me; 10 | acl:default <./> ; 11 | acl:mode acl:Control, acl:Read, acl:Write. 12 | :public 13 | a acl:Authorization; 14 | acl:agentClass foaf:Agent; 15 | acl:accessTo <./> ; 16 | acl:default <./> ; 17 | acl:mode acl:Read. 18 | :folks 19 | a acl:Authorization; 20 | acl:accessTo <./> ; 21 | acl:agentGroup ; 22 | acl:default <./> ; 23 | acl:mode acl:Read, acl:Write. 24 | #:errors 25 | # a acl:Authorization; 26 | # acl:accessTo ; 27 | # acl:agentGroup ; 28 | # acl:mode acl:Read, acl:Write. 29 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/group/test-folder/group-listing-error.ttl: -------------------------------------------------------------------------------- 1 | This is not Turtle... 2 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/group/test-folder/group-listing.ttl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | @prefix vcard: . 3 | 4 | <> a acl:GroupListing. 5 | 6 | <#us> 7 | a vcard:Group; 8 | vcard:hasUID ; 9 | 10 | 11 | 12 | # Simply local and remote identity for myself 13 | vcard:hasMember ; 14 | vcard:hasMember . 15 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/group/test-folder/some-other-file.txt: -------------------------------------------------------------------------------- 1 | Nothing here 2 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/multi-server/protected.txt: -------------------------------------------------------------------------------- 1 | protected resource 2 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/multi-server/protected.txt.acl: -------------------------------------------------------------------------------- 1 | <#0> 2 | a ; 3 | <./protected.txt> ; 4 | 5 | ; 6 | 7 | 8 | , . 9 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/no-acl/test-file.html: -------------------------------------------------------------------------------- 1 | test-file.html -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/no-control/.acl: -------------------------------------------------------------------------------- 1 | <#0> 2 | a ; 3 | ; 4 | ; 5 | ; 6 | . -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/origin/.acl: -------------------------------------------------------------------------------- 1 | <#0> 2 | a ; 3 | <./> ; 4 | ; 5 | , . 6 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/owner-only/.acl: -------------------------------------------------------------------------------- 1 | <#0> 2 | a ; 3 | <./> ; 4 | ; 5 | , . 6 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/read-acl/.acl: -------------------------------------------------------------------------------- 1 | <#Owner> 2 | a ; 3 | <./>; 4 | ; 5 | , , . 6 | <#Public> 7 | a ; 8 | <./>; 9 | ; 10 | . 11 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/read-acl/deeper-tree/.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | 3 | <#ThisControl> a acl:Authorization ; 4 | acl:accessTo <./> ; 5 | acl:agent ; 6 | acl:mode acl:Control . 7 | 8 | <#DirRead> a acl:Authorization ; 9 | acl:accessTo <./acls-only-on-top/> ; 10 | acl:agent ; 11 | acl:mode acl:Read . 12 | 13 | <#FileRead> a acl:Authorization ; 14 | acl:accessTo <./acls-only-on-top/example.ttl> ; 15 | acl:agent ; 16 | acl:mode acl:Read . 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/read-acl/deeper-tree/acls-only-on-top/example.ttl: -------------------------------------------------------------------------------- 1 | <> a . 2 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/write-acl/.acl: -------------------------------------------------------------------------------- 1 | <#0> 2 | a ; 3 | <./> ; 4 | <./> ; 5 | ; 6 | , . 7 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/write-acl/bad-acl-access/.acl: -------------------------------------------------------------------------------- 1 | <#0> 2 | a ; 3 | <./> ; 4 | ; 5 | , . 6 | -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/write-acl/empty-acl/.acl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/accounts-acl/tim.localhost/write-acl/empty-acl/.acl -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/write-acl/empty-acl/another-empty-folder/.acl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/accounts-acl/tim.localhost/write-acl/empty-acl/another-empty-folder/.acl -------------------------------------------------------------------------------- /test/resources/accounts-acl/tim.localhost/write-acl/test-file$.txt: -------------------------------------------------------------------------------- 1 | . -------------------------------------------------------------------------------- /test/resources/accounts-scenario/alice/.acl-override: -------------------------------------------------------------------------------- 1 | <#Owner> 2 | a ; 3 | <./>; 4 | ; 5 | , , . 6 | -------------------------------------------------------------------------------- /test/resources/accounts-scenario/alice/private-for-alice.txt: -------------------------------------------------------------------------------- 1 | protected contents for alice 2 | -------------------------------------------------------------------------------- /test/resources/accounts-scenario/alice/private-for-alice.txt.acl: -------------------------------------------------------------------------------- 1 | <#Alice> 2 | a ; 3 | 4 | <./private-for-alice.txt>; 5 | 6 | # Alice web id 7 | ; 8 | 9 | 10 | , 11 | , 12 | . 13 | -------------------------------------------------------------------------------- /test/resources/accounts-scenario/alice/profile/card$.ttl: -------------------------------------------------------------------------------- 1 | @prefix : <#>. 2 | @prefix acl: . 3 | 4 | :me 5 | acl:trustedApp 6 | [ 7 | acl:mode acl:Append, acl:Control, acl:Read, acl:Write; 8 | acl:origin 9 | ], 10 | [ acl:mode acl:Read, acl:Write; acl:origin ]. 11 | -------------------------------------------------------------------------------- /test/resources/accounts-scenario/bob/.acl-override: -------------------------------------------------------------------------------- 1 | <#Owner> 2 | a ; 3 | <./>; 4 | ; 5 | , , . 6 | -------------------------------------------------------------------------------- /test/resources/accounts-scenario/bob/profile/card$.ttl: -------------------------------------------------------------------------------- 1 | @prefix : <#>. 2 | @prefix pp: . 3 | @prefix xsd: . 4 | 5 | :me pp:PaymentPointer "$bob.com"^^xsd:string . 6 | -------------------------------------------------------------------------------- /test/resources/accounts-scenario/bob/shared-with-alice.txt: -------------------------------------------------------------------------------- 1 | protected contents 2 | -------------------------------------------------------------------------------- /test/resources/accounts-scenario/bob/shared-with-alice.txt.acl: -------------------------------------------------------------------------------- 1 | <#Alice> 2 | a ; 3 | 4 | <./shared-with-alice.txt>; 5 | 6 | # Alice web id 7 | ; 8 | 9 | # Bob web id 10 | ; 11 | 12 | 13 | , 14 | , 15 | . 16 | -------------------------------------------------------------------------------- /test/resources/accounts-scenario/charlie/profile/card$.ttl: -------------------------------------------------------------------------------- 1 | @prefix : <#>. 2 | @prefix pp: . 3 | @prefix xsd: . 4 | 5 | :me pp:PaymentPointer "$service.com/charlie"^^xsd:string . 6 | -------------------------------------------------------------------------------- /test/resources/accounts-strict-origin-off/alice/.acl-override: -------------------------------------------------------------------------------- 1 | <#Owner> 2 | a ; 3 | <./>; 4 | ; 5 | , , . 6 | -------------------------------------------------------------------------------- /test/resources/accounts-strict-origin-off/alice/private-for-alice.txt: -------------------------------------------------------------------------------- 1 | protected contents for alice 2 | -------------------------------------------------------------------------------- /test/resources/accounts-strict-origin-off/alice/private-for-alice.txt.acl: -------------------------------------------------------------------------------- 1 | <#Alice> 2 | a ; 3 | 4 | <./private-for-alice.txt>; 5 | 6 | # Alice web id 7 | ; 8 | 9 | 10 | , 11 | , 12 | . 13 | -------------------------------------------------------------------------------- /test/resources/accounts-strict-origin-off/alice/profile/card$.ttl: -------------------------------------------------------------------------------- 1 | @prefix : <#>. 2 | @prefix acl: . 3 | 4 | :me 5 | acl:trustedApp 6 | [ 7 | acl:mode acl:Append, acl:Control, acl:Read, acl:Write; 8 | acl:origin 9 | ], 10 | [ acl:mode acl:Read, acl:Write; acl:origin ]. 11 | -------------------------------------------------------------------------------- /test/resources/accounts-strict-origin-off/bob/.acl-override: -------------------------------------------------------------------------------- 1 | <#Owner> 2 | a ; 3 | <./>; 4 | ; 5 | , , . 6 | -------------------------------------------------------------------------------- /test/resources/accounts-strict-origin-off/bob/shared-with-alice.txt: -------------------------------------------------------------------------------- 1 | protected contents 2 | -------------------------------------------------------------------------------- /test/resources/accounts-strict-origin-off/bob/shared-with-alice.txt.acl: -------------------------------------------------------------------------------- 1 | <#Alice> 2 | a ; 3 | 4 | <./shared-with-alice.txt>; 5 | 6 | # Alice web id 7 | ; 8 | 9 | # Bob web id 10 | ; 11 | 12 | 13 | , 14 | , 15 | . 16 | -------------------------------------------------------------------------------- /test/resources/accounts/alice.localhost/profile/card: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/accounts/alice.localhost/profile/card -------------------------------------------------------------------------------- /test/resources/accounts/errortests/.acl-override: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | 3 | <#owner> 4 | a acl:Authorization; 5 | 6 | acl:agent ; 7 | 8 | # Set the access to the root storage folder itself 9 | acl:accessTo ; 10 | 11 | # All resources will inherit this authorization, by default 12 | acl:default ; 13 | 14 | # The owner has all of the access modes allowed 15 | acl:mode 16 | acl:Read, acl:Write, acl:Control. 17 | -------------------------------------------------------------------------------- /test/resources/accounts/errortests/public/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the public folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent ; 9 | acl:accessTo <./>; 10 | acl:default <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:default <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /test/resources/accounts/localhost/api/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the root 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | <#public> 6 | a acl:Authorization; 7 | acl:agentClass foaf:Agent; # everyone 8 | acl:accessTo <./>; 9 | acl:default <./>; 10 | acl:mode acl:Read. 11 | -------------------------------------------------------------------------------- /test/resources/accounts/localhost/samplePublicContainer/.acl: -------------------------------------------------------------------------------- 1 | <#Owner> 2 | a ; 3 | <./>; 4 | ; 5 | <./>; 6 | , , . 7 | -------------------------------------------------------------------------------- /test/resources/accounts/localhost/samplePublicContainer/nicola.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/accounts/localhost/samplePublicContainer/nicola.jpg -------------------------------------------------------------------------------- /test/resources/accounts/localhost/sampleUser1Container/.acl: -------------------------------------------------------------------------------- 1 | <#Owner> 2 | a ; 3 | <./>; 4 | ; 5 | <./>; 6 | , , . 7 | -------------------------------------------------------------------------------- /test/resources/accounts/tim.localhost/.acl: -------------------------------------------------------------------------------- 1 | <#0> 2 | a ; 3 | <./> ; 4 | ; 5 | , , . 6 | 7 | <#0> 8 | <./> ; 9 | ; 10 | , , . 11 | -------------------------------------------------------------------------------- /test/resources/accounts/tim.localhost/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Hello! 8 | 9 | -------------------------------------------------------------------------------- /test/resources/accounts/tim.localhost/profile/card: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/accounts/tim.localhost/profile/card -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/emails/invalid-username.js: -------------------------------------------------------------------------------- 1 | module.exports.render = render 2 | 3 | function render (data) { 4 | return { 5 | subject: `Invalid username for account ${data.accountUri}`, 6 | 7 | /** 8 | * Text version 9 | */ 10 | text: `Hi, 11 | 12 | We're sorry to inform you that the username for account ${data.accountUri} is not allowed after changes to username policy. 13 | 14 | This account has been set to be deleted at ${data.dateOfRemoval}. 15 | 16 | ${data.supportEmail ? `Please contact ${data.supportEmail} if you want to move your account.` : ''}`, 17 | 18 | /** 19 | * HTML version 20 | */ 21 | html: `

Hi,

22 | 23 |

We're sorry to inform you that the username for account ${data.accountUri} is not allowed after changes to username policy.

24 | 25 |

This account has been set to be deleted at ${data.dateOfRemoval}.

26 | 27 | ${data.supportEmail ? `

Please contact ${data.supportEmail} if you want to move your account.

` : ''} 28 | ` 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/emails/welcome.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /** 4 | * Returns a partial Email object (minus the `to` and `from` properties), 5 | * suitable for sending with Nodemailer. 6 | * 7 | * Used to send a Welcome email after a new user account has been created. 8 | * 9 | * @param data {Object} 10 | * 11 | * @param data.webid {string} 12 | * 13 | * @return {Object} 14 | */ 15 | function render (data) { 16 | return { 17 | subject: 'Welcome to Solid', 18 | 19 | /** 20 | * Text version of the Welcome email 21 | */ 22 | text: `Welcome to Solid! 23 | 24 | Your account has been created. 25 | 26 | Your Web Id: ${data.webid}`, 27 | 28 | /** 29 | * HTML version of the Welcome email 30 | */ 31 | html: `

Welcome to Solid!

32 | 33 |

Your account has been created.

34 | 35 |

Your Web Id: ${data.webid}

` 36 | } 37 | } 38 | 39 | module.exports.render = render 40 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the user account 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The homepage is readable by the public 6 | <#public> 7 | a acl:Authorization; 8 | acl:agentClass foaf:Agent; 9 | acl:accessTo ; 10 | acl:mode acl:Read. 11 | 12 | # The owner has full access to every resource in their pod. 13 | # Other agents have no access rights, 14 | # unless specifically authorized in other .acl resources. 15 | <#owner> 16 | a acl:Authorization; 17 | acl:agent <{{webId}}>; 18 | # Optional owner email, to be used for account recovery: 19 | {{#if email}}acl:agent ;{{/if}} 20 | # Set the access to the root storage folder itself 21 | acl:accessTo ; 22 | # All resources will inherit this authorization, by default 23 | acl:default ; 24 | # The owner has all of the access modes allowed 25 | acl:mode 26 | acl:Read, acl:Write, acl:Control. 27 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/.meta: -------------------------------------------------------------------------------- 1 | # Root Meta resource for the user account 2 | # Used to discover the account's WebID URI, given the account URI 3 | <{{webId}}> 4 | 5 | . 6 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/.meta.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the Root Meta 2 | # Should be public-readable (since the root meta is used for WebID discovery) 3 | 4 | @prefix acl: . 5 | @prefix foaf: . 6 | 7 | <#owner> 8 | a acl:Authorization; 9 | 10 | acl:agent 11 | <{{webId}}>; 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode 16 | acl:Read, acl:Write, acl:Control. 17 | 18 | <#public> 19 | a acl:Authorization; 20 | 21 | acl:agentClass foaf:Agent; # everyone 22 | 23 | acl:accessTo ; 24 | 25 | acl:mode acl:Read. 26 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/.well-known/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the well-known folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent <{{webId}}>; 9 | acl:accessTo <./>; 10 | acl:default <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:default <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/acl-tls/config/templates/new-account/favicon.ico -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/favicon.ico.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default favicon.ico resource 2 | # Individual users will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#owner> 9 | a acl:Authorization; 10 | 11 | acl:agent 12 | <{{webId}}>; 13 | 14 | acl:accessTo ; 15 | 16 | acl:mode 17 | acl:Read, acl:Write, acl:Control. 18 | 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo ; 25 | 26 | acl:mode acl:Read. 27 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/inbox/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the profile Inbox 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | <#owner> 7 | a acl:Authorization; 8 | 9 | acl:agent 10 | <{{webId}}>; 11 | 12 | acl:accessTo <./>; 13 | acl:default <./>; 14 | 15 | acl:mode 16 | acl:Read, acl:Write, acl:Control. 17 | 18 | # Public-appendable but NOT public-readable 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo <./>; 25 | 26 | acl:mode acl:Append. 27 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/private/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the private folder 2 | @prefix acl: . 3 | 4 | # The owner has all permissions 5 | <#owner> 6 | a acl:Authorization; 7 | acl:agent <{{webId}}>; 8 | acl:accessTo <./>; 9 | acl:default <./>; 10 | acl:mode acl:Read, acl:Write, acl:Control. 11 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/profile/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the profile folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent <{{webId}}>; 9 | acl:accessTo <./>; 10 | acl:default <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:default <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/profile/card$.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | @prefix foaf: . 3 | @prefix pim: . 4 | @prefix schema: . 5 | @prefix ldp: . 6 | 7 | <> 8 | a foaf:PersonalProfileDocument ; 9 | foaf:maker <{{webId}}> ; 10 | foaf:primaryTopic <{{webId}}> . 11 | 12 | <{{webId}}> 13 | a foaf:Person ; 14 | a schema:Person ; 15 | 16 | foaf:name "{{name}}" ; 17 | 18 | solid:account ; # link to the account uri 19 | pim:storage ; # root storage 20 | solid:oidcIssuer <{{idp}}> ; # identity provider 21 | 22 | ldp:inbox ; 23 | 24 | pim:preferencesFile ; # private settings/preferences 25 | solid:publicTypeIndex ; 26 | solid:privateTypeIndex . 27 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/public/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the public folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent <{{webId}}>; 9 | acl:accessTo <./>; 10 | acl:default <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:default <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | # Allow all crawling (subject to ACLs as usual, of course) 3 | Disallow: 4 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/robots.txt.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default robots.txt resource 2 | # Individual users will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#owner> 9 | a acl:Authorization; 10 | 11 | acl:agent 12 | <{{webId}}>; 13 | 14 | acl:accessTo ; 15 | 16 | acl:mode 17 | acl:Read, acl:Write, acl:Control. 18 | 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo ; 25 | 26 | acl:mode acl:Read. 27 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/settings/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the /settings/ container 2 | @prefix acl: . 3 | 4 | <#owner> 5 | a acl:Authorization; 6 | 7 | acl:agent 8 | <{{webId}}>; 9 | 10 | # Set the access to the root storage folder itself 11 | acl:accessTo <./>; 12 | 13 | # All settings resources will be private, by default, unless overridden 14 | acl:default <./>; 15 | 16 | # The owner has all of the access modes allowed 17 | acl:mode 18 | acl:Read, acl:Write, acl:Control. 19 | 20 | # Private, no public access modes 21 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/settings/prefs.ttl: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix pim: . 3 | @prefix foaf: . 4 | @prefix solid: . 5 | 6 | <> 7 | a pim:ConfigurationFile; 8 | 9 | dct:title "Preferences file" . 10 | 11 | {{#if email}}<{{webId}}> foaf:mbox .{{/if}} 12 | 13 | <{{webId}}> 14 | solid:publicTypeIndex ; 15 | solid:privateTypeIndex . 16 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/settings/privateTypeIndex.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | <> 3 | a solid:TypeIndex ; 4 | a solid:UnlistedDocument. 5 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/settings/publicTypeIndex.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | <> 3 | a solid:TypeIndex ; 4 | a solid:ListedDocument. 5 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/settings/publicTypeIndex.ttl.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the Public Type Index 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | <#owner> 7 | a acl:Authorization; 8 | 9 | acl:agent 10 | <{{webId}}>; 11 | 12 | acl:accessTo <./publicTypeIndex.ttl>; 13 | 14 | acl:mode 15 | acl:Read, acl:Write, acl:Control. 16 | 17 | # Public-readable 18 | <#public> 19 | a acl:Authorization; 20 | 21 | acl:agentClass foaf:Agent; # everyone 22 | 23 | acl:accessTo <./publicTypeIndex.ttl>; 24 | 25 | acl:mode acl:Read. 26 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/settings/serverSide.ttl.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | @prefix foaf: . 3 | 4 | <#owner> 5 | a acl:Authorization; 6 | 7 | acl:agent 8 | <{{webId}}>; 9 | 10 | acl:accessTo <./serverSide.ttl>; 11 | 12 | acl:mode acl:Read . 13 | 14 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/new-account/settings/serverSide.ttl.inactive: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix pim: . 3 | @prefix solid: . 4 | 5 | <> 6 | a pim:ConfigurationFile; 7 | 8 | dct:description "Administrative settings for the POD that the user can only read." . 9 | 10 | 11 | solid:storageQuota "25000000" . 12 | 13 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/server/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the root 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | <#public> 6 | a acl:Authorization; 7 | acl:agentClass foaf:Agent; # everyone 8 | acl:accessTo ; 9 | acl:default ; 10 | acl:mode acl:Read. 11 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/server/.well-known/.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default .well-known/ resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/server/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/acl-tls/config/templates/server/favicon.ico -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/server/favicon.ico.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default favicon.ico resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/server/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | # Allow all crawling (subject to ACLs as usual, of course) 3 | Disallow: 4 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/templates/server/robots.txt.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default robots.txt resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/account/account-deleted.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Account Deleted 7 | 8 | 9 | 10 |
11 |

Account Deleted

12 |
13 |
14 |

Your account has been deleted.

15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/account/delete-link-sent.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Delete Account Link Sent 7 | 8 | 9 | 10 |
11 |

Confirm account deletion

12 |
13 |
14 |

A link to confirm the deletion of this account has been sent to your email.

15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/account/invalid-username.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Invalid username 7 | 8 | 9 | 10 |
11 |

Invalid username

12 |
13 |
14 |

We're sorry to inform you that this account's username ({{username}}) is not allowed after changes to username policy.

15 |

This account has been set to be deleted at {{dateOfRemoval}}.

16 | {{#if supportEmail}} 17 |

Please contact {{supportEmail}} if you want to move your account.

18 | {{/if}} 19 |

If you had an email address connected to this account, you should have received an email about this.

20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/account/register-disabled.hbs: -------------------------------------------------------------------------------- 1 |
2 |

3 | Registering a new account is disabled for the WebID-TLS authentication method. 4 | Please restart the server using another mode. 5 |

6 |
7 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/account/register.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Register 7 | 8 | 9 | 10 | 11 |
12 | 13 | 16 | 17 | {{#if registerDisabled}} 18 | {{> account/register-disabled}} 19 | {{else}} 20 | {{> account/register-form}} 21 | {{/if}} 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/auth/auth-hidden-fields.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/auth/goodbye.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Logged Out 7 | 8 | 9 | 10 | 11 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/auth/login-tls.hbs: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/auth/no-permission.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | No permission 7 | 8 | 9 | 10 | 11 |
12 | 15 |
16 |

17 | You are currently logged in as {{webId}}, 18 | but do not have permission to access {{currentUrl}}. 19 |

20 |

21 | 22 |

23 |
24 |
25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/auth/password-changed.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Password Changed 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 |
17 |

Your password has been changed.

18 |
19 | 20 |

21 | 22 | Log in 23 | 24 |

25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/auth/reset-link-sent.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Reset Link Sent 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 |
17 |

A Reset Password link has been sent to your email.

18 |
19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/shared/create-account.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 | New to Solid? 4 | 5 | Create an account 6 | 7 |
8 |
9 | -------------------------------------------------------------------------------- /test/resources/acl-tls/config/views/shared/error.hbs: -------------------------------------------------------------------------------- 1 | {{#if error}} 2 |
3 |

{{error}}

4 |
5 | {{/if}} 6 | -------------------------------------------------------------------------------- /test/resources/acl-tls/localhost/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the root 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | <#public> 6 | a acl:Authorization; 7 | acl:agentClass foaf:Agent; # everyone 8 | acl:accessTo ; 9 | acl:default ; 10 | acl:mode acl:Read. 11 | -------------------------------------------------------------------------------- /test/resources/acl-tls/localhost/.well-known/.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default .well-known/ resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /test/resources/acl-tls/localhost/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/acl-tls/localhost/favicon.ico -------------------------------------------------------------------------------- /test/resources/acl-tls/localhost/favicon.ico.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default favicon.ico resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /test/resources/acl-tls/localhost/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | # Allow all crawling (subject to ACLs as usual, of course) 3 | Disallow: 4 | -------------------------------------------------------------------------------- /test/resources/acl-tls/localhost/robots.txt.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default robots.txt resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the root 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | <#public> 6 | a acl:Authorization; 7 | acl:agentClass foaf:Agent; # everyone 8 | acl:accessTo ; 9 | acl:default ; 10 | acl:mode acl:Read. 11 | -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/append-acl/abc.ttl: -------------------------------------------------------------------------------- 1 | . 2 | -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/append-acl/abc.ttl.acl: -------------------------------------------------------------------------------- 1 | <#Owner> a ; 2 | <./abc.ttl>; 3 | ; 4 | , , . 5 | <#AppendOnly> a ; 6 | <./abc.ttl>; 7 | ; 8 | . 9 | -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/append-acl/abc2.ttl: -------------------------------------------------------------------------------- 1 | . 2 | -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/append-acl/abc2.ttl.acl: -------------------------------------------------------------------------------- 1 | <#Owner> a ; 2 | <./abc2.ttl>; 3 | ; 4 | , , . 5 | <#Restricted> a ; 6 | <./abc2.ttl>; 7 | ; 8 | , . 9 | -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/append-inherited/.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | 3 | <#authorization1> 4 | a acl:Authorization; 5 | 6 | acl:agent 7 | ; 8 | acl:accessTo <./>; 9 | acl:mode 10 | acl:Read, acl:Write, acl:Control; 11 | 12 | acl:default <./>. 13 | 14 | -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/empty-acl/.acl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/acl-tls/tim.localhost/empty-acl/.acl -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/fake-account/.acl: -------------------------------------------------------------------------------- 1 | <#0> 2 | a ; 3 | <./> ; 4 | ; 5 | , . 6 | -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/fake-account/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello 5 | 6 | 7 | Hello 8 | 9 | -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/no-acl/test-file.html: -------------------------------------------------------------------------------- 1 | test-file.html -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/origin/.acl: -------------------------------------------------------------------------------- 1 | <#0> 2 | a ; 3 | <./> ; 4 | ; 5 | , . 6 | -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/owner-only/.acl: -------------------------------------------------------------------------------- 1 | <#0> 2 | a ; 3 | <./> ; 4 | ; 5 | , . 6 | -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/profile/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the profile folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The public has read permissions 6 | <#public> 7 | a acl:Authorization; 8 | acl:agentClass foaf:Agent; 9 | acl:accessTo <./>; 10 | acl:default <./>; 11 | acl:mode acl:Read. 12 | -------------------------------------------------------------------------------- /test/resources/acl-tls/tim.localhost/read-acl/.acl: -------------------------------------------------------------------------------- 1 | <#Owner> 2 | a ; 3 | <./>; 4 | ; 5 | , , . 6 | <#Public> 7 | a ; 8 | <./>; 9 | ; 10 | . 11 | -------------------------------------------------------------------------------- /test/resources/acl-tls/write-acl/.acl: -------------------------------------------------------------------------------- 1 | <#0> 2 | a ; 3 | <./> ; 4 | ; 5 | , . 6 | -------------------------------------------------------------------------------- /test/resources/acl-tls/write-acl/empty-acl/.acl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/acl-tls/write-acl/empty-acl/.acl -------------------------------------------------------------------------------- /test/resources/acl-tls/write-acl/test-file$.ttl: -------------------------------------------------------------------------------- 1 | . -------------------------------------------------------------------------------- /test/resources/auth-proxy/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/auth-proxy/index.html -------------------------------------------------------------------------------- /test/resources/auth-proxy/index.html.acl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/auth-proxy/index.html.acl -------------------------------------------------------------------------------- /test/resources/config/defaults.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | originsAllowed: ['https://test.apps.solid.invalid'] 5 | } 6 | -------------------------------------------------------------------------------- /test/resources/config/templates: -------------------------------------------------------------------------------- 1 | ../../../default-templates/ -------------------------------------------------------------------------------- /test/resources/config/views: -------------------------------------------------------------------------------- 1 | ../../../default-views/ -------------------------------------------------------------------------------- /test/resources/empty.spatch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/empty.spatch -------------------------------------------------------------------------------- /test/resources/errorPages/401.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 401 Error Page 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/resources/errorPages/403.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Error Page 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/resources/errorPages/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 404 Error Page 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/resources/errorPages/405.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 405 Error Page 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/resources/errorPages/415.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 415 Error Page 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/resources/errorPages/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 500 Error Page 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/resources/example_spkac.cnf: -------------------------------------------------------------------------------- 1 | MIICSzCCATMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDTNfNipSQN%0D%0AmDQ%2BHb00MhUx%2BbkZeyx53aeLnmkORCkU1tb8jAr87F932vjgX%2FvpjwRjT6oRV1MJ%0D%0ASZrFqdpjDay3ndJRFxsudvYwzPEt0tyRK2ALeR7Knv%2F8ow%2B8aOKkc%2BS%2Fd2nwpzIs%0D%0Arz4zW8wHVV7%2FlNcyOcU2vCVS55ns1OEizz6iSkDe%2B%2BVOFRyC4ZZOxwxobSnNFzpo%0D%0AdLcZoGBm4L62onX0r5%2FiFEc1caVZl3TULoO9HMjZx5Jp3vmTBk0mVluPDRRsaJeM%0D%0AlYCrEEvHw86BhKxrHOB5IN415RirCAxr81QQJtxsMA5OBdLKgk%2BHUJXIrv3IOHHb%0D%0AglbktuQfwhcbAgMBAAEWC3JhbmRvbWNoYXJzMA0GCSqGSIb3DQEBBAUAA4IBAQC8%0D%0AZZqJia8rvwxfOv7ZEnzzUIHKTXPjvZjxvZZlQAufvUu%2BhcnJPTs2Oy20igLGw807%0D%0AHS5s%2FMUFMuJWdLUOM3FprGh1PXrRGS8%2FNUwNsJ2LkMD8JtQct9z1%2FUD4pkBd0gbh%0D%0ArX8%2FHq%2Ba4WbdVlLq5z2BdvAW7ejGFZinfpplUfxaEAVy8UtoudmxSUSS5KPf3XDU%0D%0AbjP1zm9Jd3xrdMadGFMJjiUQkiStuE%2B3X0918%2FMvcE3xTCm3Crn9ja06pDcHM11p%0D%0ADs0Aap8fFycXJsSO%2BA1RJd1fupGtQN9v72W%2BB0lr9qvtMWGT1MU6EWwdvT0F49Hp%0D%0A9sWuSTXQ4mD%2B9nNUD1JS -------------------------------------------------------------------------------- /test/resources/headers/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the root 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | <#public> 6 | a acl:Authorization; 7 | acl:agentClass foaf:Agent; # everyone 8 | acl:accessTo ; 9 | acl:default ; 10 | acl:mode acl:Read. 11 | -------------------------------------------------------------------------------- /test/resources/headers/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/headers/index.html -------------------------------------------------------------------------------- /test/resources/headers/public-ra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/headers/public-ra -------------------------------------------------------------------------------- /test/resources/headers/public-ra.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | @prefix foaf: . 3 | 4 | <#public> a acl:Authorization; 5 | acl:accessTo <./public-ra>; 6 | acl:agentClass foaf:Agent; 7 | acl:mode acl:Read, acl:Append. 8 | -------------------------------------------------------------------------------- /test/resources/headers/user-rw-public-r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/headers/user-rw-public-r -------------------------------------------------------------------------------- /test/resources/headers/user-rw-public-r.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | @prefix foaf: . 3 | 4 | <#owner> a acl:Authorization; 5 | acl:accessTo <./user-rw-public-r>; 6 | acl:agent ; 7 | acl:mode acl:Read, acl:Write. 8 | 9 | <#public> a acl:Authorization; 10 | acl:accessTo <./user-rw-public-r>; 11 | acl:agentClass foaf:Agent; 12 | acl:mode acl:Read. 13 | -------------------------------------------------------------------------------- /test/resources/headers/user-rwac-public-0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/headers/user-rwac-public-0 -------------------------------------------------------------------------------- /test/resources/headers/user-rwac-public-0.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | @prefix foaf: . 3 | 4 | <#owner> a acl:Authorization; 5 | acl:accessTo <./user-rwac-public-0>; 6 | acl:agent ; 7 | acl:mode acl:Read, acl:Write, acl:Append, acl:Delete, acl:Control. 8 | -------------------------------------------------------------------------------- /test/resources/hello.html: -------------------------------------------------------------------------------- 1 | 2 | Hello, world! 3 | 4 | -------------------------------------------------------------------------------- /test/resources/invalid1.ttl: -------------------------------------------------------------------------------- 1 | @prefix ldp: . 2 | @prefix o: . 3 | 4 | 5 | test o:NetWorth; 6 | o:netWorthOf ; 7 | o:asset 8 | , 9 | ; 10 | o:liability 11 | , 12 | , 13 | . 14 | -------------------------------------------------------------------------------- /test/resources/invalid2.ttl: -------------------------------------------------------------------------------- 1 | @prefix txn: . 2 | @prefix srv: . 3 | @prefix log: . 4 | @prefix xsd: . 5 | 6 | txn:123 invalid log:Transaction ; 7 | log:processedBy srv:A ; 8 | log:processedAt "2015-10-16T10:22:23"^^xsd:dateTime ; 9 | log:statusCode 200 . 10 | -------------------------------------------------------------------------------- /test/resources/ldpatch-example-final.ttl: -------------------------------------------------------------------------------- 1 | @prefix schema: . 2 | @prefix pro: . 3 | @prefix ex: . 4 | 5 | a schema:Person ; 6 | schema:alternateName "TimBL" ; 7 | pro:first_name "Timothy" ; 8 | pro:last_name "Berners-Lee" ; 9 | schema:workLocation [ schema:name "W3C/MIT" ] ; 10 | schema:performerIn _:b1, _:b2 ; 11 | ex:preferredLanguages ( "en" "fr-CH" ). 12 | 13 | _:b1 a schema:Event ; 14 | schema:name "F2F5 - Linked Data Platform" ; 15 | schema:url . 16 | 17 | _:b2 a schema:Event ; 18 | schema:name "TED 2009" ; 19 | schema:url ; 20 | schema:location [ 21 | schema:name "Long Beach, California"; 22 | schema:geo [ schema:latitude "33.7817" ; schema:longitude "-118.2054" ] 23 | ] . 24 | -------------------------------------------------------------------------------- /test/resources/ldpatch-example-initial.ttl: -------------------------------------------------------------------------------- 1 | @prefix schema: . 2 | @prefix profile: . 3 | @prefix ex: . 4 | @prefix rdf: . 5 | 6 | # a schema:Person ; 7 | <#> a schema:Person ; 8 | 9 | schema:alternateName "TimBL" ; 10 | profile:first_name "Tim" ; 11 | profile:last_name "Berners-Lee" ; 12 | schema:workLocation [ schema:name "W3C/MIT" ] ; 13 | schema:performerIn _:b1, _:b2 ; 14 | ex:preferredLanguages ( "en" "fr" ). 15 | 16 | _:b1 schema:name "F2F5 - Linked Data Platform" ; 17 | schema:url . 18 | 19 | _:b2 a schema:Event ; 20 | schema:name "TED 2009" ; 21 | schema:startDate "2009-02-04" ; 22 | schema:url . 23 | -------------------------------------------------------------------------------- /test/resources/ldpatch-example-patch-1.spatch: -------------------------------------------------------------------------------- 1 | @prefix rdf: . 2 | @prefix schema: . 3 | @prefix profile: . 4 | @prefix ex: . 5 | 6 | DELETE { <#> profile:first_name "Tim" } 7 | INSERT { <#> profile:first_name "Timothy" } 8 | 9 | -------------------------------------------------------------------------------- /test/resources/ldpatch-example-patch-2.spatch: -------------------------------------------------------------------------------- 1 | @prefix rdf: . 2 | @prefix schema: . 3 | @prefix profile: . 4 | @prefix ex: . 5 | 6 | 7 | #UpdateList <#> ex:preferredLanguages 1..2 ( "fr-CH" ) . 8 | 9 | WHERE { <#> schema:performerIn ?event. ?event schema:url } 10 | 11 | INSERT { ?event rdf:type schema:Event } 12 | 13 | -------------------------------------------------------------------------------- /test/resources/ldpatch-example-patch-3.spatch: -------------------------------------------------------------------------------- 1 | @prefix rdf: . 2 | @prefix schema: . 3 | @prefix profile: . 4 | @prefix ex: . 5 | WHERE{ ?ted is schema:url of ?ted } 6 | 7 | DELETE { ?ted schema:startDate "2009-02-04" } 8 | 9 | ADD { ?ted schema:location [ 10 | schema:name "Long Beach, California" ; 11 | schema:geo [ 12 | schema:latitude "33.7817" ; 13 | schema:longitude "-118.2054" ]] 14 | }. 15 | -------------------------------------------------------------------------------- /test/resources/ldpatch-example-patch.ldpatch: -------------------------------------------------------------------------------- 1 | Host: example.org 2 | Content-Length: 478 3 | Content-Type: text/ldpatch 4 | If-Match: "abc123" 5 | 6 | @prefix rdf: . 7 | @prefix schema: . 8 | @prefix profile: . 9 | @prefix ex: . 10 | 11 | Delete <#> profile:first_name "Tim" . 12 | Add <#> profile:first_name "Timothy" . 13 | 14 | UpdateList <#> ex:preferredLanguages 1..2 ( "fr-CH" ) . 15 | 16 | Bind ?event <#> /schema:performerIn[/schema:url = ] . 17 | Add ?event rdf:type schema:Event . 18 | 19 | Bind ?ted /^schema:url! . 20 | Delete ?ted schema:startDate "2009-02-04". 21 | Add ?ted schema:location _:loc . 22 | Add _:loc schema:name "Long Beach, California" . 23 | Add _:loc schema:geo _:geo . 24 | Add _:geo schema:latitude "33.7817" . 25 | Add _:geo schema:longitude "-118.2054" . 26 | -------------------------------------------------------------------------------- /test/resources/ldpatch-example-patch.spatch: -------------------------------------------------------------------------------- 1 | @prefix rdf: . 2 | @prefix schema: . 3 | @prefix profile: . 4 | @prefix ex: . 5 | 6 | DELETE { <#> profile:first_name "Tim" } 7 | INSERT { <#> profile:first_name "Timothy" } 8 | 9 | #UpdateList <#> ex:preferredLanguages 1..2 ( "fr-CH" ) . 10 | 11 | WHERE { <#> schema:performerIn ?event. ?event schema:url } 12 | 13 | INSERT { ?event rdf:type schema:Event } 14 | 15 | WHERE{ ?ted is schema:url of ?ted } 16 | 17 | DELETE { ?ted schema:startDate "2009-02-04" } 18 | 19 | ADD { ?ted schema:location [ 20 | schema:name "Long Beach, California" ; 21 | schema:geo [ 22 | schema:latitude "33.7817" ; 23 | schema:longitude "-118.2054" ]] 24 | }. 25 | -------------------------------------------------------------------------------- /test/resources/lennon.jsonld: -------------------------------------------------------------------------------- 1 | { 2 | "@context": "http://json-ld.org/contexts/person.jsonld", 3 | "@id": "http://dbpedia.org/resource/John_Lennon", 4 | "name": "John Lennon", 5 | "born": "1940-10-09", 6 | "spouse": "http://dbpedia.org/resource/Cynthia_Lennon" 7 | } 8 | -------------------------------------------------------------------------------- /test/resources/lfs-0.sparql: -------------------------------------------------------------------------------- 1 | PREFIX foaf: 2 | PREFIX vcard: 3 | PREFIX alice: 4 | PREFIX bob: 5 | PREFIX carol: 6 | PREFIX dave: 7 | SELECT ?name WHERE { 8 | alice:this foaf:name ?name. 9 | } 10 | -------------------------------------------------------------------------------- /test/resources/lfs-1-final.json: -------------------------------------------------------------------------------- 1 | { 2 | "head": { 3 | "vars": [ 4 | "?name" 5 | ] 6 | }, 7 | "results": { 8 | "bindings": [] 9 | } 10 | } -------------------------------------------------------------------------------- /test/resources/lfs-1.sparql: -------------------------------------------------------------------------------- 1 | PREFIX foaf: 2 | PREFIX vcard: 3 | PREFIX alice: 4 | PREFIX bob: 5 | PREFIX carol: 6 | PREFIX dave: 7 | SELECT ?name WHERE { 8 | alice:this foaf:knows ?x. 9 | ?x vcard:locality "BobTown". 10 | ?x foaf:name ?name. 11 | } 12 | -------------------------------------------------------------------------------- /test/resources/nicola.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/nicola.jpg -------------------------------------------------------------------------------- /test/resources/patch-1-initial.ttl: -------------------------------------------------------------------------------- 1 | 2 | :current :temp 123 . 3 | 4 | -------------------------------------------------------------------------------- /test/resources/patch-2-final.ttl: -------------------------------------------------------------------------------- 1 | 2 | <#current> <#temp> 456. 3 | -------------------------------------------------------------------------------- /test/resources/patch-2-initial.ttl: -------------------------------------------------------------------------------- 1 | 2 | :current :temp 123 . 3 | 4 | -------------------------------------------------------------------------------- /test/resources/patch-2.spatch: -------------------------------------------------------------------------------- 1 | DELETE { :current :temp 123 .} 2 | INSERT DATA { :current :temp 456 .} 3 | -------------------------------------------------------------------------------- /test/resources/patch-2n.spatch: -------------------------------------------------------------------------------- 1 | DELETE { :current :temp 888 .} 2 | INSERT DATA { :current :temp 456 .} 3 | -------------------------------------------------------------------------------- /test/resources/patch-3-final.ttl: -------------------------------------------------------------------------------- 1 | @prefix schema: . 2 | @prefix profile: . 3 | @prefix ex: . 4 | 5 | <#> 6 | ex:preferredLanguages 7 | ( "en" "fr" ); 8 | profile:first_name 9 | "Timothy"; 10 | profile:last_name 11 | "Berners-Lee"; 12 | schema:alternateName 13 | "TimBL"; 14 | schema:performerIn 15 | [ schema:name 16 | "F2F5 - Linked Data Platform"; 17 | schema:url 18 | ], 19 | [ schema:name 20 | "TED 2009"; 21 | schema:startDate 22 | "2009-02-04"; 23 | schema:url 24 | ; 25 | a schema:Event ]; 26 | schema:workLocation 27 | [ schema:name "W3C/MIT" ]; 28 | a schema:Person. 29 | -------------------------------------------------------------------------------- /test/resources/patch-4-final.ttl: -------------------------------------------------------------------------------- 1 | @prefix schema: . 2 | @prefix profile: . 3 | @prefix ex: . 4 | 5 | <#> 6 | ex:preferredLanguages 7 | ( "en" "fr" ); 8 | profile:first_name 9 | "Tim"; 10 | profile:last_name 11 | "Berners-Lee"; 12 | schema:alternateName 13 | "TimBL"; 14 | schema:performerIn 15 | [ schema:name 16 | "F2F5 - Linked Data Platform"; 17 | schema:url 18 | ; 19 | a schema:Event ], 20 | [ schema:name 21 | "TED 2009"; 22 | schema:startDate 23 | "2009-02-04"; 24 | schema:url 25 | ; 26 | a schema:Event ]; 27 | schema:workLocation 28 | [ schema:name "W3C/MIT" ]; 29 | a schema:Person. 30 | -------------------------------------------------------------------------------- /test/resources/patch-5-final.ttl: -------------------------------------------------------------------------------- 1 | <#Iss1408851516666> :ppp 123 . -------------------------------------------------------------------------------- /test/resources/patch-5-initial.ttl: -------------------------------------------------------------------------------- 1 | <#Iss1408851516666> <#TBL> ; :ppp 123 . 2 | 3 | 4 | -------------------------------------------------------------------------------- /test/resources/patch-5.spatch: -------------------------------------------------------------------------------- 1 | DELETE DATA { <#Iss1408851516666> <#TBL> . } 2 | 3 | -------------------------------------------------------------------------------- /test/resources/patch/.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | 3 | <#Owner> a acl:Authorization; 4 | acl:accessTo ; 5 | acl:default ; 6 | acl:agent ; 7 | acl:mode acl:Read, acl:Write, acl:Control. 8 | -------------------------------------------------------------------------------- /test/resources/patch/append-only.ttl: -------------------------------------------------------------------------------- 1 | . 2 | . 3 | -------------------------------------------------------------------------------- /test/resources/patch/append-only.ttl.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | 3 | <#Owner> a acl:Authorization; 4 | acl:accessTo <./append-only.ttl>; 5 | acl:agent ; 6 | acl:mode acl:Append. 7 | -------------------------------------------------------------------------------- /test/resources/patch/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/patch/index.html -------------------------------------------------------------------------------- /test/resources/patch/read-append.ttl: -------------------------------------------------------------------------------- 1 | . 2 | . 3 | -------------------------------------------------------------------------------- /test/resources/patch/read-append.ttl.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | 3 | <#Owner> a acl:Authorization; 4 | acl:accessTo <./read-append.ttl>; 5 | acl:agent ; 6 | acl:mode acl:Read, acl:Append. 7 | -------------------------------------------------------------------------------- /test/resources/patch/read-only.ttl: -------------------------------------------------------------------------------- 1 | . 2 | . 3 | -------------------------------------------------------------------------------- /test/resources/patch/read-only.ttl.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | 3 | <#Owner> a acl:Authorization; 4 | acl:accessTo <./read-only.ttl>; 5 | acl:agent ; 6 | acl:mode acl:Read. 7 | -------------------------------------------------------------------------------- /test/resources/patch/read-write.ttl: -------------------------------------------------------------------------------- 1 | . 2 | . 3 | -------------------------------------------------------------------------------- /test/resources/patch/read-write.ttl.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | 3 | <#Owner> a acl:Authorization; 4 | acl:accessTo <./read-write.ttl>; 5 | acl:agent ; 6 | acl:mode acl:Read, acl:Write. 7 | -------------------------------------------------------------------------------- /test/resources/patch/write-only.ttl: -------------------------------------------------------------------------------- 1 | . 2 | . 3 | -------------------------------------------------------------------------------- /test/resources/patch/write-only.ttl.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | 3 | <#Owner> a acl:Authorization; 4 | acl:accessTo <./write-only.ttl>; 5 | acl:agent ; 6 | acl:mode acl:Write. 7 | -------------------------------------------------------------------------------- /test/resources/put-input-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | PUT test HTML file 4 | 5 | 6 |

This file is test data for testing the ability to write a file 7 | to the srever using PUT. 8 | It is just and HTML file inUTF8. 9 |
10 | UTF8 thumps up: 👍 11 |

12 | 13 | 14 | -------------------------------------------------------------------------------- /test/resources/put-input.txt: -------------------------------------------------------------------------------- 1 | ### 2 | This file is input test data for tetsing the PUT functionality of the server 3 | ### 4 | UTF8 thumps up: 👍 5 | It is just a UTF8 text file. 6 | 7 | -------------------------------------------------------------------------------- /test/resources/sampleContainer/blank: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/sampleContainer/blank -------------------------------------------------------------------------------- /test/resources/sampleContainer/cert.pkcs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/sampleContainer/cert.pkcs -------------------------------------------------------------------------------- /test/resources/sampleContainer/example1.ttl: -------------------------------------------------------------------------------- 1 | @prefix rdf: . 2 | @prefix dc: . 3 | @prefix ex: . 4 | 5 | <#this> dc:title "Test title" . 6 | 7 | 8 | dc:title "RDF/XML Syntax Specification (Revised)" ; 9 | ex:editor [ 10 | ex:fullname "Dave Beckett"; 11 | ex:homePage 12 | ] . 13 | -------------------------------------------------------------------------------- /test/resources/sampleContainer/example2.ttl: -------------------------------------------------------------------------------- 1 | @prefix : . 2 | @prefix rdf: . 3 | :a :b "apple" . 4 | -------------------------------------------------------------------------------- /test/resources/sampleContainer/example3.ttl: -------------------------------------------------------------------------------- 1 | @prefix : . 2 | 3 | :a :b "The first line\nThe second line\n more" . 4 | 5 | :a :b """The first line 6 | The second line 7 | more""" . 8 | -------------------------------------------------------------------------------- /test/resources/sampleContainer/example4$.ttl: -------------------------------------------------------------------------------- 1 | @prefix : . 2 | 3 | :a :b "The first line\nThe second line\n more" . 4 | 5 | :a :b """The first line 6 | The second line 7 | more""" . 8 | -------------------------------------------------------------------------------- /test/resources/sampleContainer/filename with spaces.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/sampleContainer/filename with spaces.txt -------------------------------------------------------------------------------- /test/resources/sampleContainer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello! 5 | 6 | 7 | Sad empty file :( 8 | 9 | -------------------------------------------------------------------------------- /test/resources/sampleContainer/post2.ttl: -------------------------------------------------------------------------------- 1 | @prefix dcterms: . 2 | @prefix o: . 3 | 4 | <> a ; 5 | dcterms:title "Home loans" ; 6 | o:limit 500000.00 . 7 | -------------------------------------------------------------------------------- /test/resources/sampleContainer/put1.ttl: -------------------------------------------------------------------------------- 1 | @prefix ldp: . 2 | @prefix o: . 3 | 4 | 5 | a o:NetWorth; 6 | o:netWorthOf ; 7 | o:asset 8 | , 9 | ; 10 | o:liability 11 | , 12 | , 13 | . 14 | -------------------------------------------------------------------------------- /test/resources/sampleContainer/solid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/sampleContainer/solid.png -------------------------------------------------------------------------------- /test/resources/sampleContainer/user1.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/sampleContainer/user1.pfx -------------------------------------------------------------------------------- /test/resources/sampleContainer/user2.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/sampleContainer/user2.pfx -------------------------------------------------------------------------------- /test/resources/sampleContainer2/example1.ttl: -------------------------------------------------------------------------------- 1 | @prefix rdf: . 2 | @prefix dc: . 3 | @prefix ex: . 4 | 5 | 6 | dc:title "RDF/XML Syntax Specification (Revised)" ; 7 | ex:editor [ 8 | ex:fullname "Dave Beckett"; 9 | ex:homePage 10 | ] . 11 | -------------------------------------------------------------------------------- /test/resources/sampleContainer2/example2.ttl: -------------------------------------------------------------------------------- 1 | @prefix : . 2 | @prefix rdf: . 3 | :a :b 4 | [ rdf:first "apple"; 5 | rdf:rest [ rdf:first "banana"; 6 | rdf:rest rdf:nil ] 7 | ] . 8 | -------------------------------------------------------------------------------- /test/resources/timbl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/resources/timbl.jpg -------------------------------------------------------------------------------- /test/scenarios.md: -------------------------------------------------------------------------------- 1 | - Full tests (Solid) 2 | - with registered user, user is logged out 3 | - (1) User tries to get a resource 4 | - GET BOB/foo 5 | - sends 401 with redirect in HTML header 6 | - redirect GET BOB/api/accounts/signin 7 | - (2) User enters the webId so that the authorization endpoint is discovered 8 | - POST BOB/signin with WebID 9 | - response is a 302 to oidc.ALICE/authorize?callback=BOB/api/oidc/rp 10 | - (3) User is prompted password? and consent 11 | - (user enters password)? 12 | - user presses conset 13 | - form submit to oidc.ALICE/authorize?callback=BOB/api/oidc/rp 14 | - response is a 302 to BOB/api/oidc/rp 15 | - BOB/api/oidc/rp redirects to BOB/foo 16 | 17 | 18 | - needing registration 19 | - (0) User registers an account 20 | - POST ALICE/api/accounts/new 21 | - gives User 22 | - set the cookie 23 | - send an email (for verfication) 24 | -------------------------------------------------------------------------------- /test/settings/serverSide.ttl: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix pim: . 3 | @prefix solid: . 4 | @prefix unit: . 5 | 6 | <> 7 | a pim:ConfigurationFile; 8 | 9 | dct:description "Administrative settings for the server that are only readable to the user." . 10 | 11 | 12 | solid:storageQuota "1230" . 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/surface/docker/cookie/.dockerignore: -------------------------------------------------------------------------------- 1 | app/node_modules 2 | -------------------------------------------------------------------------------- /test/surface/docker/cookie/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node 2 | ADD app /app 3 | WORKDIR /app 4 | RUN npm install 5 | ENV NODE_TLS_REJECT_UNAUTHORIZED 0 6 | CMD node index.js 7 | -------------------------------------------------------------------------------- /test/surface/docker/cookie/app/index.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | 3 | const SERVER_ROOT = process.env.SERVER_ROOT || 'https://server' 4 | const LOGIN_URL = `${SERVER_ROOT}/login/password` 5 | const USERNAME = process.env.USERNAME || 'alice' 6 | const PASSWORD = process.env.PASSWORD || '123' 7 | 8 | async function getCookie () { 9 | const result = await fetch(LOGIN_URL, { 10 | body: [ 11 | `username=${USERNAME}`, 12 | `password=${PASSWORD}` 13 | ].join('&'), 14 | headers: { 15 | 'Content-Type': 'application/x-www-form-urlencoded' 16 | }, 17 | method: 'POST', 18 | redirect: 'manual' 19 | }) 20 | return result.headers.get('set-cookie') 21 | } 22 | 23 | async function run () { 24 | const cookie = await getCookie() 25 | console.log(cookie) 26 | } 27 | 28 | // ... 29 | run() 30 | -------------------------------------------------------------------------------- /test/surface/docker/cookie/app/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "get-nss-cookie", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "node-fetch": { 8 | "version": "2.6.1", 9 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", 10 | "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/surface/docker/cookie/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "get-nss-cookie", 3 | "version": "1.0.0", 4 | "description": "Get a cookie from a node-solid-server instance", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "node-fetch": "^2.6.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/surface/docker/server/.db/oidc/op/clients/_key_7e5c0fede7682892e36b2ef3ecda05a6.json: -------------------------------------------------------------------------------- 1 | {"redirect_uris":["https://server/api/oidc/rp/https%3A%2F%2Fserver"],"client_id":"7e5c0fede7682892e36b2ef3ecda05a6","client_secret":"d634791ff779ce90d378d714282e1374","response_types":["code","id_token token","code id_token token"],"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"application_type":"web","client_name":"Solid OIDC RP for https://server","id_token_signed_response_alg":"RS256","token_endpoint_auth_method":"client_secret_basic","default_max_age":86400,"post_logout_redirect_uris":["https://server/goodbye"]} -------------------------------------------------------------------------------- /test/surface/docker/server/.db/oidc/op/clients/_key_coolApp1.json: -------------------------------------------------------------------------------- 1 | {"redirect_uris":["http://localhost:3001/redirect"],"client_id":"coolApp1","client_secret":"9ae94c0a2f86a02a5dfa8d0a522f8176","response_types":["code"],"grant_types":["authorization_code"],"application_type":"web","id_token_signed_response_alg":"RS256","token_endpoint_auth_method":"client_secret_basic"} 2 | -------------------------------------------------------------------------------- /test/surface/docker/server/.db/oidc/op/clients/_key_coolApp2.json: -------------------------------------------------------------------------------- 1 | {"redirect_uris":["http://localhost:3002/redirect"],"client_id":"coolApp","client_secret":"9ae94c0a2f86a02a5dfa8d0a522f8176","response_types":["code"],"grant_types":["authorization_code"],"application_type":"web","id_token_signed_response_alg":"RS256","token_endpoint_auth_method":"client_secret_basic"} 2 | -------------------------------------------------------------------------------- /test/surface/docker/server/.db/oidc/users/users-by-email/_key_alice%40pdsinterop.org.json: -------------------------------------------------------------------------------- 1 | {"id":"server/profile/card#me"} 2 | -------------------------------------------------------------------------------- /test/surface/docker/server/.db/oidc/users/users/_key_server%2Fprofile%2Fcard%23me.json: -------------------------------------------------------------------------------- 1 | {"username":"alice","webId":"https://server/profile/card#me","name":"Alice","email":"alice@pdsinterop.org","externalWebId":"","hashedPassword":"$2a$10$NFqVQzFzHLpI25bf2/B74OGmodqEKZJjeDNGX13137jZ6Zr6nWuby"} 2 | -------------------------------------------------------------------------------- /test/surface/docker/server/.db/oidc/users/users/_key_thirdparty%2Fprofile%2Fcard%23me.json: -------------------------------------------------------------------------------- 1 | {"username":"alice","webId":"https://thirdparty/profile/card#me","name":"Alice","email":"alice@pdsinterop.org","externalWebId":"","hashedPassword":"$2a$10$NFqVQzFzHLpI25bf2/B74OGmodqEKZJjeDNGX13137jZ6Zr6nWuby"} 2 | -------------------------------------------------------------------------------- /test/surface/docker/server/.dockerignore: -------------------------------------------------------------------------------- 1 | Dockerfile 2 | -------------------------------------------------------------------------------- /test/surface/docker/server/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:latest 2 | ARG BRANCH=main 3 | ARG REPO=nodeSolidServer/node-solid-server 4 | RUN echo Testing branch ${BRANCH} of NSS 5 | RUN git clone https://github.com/${REPO} 6 | WORKDIR node-solid-server 7 | RUN git checkout ${BRANCH} 8 | RUN git status 9 | RUN npm install 10 | RUN openssl req -new -x509 -days 365 -nodes \ 11 | -out ./server.cert \ 12 | -keyout ./server.key \ 13 | -subj "/C=RO/ST=Bucharest/L=Bucharest/O=IT/CN=www.example.ro" 14 | EXPOSE 443 15 | ADD config.json . 16 | ADD config ./config 17 | ADD data ./data 18 | ADD .db ./.db 19 | CMD ./bin/solid-test start 20 | -------------------------------------------------------------------------------- /test/surface/docker/server/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": "./data", 3 | "port": "443", 4 | "serverUri": "https://server", 5 | "webid": true, 6 | "mount": "/", 7 | "configPath": "./config", 8 | "configFile": "./config.json", 9 | "dbPath": "./.db", 10 | "sslKey": "./server.key", 11 | "sslCert": "./server.cert", 12 | "multiuser": false, 13 | "server": { 14 | "name": "server", 15 | "description": "", 16 | "logo": "" 17 | }, 18 | "enforceToc": true, 19 | "disablePasswordChecks": false, 20 | "tocUri": "https://your-toc", 21 | "supportEmail": "Your support email address" 22 | } 23 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/defaults.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | auth: 'oidc', 3 | localAuth: { 4 | tls: true, 5 | password: true 6 | }, 7 | strictOrigin: true, 8 | trustedOrigins: [], 9 | dataBrowserPath: 'default' 10 | } 11 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/emails/invalid-username.js: -------------------------------------------------------------------------------- 1 | module.exports.render = render 2 | 3 | function render (data) { 4 | return { 5 | subject: `Invalid username for account ${data.accountUri}`, 6 | 7 | /** 8 | * Text version 9 | */ 10 | text: `Hi, 11 | 12 | We're sorry to inform you that the username for account ${data.accountUri} is not allowed after changes to username policy. 13 | 14 | This account has been set to be deleted at ${data.dateOfRemoval}. 15 | 16 | ${data.supportEmail ? `Please contact ${data.supportEmail} if you want to move your account.` : ''}`, 17 | 18 | /** 19 | * HTML version 20 | */ 21 | html: `

Hi,

22 | 23 |

We're sorry to inform you that the username for account ${data.accountUri} is not allowed after changes to username policy.

24 | 25 |

This account has been set to be deleted at ${data.dateOfRemoval}.

26 | 27 | ${data.supportEmail ? `

Please contact ${data.supportEmail} if you want to move your account.

` : ''} 28 | ` 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/emails/welcome.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /** 4 | * Returns a partial Email object (minus the `to` and `from` properties), 5 | * suitable for sending with Nodemailer. 6 | * 7 | * Used to send a Welcome email after a new user account has been created. 8 | * 9 | * @param data {Object} 10 | * 11 | * @param data.webid {string} 12 | * 13 | * @return {Object} 14 | */ 15 | function render (data) { 16 | return { 17 | subject: 'Welcome to Solid', 18 | 19 | /** 20 | * Text version of the Welcome email 21 | */ 22 | text: `Welcome to Solid! 23 | 24 | Your account has been created. 25 | 26 | Your Web Id: ${data.webid}`, 27 | 28 | /** 29 | * HTML version of the Welcome email 30 | */ 31 | html: `

Welcome to Solid!

32 | 33 |

Your account has been created.

34 | 35 |

Your Web Id: ${data.webid}

` 36 | } 37 | } 38 | 39 | module.exports.render = render 40 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the user account 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The homepage is readable by the public 6 | <#public> 7 | a acl:Authorization; 8 | acl:agentClass foaf:Agent; 9 | acl:accessTo ; 10 | acl:mode acl:Read. 11 | 12 | # The owner has full access to every resource in their pod. 13 | # Other agents have no access rights, 14 | # unless specifically authorized in other .acl resources. 15 | <#owner> 16 | a acl:Authorization; 17 | acl:agent <{{webId}}>; 18 | # Optional owner email, to be used for account recovery: 19 | {{#if email}}acl:agent ;{{/if}} 20 | # Set the access to the root storage folder itself 21 | acl:accessTo ; 22 | # All resources will inherit this authorization, by default 23 | acl:default ; 24 | # The owner has all of the access modes allowed 25 | acl:mode 26 | acl:Read, acl:Write, acl:Control. 27 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/.meta: -------------------------------------------------------------------------------- 1 | # Root Meta resource for the user account 2 | # Used to discover the account's WebID URI, given the account URI 3 | <{{webId}}> 4 | 5 | . 6 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/.meta.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the Root Meta 2 | # Should be public-readable (since the root meta is used for WebID discovery) 3 | 4 | @prefix acl: . 5 | @prefix foaf: . 6 | 7 | <#owner> 8 | a acl:Authorization; 9 | 10 | acl:agent 11 | <{{webId}}>; 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode 16 | acl:Read, acl:Write, acl:Control. 17 | 18 | <#public> 19 | a acl:Authorization; 20 | 21 | acl:agentClass foaf:Agent; # everyone 22 | 23 | acl:accessTo ; 24 | 25 | acl:mode acl:Read. 26 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/.well-known/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the well-known folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent <{{webId}}>; 9 | acl:accessTo <./>; 10 | acl:defaultForNew <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:defaultForNew <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/surface/docker/server/config/templates/new-account/favicon.ico -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/favicon.ico.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default favicon.ico resource 2 | # Individual users will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#owner> 9 | a acl:Authorization; 10 | 11 | acl:agent 12 | <{{webId}}>; 13 | 14 | acl:accessTo ; 15 | 16 | acl:mode 17 | acl:Read, acl:Write, acl:Control. 18 | 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo ; 25 | 26 | acl:mode acl:Read. 27 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/inbox/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the profile Inbox 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | <#owner> 7 | a acl:Authorization; 8 | 9 | acl:agent 10 | <{{webId}}>; 11 | 12 | acl:accessTo <./>; 13 | acl:default <./>; 14 | 15 | acl:mode 16 | acl:Read, acl:Write, acl:Control. 17 | 18 | # Public-appendable but NOT public-readable 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo <./>; 25 | 26 | acl:mode acl:Append. 27 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/private/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the private folder 2 | @prefix acl: . 3 | 4 | # The owner has all permissions 5 | <#owner> 6 | a acl:Authorization; 7 | acl:agent <{{webId}}>; 8 | acl:accessTo <./>; 9 | acl:default <./>; 10 | acl:mode acl:Read, acl:Write, acl:Control. 11 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/profile/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the profile folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent <{{webId}}>; 9 | acl:accessTo <./>; 10 | acl:default <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:default <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/profile/card$.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | @prefix foaf: . 3 | @prefix pim: . 4 | @prefix schema: . 5 | @prefix ldp: . 6 | 7 | <> 8 | a foaf:PersonalProfileDocument ; 9 | foaf:maker <{{webId}}> ; 10 | foaf:primaryTopic <{{webId}}> . 11 | 12 | <{{webId}}> 13 | a foaf:Person ; 14 | a schema:Person ; 15 | 16 | foaf:name "{{name}}" ; 17 | 18 | solid:account ; # link to the account uri 19 | pim:storage ; # root storage 20 | solid:oidcIssuer <{{idp}}> ; # identity provider 21 | 22 | ldp:inbox ; 23 | 24 | pim:preferencesFile ; # private settings/preferences 25 | solid:publicTypeIndex ; 26 | solid:privateTypeIndex . 27 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/public/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the public folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent <{{webId}}>; 9 | acl:accessTo <./>; 10 | acl:default <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:default <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | # Allow all crawling (subject to ACLs as usual, of course) 3 | Disallow: 4 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/robots.txt.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default robots.txt resource 2 | # Individual users will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#owner> 9 | a acl:Authorization; 10 | 11 | acl:agent 12 | <{{webId}}>; 13 | 14 | acl:accessTo ; 15 | 16 | acl:mode 17 | acl:Read, acl:Write, acl:Control. 18 | 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo ; 25 | 26 | acl:mode acl:Read. 27 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/settings/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the /settings/ container 2 | @prefix acl: . 3 | 4 | <#owner> 5 | a acl:Authorization; 6 | 7 | acl:agent 8 | <{{webId}}>; 9 | 10 | # Set the access to the root storage folder itself 11 | acl:accessTo <./>; 12 | 13 | # All settings resources will be private, by default, unless overridden 14 | acl:default <./>; 15 | 16 | # The owner has all of the access modes allowed 17 | acl:mode 18 | acl:Read, acl:Write, acl:Control. 19 | 20 | # Private, no public access modes 21 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/settings/prefs.ttl: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix pim: . 3 | @prefix foaf: . 4 | @prefix solid: . 5 | 6 | <> 7 | a pim:ConfigurationFile; 8 | 9 | dct:title "Preferences file" . 10 | 11 | {{#if email}}<{{webId}}> foaf:mbox .{{/if}} 12 | 13 | <{{webId}}> 14 | solid:publicTypeIndex ; 15 | solid:privateTypeIndex . 16 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/settings/privateTypeIndex.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | <> 3 | a solid:TypeIndex ; 4 | a solid:UnlistedDocument. 5 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/settings/publicTypeIndex.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | <> 3 | a solid:TypeIndex ; 4 | a solid:ListedDocument. 5 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/settings/publicTypeIndex.ttl.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the Public Type Index 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | <#owner> 7 | a acl:Authorization; 8 | 9 | acl:agent 10 | <{{webId}}>; 11 | 12 | acl:accessTo <./publicTypeIndex.ttl>; 13 | 14 | acl:mode 15 | acl:Read, acl:Write, acl:Control. 16 | 17 | # Public-readable 18 | <#public> 19 | a acl:Authorization; 20 | 21 | acl:agentClass foaf:Agent; # everyone 22 | 23 | acl:accessTo <./publicTypeIndex.ttl>; 24 | 25 | acl:mode acl:Read. 26 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/settings/serverSide.ttl.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | @prefix foaf: . 3 | 4 | <#owner> 5 | a acl:Authorization; 6 | 7 | acl:agent 8 | <{{webId}}>; 9 | 10 | acl:accessTo <./serverSide.ttl>; 11 | 12 | acl:mode acl:Read . 13 | 14 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/new-account/settings/serverSide.ttl.inactive: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix pim: . 3 | @prefix solid: . 4 | 5 | <> 6 | a pim:ConfigurationFile; 7 | 8 | dct:description "Administrative settings for the POD that the user can only read." . 9 | 10 | 11 | solid:storageQuota "25000000" . 12 | 13 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/server/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the root 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | <#public> 6 | a acl:Authorization; 7 | acl:agentClass foaf:Agent; # everyone 8 | acl:accessTo ; 9 | acl:default ; 10 | acl:mode acl:Read. 11 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/server/.well-known/.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default .well-known/ resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/server/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/surface/docker/server/config/templates/server/favicon.ico -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/server/favicon.ico.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default favicon.ico resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/server/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | # Allow all crawling (subject to ACLs as usual, of course) 3 | Disallow: 4 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/templates/server/robots.txt.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default robots.txt resource 2 | # Server operators will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#public> 9 | a acl:Authorization; 10 | 11 | acl:agentClass foaf:Agent; # everyone 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode acl:Read. 16 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/usernames-blacklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "useTheBigUsernameBlacklist": true, 3 | "customBlacklistedUsernames": [] 4 | } 5 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/account/account-deleted.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Account Deleted 7 | 8 | 9 | 10 |
11 |

Account Deleted

12 |
13 |
14 |

Your account has been deleted.

15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/account/delete-link-sent.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Delete Account Link Sent 7 | 8 | 9 | 10 |
11 |

Confirm account deletion

12 |
13 |
14 |

A link to confirm the deletion of this account has been sent to your email.

15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/account/invalid-username.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Invalid username 7 | 8 | 9 | 10 |
11 |

Invalid username

12 |
13 |
14 |

We're sorry to inform you that this account's username ({{username}}) is not allowed after changes to username policy.

15 |

This account has been set to be deleted at {{dateOfRemoval}}.

16 | {{#if supportEmail}} 17 |

Please contact {{supportEmail}} if you want to move your account.

18 | {{/if}} 19 |

If you had an email address connected to this account, you should have received an email about this.

20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/account/register-disabled.hbs: -------------------------------------------------------------------------------- 1 |
2 |

3 | Registering a new account is disabled for the WebID-TLS authentication method. 4 | Please restart the server using another mode. 5 |

6 |
7 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/account/register.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Register 7 | 8 | 9 | 10 | 11 |
12 | 13 | 16 | 17 | {{#if registerDisabled}} 18 | {{> account/register-disabled}} 19 | {{else}} 20 | {{> account/register-form}} 21 | {{/if}} 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/auth/auth-hidden-fields.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/auth/goodbye.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Logged Out 7 | 8 | 9 | 10 | 11 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/auth/login-tls.hbs: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/auth/no-permission.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | No permission 7 | 8 | 9 | 10 | 11 |
12 | 15 |
16 |

17 | You are currently logged in as {{webId}}, 18 | but do not have permission to access {{currentUrl}}. 19 |

20 |

21 | 22 |

23 |
24 |
25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/auth/password-changed.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Password Changed 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 |
17 |

Your password has been changed.

18 |
19 | 20 |

21 | 22 | Log in 23 | 24 |

25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/auth/reset-link-sent.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Reset Link Sent 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 |
17 |

A Reset Password link has been sent to your email.

18 |
19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/shared/create-account.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 | New to Solid? 4 | 5 | Create an account 6 | 7 |
8 |
9 | -------------------------------------------------------------------------------- /test/surface/docker/server/config/views/shared/error.hbs: -------------------------------------------------------------------------------- 1 | {{#if error}} 2 |
3 |

{{error}}

4 |
5 | {{/if}} 6 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/.acl: -------------------------------------------------------------------------------- 1 | # Root ACL resource for the user account 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The homepage is readable by the public 6 | <#public> 7 | a acl:Authorization; 8 | acl:agentClass foaf:Agent; 9 | acl:accessTo ; 10 | acl:mode acl:Read. 11 | 12 | # The owner has full access to every resource in their pod. 13 | # Other agents have no access rights, 14 | # unless specifically authorized in other .acl resources. 15 | <#owner> 16 | a acl:Authorization; 17 | acl:agent ; 18 | # Optional owner email, to be used for account recovery: 19 | acl:agent ; 20 | # Set the access to the root storage folder itself 21 | acl:accessTo ; 22 | # All resources will inherit this authorization, by default 23 | acl:default ; 24 | # The owner has all of the access modes allowed 25 | acl:mode 26 | acl:Read, acl:Write, acl:Control. 27 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/.meta: -------------------------------------------------------------------------------- 1 | # Root Meta resource for the user account 2 | # Used to discover the account's WebID URI, given the account URI 3 | 4 | 5 | . 6 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/.meta.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the Root Meta 2 | # Should be public-readable (since the root meta is used for WebID discovery) 3 | 4 | @prefix acl: . 5 | @prefix foaf: . 6 | 7 | <#owner> 8 | a acl:Authorization; 9 | 10 | acl:agent 11 | ; 12 | 13 | acl:accessTo ; 14 | 15 | acl:mode 16 | acl:Read, acl:Write, acl:Control. 17 | 18 | <#public> 19 | a acl:Authorization; 20 | 21 | acl:agentClass foaf:Agent; # everyone 22 | 23 | acl:accessTo ; 24 | 25 | acl:mode acl:Read. 26 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/.well-known/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the well-known folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent ; 9 | acl:accessTo <./>; 10 | acl:defaultForNew <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:defaultForNew <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/surface/docker/server/data/favicon.ico -------------------------------------------------------------------------------- /test/surface/docker/server/data/favicon.ico.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default favicon.ico resource 2 | # Individual users will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#owner> 9 | a acl:Authorization; 10 | 11 | acl:agent 12 | ; 13 | 14 | acl:accessTo ; 15 | 16 | acl:mode 17 | acl:Read, acl:Write, acl:Control. 18 | 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo ; 25 | 26 | acl:mode acl:Read. 27 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/inbox/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the profile Inbox 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | <#owner> 7 | a acl:Authorization; 8 | 9 | acl:agent 10 | ; 11 | 12 | acl:accessTo <./>; 13 | acl:default <./>; 14 | 15 | acl:mode 16 | acl:Read, acl:Write, acl:Control. 17 | 18 | # Public-appendable but NOT public-readable 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo <./>; 25 | 26 | acl:mode acl:Append. 27 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/private/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the private folder 2 | @prefix acl: . 3 | 4 | # The owner has all permissions 5 | <#owner> 6 | a acl:Authorization; 7 | acl:agent ; 8 | acl:accessTo <./>; 9 | acl:default <./>; 10 | acl:mode acl:Read, acl:Write, acl:Control. 11 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/profile/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the profile folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent ; 9 | acl:accessTo <./>; 10 | acl:default <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:default <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/public/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the public folder 2 | @prefix acl: . 3 | @prefix foaf: . 4 | 5 | # The owner has all permissions 6 | <#owner> 7 | a acl:Authorization; 8 | acl:agent ; 9 | acl:accessTo <./>; 10 | acl:default <./>; 11 | acl:mode acl:Read, acl:Write, acl:Control. 12 | 13 | # The public has read permissions 14 | <#public> 15 | a acl:Authorization; 16 | acl:agentClass foaf:Agent; 17 | acl:accessTo <./>; 18 | acl:default <./>; 19 | acl:mode acl:Read. 20 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | # Allow all crawling (subject to ACLs as usual, of course) 3 | Disallow: 4 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/robots.txt.acl: -------------------------------------------------------------------------------- 1 | # ACL for the default robots.txt resource 2 | # Individual users will be able to override it as they wish 3 | # Public-readable 4 | 5 | @prefix acl: . 6 | @prefix foaf: . 7 | 8 | <#owner> 9 | a acl:Authorization; 10 | 11 | acl:agent 12 | ; 13 | 14 | acl:accessTo ; 15 | 16 | acl:mode 17 | acl:Read, acl:Write, acl:Control. 18 | 19 | <#public> 20 | a acl:Authorization; 21 | 22 | acl:agentClass foaf:Agent; # everyone 23 | 24 | acl:accessTo ; 25 | 26 | acl:mode acl:Read. 27 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/settings/.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the /settings/ container 2 | @prefix acl: . 3 | 4 | <#owner> 5 | a acl:Authorization; 6 | 7 | acl:agent 8 | ; 9 | 10 | # Set the access to the root storage folder itself 11 | acl:accessTo <./>; 12 | 13 | # All settings resources will be private, by default, unless overridden 14 | acl:default <./>; 15 | 16 | # The owner has all of the access modes allowed 17 | acl:mode 18 | acl:Read, acl:Write, acl:Control. 19 | 20 | # Private, no public access modes 21 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/settings/prefs.ttl: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix pim: . 3 | @prefix foaf: . 4 | @prefix solid: . 5 | 6 | <> 7 | a pim:ConfigurationFile; 8 | 9 | dct:title "Preferences file" . 10 | 11 | foaf:mbox . 12 | 13 | 14 | solid:publicTypeIndex ; 15 | solid:privateTypeIndex . 16 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/settings/privateTypeIndex.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | <> 3 | a solid:TypeIndex ; 4 | a solid:UnlistedDocument. 5 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/settings/publicTypeIndex.ttl: -------------------------------------------------------------------------------- 1 | @prefix solid: . 2 | <> 3 | a solid:TypeIndex ; 4 | a solid:ListedDocument. 5 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/settings/publicTypeIndex.ttl.acl: -------------------------------------------------------------------------------- 1 | # ACL resource for the Public Type Index 2 | 3 | @prefix acl: . 4 | @prefix foaf: . 5 | 6 | <#owner> 7 | a acl:Authorization; 8 | 9 | acl:agent 10 | ; 11 | 12 | acl:accessTo <./publicTypeIndex.ttl>; 13 | 14 | acl:mode 15 | acl:Read, acl:Write, acl:Control. 16 | 17 | # Public-readable 18 | <#public> 19 | a acl:Authorization; 20 | 21 | acl:agentClass foaf:Agent; # everyone 22 | 23 | acl:accessTo <./publicTypeIndex.ttl>; 24 | 25 | acl:mode acl:Read. 26 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/settings/serverSide.ttl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodeSolidServer/node-solid-server/1fcedb253267541ce036bb9aa7720caaf812547d/test/surface/docker/server/data/settings/serverSide.ttl -------------------------------------------------------------------------------- /test/surface/docker/server/data/settings/serverSide.ttl.acl: -------------------------------------------------------------------------------- 1 | @prefix acl: . 2 | @prefix foaf: . 3 | 4 | <#owner> 5 | a acl:Authorization; 6 | 7 | acl:agent 8 | ; 9 | 10 | acl:accessTo <./serverSide.ttl>; 11 | 12 | acl:mode acl:Read . 13 | 14 | -------------------------------------------------------------------------------- /test/surface/docker/server/data/settings/serverSide.ttl.inactive: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix pim: . 3 | @prefix solid: . 4 | 5 | <> 6 | a pim:ConfigurationFile; 7 | 8 | dct:description "Administrative settings for the POD that the user can only read." . 9 | 10 | 11 | solid:storageQuota "25000000" . 12 | 13 | -------------------------------------------------------------------------------- /test/surface/docker/server/env.list: -------------------------------------------------------------------------------- 1 | ALICE_WEBID=https://server/profile/card#me 2 | SERVER_ROOT=https://server 3 | USERNAME=alice 4 | PASSWORD=123 5 | -------------------------------------------------------------------------------- /test/surface/docker/solid-crud/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM solidtestsuite/solid-crud-tests 2 | RUN git fetch origin 3 | RUN git checkout nss-skips 4 | RUN git pull 5 | -------------------------------------------------------------------------------- /test/surface/docker/web-access-control/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM solidtestsuite/web-access-control-tests 2 | -------------------------------------------------------------------------------- /test/surface/docker/webid-provider/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM solidtestsuite/webid-provider-tests 2 | -------------------------------------------------------------------------------- /test/surface/server-env.list: -------------------------------------------------------------------------------- 1 | ALICE_WEBID=https://server/profile/card#me 2 | SERVER_ROOT=https://server 3 | USERNAME=alice 4 | PASSWORD=123 5 | ACL_CACHE_TIME=5 -------------------------------------------------------------------------------- /test/surface/solid-crud-tests-env.list: -------------------------------------------------------------------------------- 1 | ALICE_WEBID=https://server/profile/card#me 2 | SERVER_ROOT=https://server 3 | USERNAME=alice 4 | PASSWORD=123 5 | SKIP_CONC=1 6 | -------------------------------------------------------------------------------- /test/surface/thirdparty-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": "./data", 3 | "port": "443", 4 | "serverUri": "https://thirdparty", 5 | "webid": true, 6 | "mount": "/", 7 | "configPath": "./config", 8 | "configFile": "./config.json", 9 | "dbPath": "./.db", 10 | "sslKey": "./server.key", 11 | "sslCert": "./server.cert", 12 | "multiuser": false, 13 | "server": { 14 | "name": "server", 15 | "description": "", 16 | "logo": "" 17 | }, 18 | "enforceToc": true, 19 | "disablePasswordChecks": false, 20 | "tocUri": "https://your-toc", 21 | "supportEmail": "Your support email address" 22 | } 23 | 24 | -------------------------------------------------------------------------------- /test/surface/thirdparty-env.list: -------------------------------------------------------------------------------- 1 | ALICE_WEBID=https://thirdparty/profile/card#me 2 | SERVER_ROOT=https://thirdparty 3 | USERNAME=alice 4 | PASSWORD=123 5 | ACL_CACHE_TIME=5 6 | 7 | -------------------------------------------------------------------------------- /test/surface/web-access-control-tests-env.list: -------------------------------------------------------------------------------- 1 | WEBID_ALICE=https://server/profile/card#me 2 | OIDC_ISSUER_ALICE=https://server 3 | STORAGE_ROOT_ALICE=https://server/ 4 | WEBID_BOB=https://thirdparty/profile/card#me 5 | OIDC_ISSUER_BOB=https://thirdparty 6 | STORAGE_ROOT_BOB=https://thirdparty/ -------------------------------------------------------------------------------- /test/surface/webid-provider-tests-env.list: -------------------------------------------------------------------------------- 1 | ALICE_WEBID=https://server/profile/card#me 2 | SERVER_ROOT=https://server 3 | USERNAME=alice 4 | PASSWORD=123 5 | -------------------------------------------------------------------------------- /test/unit/authenticator-test.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chai = require('chai') 3 | const { expect } = chai 4 | chai.use(require('chai-as-promised')) 5 | chai.should() 6 | 7 | const { Authenticator } = require('../../lib/models/authenticator') 8 | 9 | describe('Authenticator', () => { 10 | describe('constructor()', () => { 11 | it('should initialize the accountManager property', () => { 12 | const accountManager = {} 13 | const auth = new Authenticator({ accountManager }) 14 | 15 | expect(auth.accountManager).to.equal(accountManager) 16 | }) 17 | }) 18 | 19 | describe('fromParams()', () => { 20 | it('should throw an abstract method error', () => { 21 | expect(() => Authenticator.fromParams()) 22 | .to.throw(/Must override method/) 23 | }) 24 | }) 25 | 26 | describe('findValidUser()', () => { 27 | it('should throw an abstract method error', () => { 28 | const auth = new Authenticator({}) 29 | 30 | expect(() => auth.findValidUser()) 31 | .to.throw(/Must override method/) 32 | }) 33 | }) 34 | }) 35 | -------------------------------------------------------------------------------- /test/unit/options.js: -------------------------------------------------------------------------------- 1 | const assert = require('chai').assert 2 | 3 | const options = require('../../bin/lib/options') 4 | 5 | describe('Command line options', function () { 6 | describe('options', function () { 7 | it('is an array', function () { 8 | assert.equal(Array.isArray(options), true) 9 | }) 10 | 11 | it('contains only `name`s that are kebab-case', function () { 12 | assert.equal( 13 | options.every(({ name }) => (/^[a-z][a-z0-9-]*$/).test(name)), 14 | true 15 | ) 16 | }) 17 | }) 18 | }) 19 | --------------------------------------------------------------------------------