solid-server 5.6.9-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.acl +10 -0
- package/.github/workflows/ci.yml +47 -0
- package/.nvmrc +1 -0
- package/.snyk +35 -0
- package/.well-known/.acl +15 -0
- package/CHANGELOG.md +198 -0
- package/CONTRIBUTING.md +139 -0
- package/CONTRIBUTORS.md +36 -0
- package/Dockerfile +22 -0
- package/LICENSE.md +23 -0
- package/README.md +453 -0
- package/bin/lib/cli-utils.js +85 -0
- package/bin/lib/cli.js +39 -0
- package/bin/lib/init.js +94 -0
- package/bin/lib/invalidUsernames.js +148 -0
- package/bin/lib/migrateLegacyResources.js +69 -0
- package/bin/lib/options.js +399 -0
- package/bin/lib/start.js +148 -0
- package/bin/lib/updateIndex.js +56 -0
- package/bin/solid +3 -0
- package/bin/solid-test +12 -0
- package/bin/solid.js +3 -0
- package/common/css/solid.css +58 -0
- package/common/fonts/glyphicons-halflings-regular.eot +0 -0
- package/common/fonts/glyphicons-halflings-regular.svg +288 -0
- package/common/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/common/fonts/glyphicons-halflings-regular.woff +0 -0
- package/common/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/common/img/.gitkeep +0 -0
- package/common/js/auth-buttons.js +65 -0
- package/common/js/solid.js +454 -0
- package/common/well-known/security.txt +2 -0
- package/config/defaults.js +25 -0
- package/config/usernames-blacklist.json +4 -0
- package/config.json-default +22 -0
- package/default-templates/emails/delete-account.js +49 -0
- package/default-templates/emails/invalid-username.js +30 -0
- package/default-templates/emails/reset-password.js +49 -0
- package/default-templates/emails/welcome.js +39 -0
- package/default-templates/new-account/.acl +26 -0
- package/default-templates/new-account/.meta +5 -0
- package/default-templates/new-account/.meta.acl +25 -0
- package/default-templates/new-account/.well-known/.acl +19 -0
- package/default-templates/new-account/favicon.ico +0 -0
- package/default-templates/new-account/favicon.ico.acl +26 -0
- package/default-templates/new-account/inbox/.acl +26 -0
- package/default-templates/new-account/private/.acl +10 -0
- package/default-templates/new-account/profile/.acl +19 -0
- package/default-templates/new-account/profile/card$.ttl +25 -0
- package/default-templates/new-account/public/.acl +19 -0
- package/default-templates/new-account/robots.txt +3 -0
- package/default-templates/new-account/robots.txt.acl +26 -0
- package/default-templates/new-account/settings/.acl +20 -0
- package/default-templates/new-account/settings/prefs.ttl +15 -0
- package/default-templates/new-account/settings/privateTypeIndex.ttl +4 -0
- package/default-templates/new-account/settings/publicTypeIndex.ttl +4 -0
- package/default-templates/new-account/settings/publicTypeIndex.ttl.acl +25 -0
- package/default-templates/new-account/settings/serverSide.ttl.acl +13 -0
- package/default-templates/new-account/settings/serverSide.ttl.inactive +12 -0
- package/default-templates/server/.acl +10 -0
- package/default-templates/server/.well-known/.acl +15 -0
- package/default-templates/server/favicon.ico +0 -0
- package/default-templates/server/favicon.ico.acl +15 -0
- package/default-templates/server/index.html +55 -0
- package/default-templates/server/robots.txt +3 -0
- package/default-templates/server/robots.txt.acl +15 -0
- package/default-views/account/account-deleted.hbs +17 -0
- package/default-views/account/delete-confirm.hbs +51 -0
- package/default-views/account/delete-link-sent.hbs +17 -0
- package/default-views/account/delete.hbs +51 -0
- package/default-views/account/invalid-username.hbs +22 -0
- package/default-views/account/register-disabled.hbs +6 -0
- package/default-views/account/register-form.hbs +132 -0
- package/default-views/account/register.hbs +24 -0
- package/default-views/auth/auth-hidden-fields.hbs +8 -0
- package/default-views/auth/change-password.hbs +58 -0
- package/default-views/auth/goodbye.hbs +23 -0
- package/default-views/auth/login-required.hbs +34 -0
- package/default-views/auth/login-tls.hbs +11 -0
- package/default-views/auth/login-username-password.hbs +28 -0
- package/default-views/auth/login.hbs +55 -0
- package/default-views/auth/no-permission.hbs +29 -0
- package/default-views/auth/password-changed.hbs +27 -0
- package/default-views/auth/reset-link-sent.hbs +21 -0
- package/default-views/auth/reset-password.hbs +52 -0
- package/default-views/auth/sharing.hbs +49 -0
- package/default-views/shared/create-account.hbs +8 -0
- package/default-views/shared/error.hbs +5 -0
- package/docs/how-to-delete-your-account.md +56 -0
- package/docs/login-and-grant-access-to-application.md +32 -0
- package/examples/custom-error-handling.js +31 -0
- package/examples/ldp-with-webid.js +12 -0
- package/examples/simple-express-app.js +20 -0
- package/examples/simple-ldp-server.js +8 -0
- package/favicon.ico +0 -0
- package/favicon.ico.acl +15 -0
- package/index.html +48 -0
- package/index.js +3 -0
- package/lib/acl-checker.js +274 -0
- package/lib/api/accounts/user-accounts.js +88 -0
- package/lib/api/authn/force-user.js +21 -0
- package/lib/api/authn/index.js +5 -0
- package/lib/api/authn/webid-oidc.js +202 -0
- package/lib/api/authn/webid-tls.js +69 -0
- package/lib/api/index.js +6 -0
- package/lib/capability-discovery.js +54 -0
- package/lib/common/fs-utils.js +43 -0
- package/lib/common/template-utils.js +50 -0
- package/lib/common/user-utils.js +28 -0
- package/lib/create-app.js +322 -0
- package/lib/create-server.js +107 -0
- package/lib/debug.js +17 -0
- package/lib/handlers/allow.js +82 -0
- package/lib/handlers/auth-proxy.js +63 -0
- package/lib/handlers/copy.js +39 -0
- package/lib/handlers/cors-proxy.js +95 -0
- package/lib/handlers/delete.js +23 -0
- package/lib/handlers/error-pages.js +212 -0
- package/lib/handlers/get.js +219 -0
- package/lib/handlers/index.js +42 -0
- package/lib/handlers/options.js +33 -0
- package/lib/handlers/patch/n3-patch-parser.js +49 -0
- package/lib/handlers/patch/sparql-update-parser.js +16 -0
- package/lib/handlers/patch.js +203 -0
- package/lib/handlers/post.js +99 -0
- package/lib/handlers/put.js +56 -0
- package/lib/handlers/restrict-to-top-domain.js +13 -0
- package/lib/header.js +136 -0
- package/lib/http-error.js +34 -0
- package/lib/ldp-container.js +161 -0
- package/lib/ldp-copy.js +73 -0
- package/lib/ldp-middleware.js +32 -0
- package/lib/ldp.js +620 -0
- package/lib/lock.js +10 -0
- package/lib/metadata.js +10 -0
- package/lib/models/account-manager.js +603 -0
- package/lib/models/account-template.js +152 -0
- package/lib/models/authenticator.js +333 -0
- package/lib/models/oidc-manager.js +53 -0
- package/lib/models/solid-host.js +131 -0
- package/lib/models/user-account.js +112 -0
- package/lib/models/webid-tls-certificate.js +184 -0
- package/lib/payment-pointer-discovery.js +83 -0
- package/lib/requests/add-cert-request.js +138 -0
- package/lib/requests/auth-request.js +234 -0
- package/lib/requests/create-account-request.js +468 -0
- package/lib/requests/delete-account-confirm-request.js +170 -0
- package/lib/requests/delete-account-request.js +144 -0
- package/lib/requests/login-request.js +205 -0
- package/lib/requests/password-change-request.js +201 -0
- package/lib/requests/password-reset-email-request.js +199 -0
- package/lib/requests/sharing-request.js +259 -0
- package/lib/resource-mapper.js +198 -0
- package/lib/server-config.js +167 -0
- package/lib/services/blacklist-service.js +33 -0
- package/lib/services/email-service.js +162 -0
- package/lib/services/token-service.js +47 -0
- package/lib/utils.js +254 -0
- package/lib/webid/index.js +13 -0
- package/lib/webid/lib/get.js +27 -0
- package/lib/webid/lib/parse.js +12 -0
- package/lib/webid/tls/index.js +185 -0
- package/package.json +172 -0
- package/renovate.json +5 -0
- package/robots.txt +3 -0
- package/robots.txt.acl +15 -0
- package/static/account-recovery.html +78 -0
- package/static/popup-redirect.html +1 -0
- package/static/signup.html +108 -0
- package/static/signup.html.acl +14 -0
package/.acl
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Root ACL resource for the root
|
|
2
|
+
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
|
|
3
|
+
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
|
|
4
|
+
|
|
5
|
+
<#public>
|
|
6
|
+
a acl:Authorization;
|
|
7
|
+
acl:agentClass foaf:Agent; # everyone
|
|
8
|
+
acl:accessTo </>;
|
|
9
|
+
acl:default </common/>;
|
|
10
|
+
acl:mode acl:Read.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: CI
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ main ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
node-version: [12.x, 14.x]
|
|
20
|
+
os: [ubuntu-latest]
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v2
|
|
24
|
+
# extract branch name
|
|
25
|
+
- if: github.event_name == 'pull_request'
|
|
26
|
+
run: echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
|
27
|
+
- if: github.event_name != 'pull_request'
|
|
28
|
+
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
|
|
29
|
+
|
|
30
|
+
# print branch name
|
|
31
|
+
- name: Get branch name
|
|
32
|
+
run: echo 'The branch name is' $BRANCH_NAME
|
|
33
|
+
|
|
34
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
35
|
+
uses: actions/setup-node@v1
|
|
36
|
+
with:
|
|
37
|
+
node-version: ${{ matrix.node-version }}
|
|
38
|
+
- run: npm ci
|
|
39
|
+
# test code
|
|
40
|
+
- run: npm run standard
|
|
41
|
+
- run: npm run validate
|
|
42
|
+
- run: npm run nyc
|
|
43
|
+
# Test global install of the package
|
|
44
|
+
- run: npm pack .
|
|
45
|
+
- run: npm install -g solid-server-*.tgz
|
|
46
|
+
# Run the Solid test-suite
|
|
47
|
+
- run: bash test/surface/run-solid-test-suite.sh $BRANCH_NAME
|
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
13.14.0
|
package/.snyk
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
|
2
|
+
version: v1.12.0
|
|
3
|
+
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
|
4
|
+
ignore:
|
|
5
|
+
'npm:braces:20180219':
|
|
6
|
+
- http-proxy-middleware > micromatch > braces:
|
|
7
|
+
reason: None given
|
|
8
|
+
expires: '2018-09-11T01:52:14.022Z'
|
|
9
|
+
'npm:node-forge:20180226':
|
|
10
|
+
- node-forge:
|
|
11
|
+
reason: None given
|
|
12
|
+
expires: '2018-09-11T01:52:14.022Z'
|
|
13
|
+
- webid > node-forge:
|
|
14
|
+
reason: None given
|
|
15
|
+
expires: '2018-09-11T01:52:14.023Z'
|
|
16
|
+
'npm:base64url:20180511':
|
|
17
|
+
- rdflib > solid-auth-client > @trust/oidc-rp > base64url:
|
|
18
|
+
reason: None given
|
|
19
|
+
expires: '2018-09-11T01:52:14.023Z'
|
|
20
|
+
- rdflib > solid-auth-client > @trust/oidc-rp > @trust/webcrypto > base64url:
|
|
21
|
+
reason: None given
|
|
22
|
+
expires: '2018-09-11T01:52:14.023Z'
|
|
23
|
+
- oidc-auth-manager > rdflib > solid-auth-client > @trust/oidc-rp > base64url:
|
|
24
|
+
reason: None given
|
|
25
|
+
expires: '2018-09-11T01:52:14.023Z'
|
|
26
|
+
- oidc-auth-manager > rdflib > solid-auth-client > @trust/oidc-rp > @trust/webcrypto > base64url:
|
|
27
|
+
reason: None given
|
|
28
|
+
expires: '2018-09-11T01:52:14.023Z'
|
|
29
|
+
- solid-auth-client@2.1.0 > @trust/oidc-rp@0.4.3 > base64url@2.0.0:
|
|
30
|
+
reason: None given
|
|
31
|
+
expires: '2018-09-11T01:52:14.023Z'
|
|
32
|
+
- solid-auth-client@2.1.0 > @trust/oidc-rp@0.4.3 > @trust/webcrypto@0.4.0 > base64url@2.0.0:
|
|
33
|
+
reason: None given
|
|
34
|
+
expires: '2018-09-11T01:52:14.023Z'
|
|
35
|
+
patch: {}
|
package/.well-known/.acl
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
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: <http://www.w3.org/ns/auth/acl#>.
|
|
6
|
+
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
|
|
7
|
+
|
|
8
|
+
<#public>
|
|
9
|
+
a acl:Authorization;
|
|
10
|
+
|
|
11
|
+
acl:agentClass foaf:Agent; # everyone
|
|
12
|
+
|
|
13
|
+
acl:accessTo </.well-known/>;
|
|
14
|
+
|
|
15
|
+
acl:mode acl:Read.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# History
|
|
2
|
+
## 5.3.0
|
|
3
|
+
- Support for webid-oidc with DPop tokens
|
|
4
|
+
|
|
5
|
+
## 5.3.0 Upgrade Notes
|
|
6
|
+
You may have a `.db/oidc/op/provider.json` file that was generated by an older version
|
|
7
|
+
of node-solid-server, which may still specify `"response_types_supported"` without listing
|
|
8
|
+
`"id_token code"`. You can move this file out of the way and restart node-solid-server,
|
|
9
|
+
it will be created again. See https://github.com/solid/node-solid-server/issues/1433 for
|
|
10
|
+
more info.
|
|
11
|
+
|
|
12
|
+
## 5.0.0
|
|
13
|
+
|
|
14
|
+
- Node versions greater than 8 are supported.
|
|
15
|
+
- Changes to vocabulary use:
|
|
16
|
+
- `solid:inbox` is deprecated in favour of `ldp:inbox`.
|
|
17
|
+
- `acl:defaultForNew` is deprecated in favour of `acl:default`.
|
|
18
|
+
- Terms of Service may be added and enforced for new registrations,
|
|
19
|
+
but is disabled by default.
|
|
20
|
+
- DELETE operations on a resource now require that the user has write permissions on
|
|
21
|
+
the file's container
|
|
22
|
+
- Improved support for logout ensures users can use different
|
|
23
|
+
identities.
|
|
24
|
+
- The profile container is now public readable by default.
|
|
25
|
+
- Access Control:
|
|
26
|
+
- The Access Control List system has undergone extensive
|
|
27
|
+
changes. Security has been tightened, and some unsafe practices that
|
|
28
|
+
where web apps was authorized access in the past are now not
|
|
29
|
+
permitted.
|
|
30
|
+
- The browser-reported `Origin` header will now be checked by
|
|
31
|
+
default, and the ACL system can be used to restrict access
|
|
32
|
+
to applications for added security.
|
|
33
|
+
- Users can add `trustedApp` entries to their profile using a new databrowser pane.
|
|
34
|
+
You will see an 'A' icon added while you view a Person's profile URL
|
|
35
|
+
with the data browser (might have to hit refresh in your browser and make sure you
|
|
36
|
+
are viewing a WebId URL like https://localhost:8443/profile/card#me).
|
|
37
|
+
- Logging is now verbose by default so the `-v` option has been
|
|
38
|
+
removed and a `--quiet` option has been added to mute the log.
|
|
39
|
+
- To be bug compliant with 4.x releases, if a rule for public readable
|
|
40
|
+
root / does not exist, it will check in /index.html.acl (see issue #1063)
|
|
41
|
+
- Command line options are now kebab-cased rather than camelCased,
|
|
42
|
+
config options may be both.
|
|
43
|
+
- Resource with no extension now have '$.ttl' appended in the filename (see upgrades notes below).
|
|
44
|
+
- Many smaller fixes.
|
|
45
|
+
|
|
46
|
+
#### 5.0.0 Upgrade Notes
|
|
47
|
+
|
|
48
|
+
- As of v5.0.0, all Turtle files need an extension. (**Intervention needed when updating from < 5.0.0!**)
|
|
49
|
+
- **How to upgrade?**
|
|
50
|
+
1. Stop the server.
|
|
51
|
+
2. Update node-solid-server to 5.0.0.
|
|
52
|
+
3. Make a backup of your `data/` and `config/` folders.
|
|
53
|
+
4. Invoke `solid migrate-legacy-resources -v`.
|
|
54
|
+
This makes the files in your `data/` and `config/` folders
|
|
55
|
+
automatically compatible with the new system.
|
|
56
|
+
You only need to do this once.
|
|
57
|
+
Different data folders can be migrated as well with the `-p` option:
|
|
58
|
+
`solid migrate-legacy-resources -p my/custom/data/folder -v`
|
|
59
|
+
5. You can now start the server again as usual.
|
|
60
|
+
- **Why?**
|
|
61
|
+
Before version 5.0.0, `https://pod.example/profile/card`
|
|
62
|
+
would map to `file:///solid/profile/card`, with the _assumption_
|
|
63
|
+
that it uses content-type `text/turtle`.
|
|
64
|
+
Now, this URL will map to `file:///solid/profile/card$.ttl` instead,
|
|
65
|
+
which makes the content-type automatically detectable.
|
|
66
|
+
This fixes many of the old Content-Type-related bugs.
|
|
67
|
+
_More information: https://www.w3.org/DesignIssues/HTTPFilenameMapping.html_
|
|
68
|
+
|
|
69
|
+
## 4.4.0
|
|
70
|
+
|
|
71
|
+
- Introduce a quota system. Delete the /settings/serverSide.ttl in the
|
|
72
|
+
user's POD to disable, or edit to fit your resource constraints.
|
|
73
|
+
|
|
74
|
+
#### Changelog is incomplete for much of the 4.x series
|
|
75
|
+
|
|
76
|
+
## 4.1.0
|
|
77
|
+
|
|
78
|
+
- Add support for Group Access Control Lists.
|
|
79
|
+
- Fix `Vary` header.
|
|
80
|
+
- Improve the registration page.
|
|
81
|
+
- Fix globbing.
|
|
82
|
+
- Fix the use of allow handler.
|
|
83
|
+
- Misc. cleanups and improvements.
|
|
84
|
+
- Add .well-known folder and set up with public access.
|
|
85
|
+
|
|
86
|
+
## 4.0.0
|
|
87
|
+
- OIDC is now supported as authentication method in addition to WebID-TLS.
|
|
88
|
+
- Both Node.js 6 and 8 are now supported.
|
|
89
|
+
- The server now accepts N3 patches.
|
|
90
|
+
- Responses now contain a WAC-Allow header, listing the access permissions
|
|
91
|
+
for the current user and non-authenticated users.
|
|
92
|
+
- The `authProxy` configuration parameter has been added,
|
|
93
|
+
enabling back-end servers to serve authenticated content.
|
|
94
|
+
It accepts an object of path/server pairs
|
|
95
|
+
(such as `/my/path": "http://localhost:2345/app"`).
|
|
96
|
+
The Solid server acts as a reverse proxy for these paths, forwarding requests
|
|
97
|
+
to the back-end server along with the authenticated user (`User` header)
|
|
98
|
+
and the host through which Solid is being accessed (`Forwarded` header).
|
|
99
|
+
- The `acceptCertificateHeader` configuration parameter has been added.
|
|
100
|
+
This allows WebID-TLS authentication behind a reverse proxy such as NGINX:
|
|
101
|
+
the reverse proxy should be configured to pass the client certificate
|
|
102
|
+
in a certain header, which is then read by a (non-public) Solid server.
|
|
103
|
+
- Self-signed certificates are no longer trusted in production.
|
|
104
|
+
To allow self-signed certificates (for testing purposes), use `bin/solid-test`,
|
|
105
|
+
which sets `NODE_TLS_REJECT_UNAUTHORIZED=0` and `--no-reject-unauthorized`.
|
|
106
|
+
- On POST requests, an extension will be appended to the file.
|
|
107
|
+
- Server logging is now more concise.
|
|
108
|
+
- Express server injection is now supported
|
|
109
|
+
- The root route (e.g. `/`) now displays a public home page.
|
|
110
|
+
- Several other bugfixes
|
|
111
|
+
|
|
112
|
+
#### 4.0.0 Upgrade Notes
|
|
113
|
+
- The `proxy` configuration parameter has been deprecated and
|
|
114
|
+
renamed to `corsProxy` to better distinguish it from `authProxy`.
|
|
115
|
+
- The `idp` configuration parameter has been deprecated and
|
|
116
|
+
renamed to `multiuser` to better identify its purpose.
|
|
117
|
+
- Cross-domain cookie-based authentication has been removed for security reasons.
|
|
118
|
+
We instead recommend https://github.com/solid/solid-auth-client.
|
|
119
|
+
- Clients should not include an extension in the slug of POST requests
|
|
120
|
+
(they never should have), as the server now adds an extension.
|
|
121
|
+
|
|
122
|
+
## 3.5.0
|
|
123
|
+
|
|
124
|
+
- Major refactoring of Account Creation classes (new account resources are now
|
|
125
|
+
initialized from a customizable account directory template)
|
|
126
|
+
- Disable crashing `verifyDelegator()` code in `allow()` handler
|
|
127
|
+
- Add support for HTTP COPY of external resources
|
|
128
|
+
- Fix URI encoding in file listing and decoding to get file names
|
|
129
|
+
- Fix issue where requesting a different format (e.g. `text/turtle`) of a
|
|
130
|
+
JSON-LD resource crashed the server
|
|
131
|
+
|
|
132
|
+
#### 3.5.0 Upgrade Notes
|
|
133
|
+
|
|
134
|
+
- New config parameter: `serverUri` - Solid server uri (with protocol,
|
|
135
|
+
hostname and port), defaults to `https://localhost:8443`. In multi-user
|
|
136
|
+
(`"idp": true`) mode, new account directories are now created based on this
|
|
137
|
+
`serverUri` parameter. For example, if the `config.json` contains the entry
|
|
138
|
+
`"serverUri": "https://example.com"`, a new account for `alice` will create
|
|
139
|
+
a subdirectory `alice.example.com` in the directory specified by the `root`
|
|
140
|
+
config parameter.
|
|
141
|
+
- New account template system. On first server startup, the contents of the
|
|
142
|
+
`default-account-template` source folder get copied to `config/account-template`.
|
|
143
|
+
When a new account is created, a copy is made of that new account template
|
|
144
|
+
directory for the user. Server operators can customize the contents of this
|
|
145
|
+
new account template for their server installation.
|
|
146
|
+
- Email template system. Similarly to the new account template, the Welcome
|
|
147
|
+
email that gets sent out on new user registration is generated from the
|
|
148
|
+
customizable local `config/email-templates/welcome.js` template file, which
|
|
149
|
+
gets copied from `default-email-templates` source folder on first startup.
|
|
150
|
+
|
|
151
|
+
## 3.4.0
|
|
152
|
+
|
|
153
|
+
- Fix handling/url-encoding of container names
|
|
154
|
+
- Allow video skip with Accept-Ranges
|
|
155
|
+
- In a directory listing, add the media type class when we know it
|
|
156
|
+
- Add the trailing slash on the URI of a folder listed within a folder
|
|
157
|
+
|
|
158
|
+
## 3.3.0
|
|
159
|
+
|
|
160
|
+
- Refactor acl checker to use solid-permissions lib
|
|
161
|
+
- Various DataBrowser fixes, dataBrowserOption option to specify path of db file
|
|
162
|
+
|
|
163
|
+
## 3.2.0
|
|
164
|
+
|
|
165
|
+
- Refactor to use external solid-namespace library
|
|
166
|
+
- Move debrack() to utils.js, remove unused vocab/rdf.js functions
|
|
167
|
+
- Switch from node-mime to mime-types lib
|
|
168
|
+
- Refactor acl.js to prep for external solid-permissions lib
|
|
169
|
+
- Fix crash on PATCH request with no Content-Type
|
|
170
|
+
|
|
171
|
+
## 3.1.0
|
|
172
|
+
|
|
173
|
+
- Misc fixes and features (see commit log)
|
|
174
|
+
- Implemented COPY verb
|
|
175
|
+
|
|
176
|
+
## 3.0.0
|
|
177
|
+
- feat Discover WebID from root account https://github.com/solid/node-solid-server/pull/371
|
|
178
|
+
- feat: Server capabilities https://github.com/solid/node-solid-server/pull/365
|
|
179
|
+
- feat: pass app in createServer https://github.com/solid/node-solid-server/pull/357
|
|
180
|
+
- breaking: Accounts API https://github.com/solid/node-solid-server/pull/339
|
|
181
|
+
|
|
182
|
+
## 2.3.0
|
|
183
|
+
- feat: added Capability discovery https://github.com/solid/node-solid-server/pull/347
|
|
184
|
+
|
|
185
|
+
## 2.2.0
|
|
186
|
+
- feat: added `--auth` https://github.com/solid/node-solid-server/pull/346
|
|
187
|
+
|
|
188
|
+
## 2.1.0
|
|
189
|
+
- patch: Proxy https://github.com/solid/node-solid-server/pull/343 https://github.com/solid/node-solid-server/pull/342
|
|
190
|
+
- feat: added Account Recovery
|
|
191
|
+
- feat: added Token Service
|
|
192
|
+
- feat: added ldp.graph
|
|
193
|
+
|
|
194
|
+
## 2.0.0
|
|
195
|
+
|
|
196
|
+
- feat: added Welcome Email
|
|
197
|
+
- feat: added Email Service
|
|
198
|
+
- other: `ldnode` turns into `solid-server`
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# CONTRIBUTING
|
|
2
|
+
|
|
3
|
+
The MIT Linked Data group and the `solid` project welcomes new contributors. This document will guide you
|
|
4
|
+
through the process.
|
|
5
|
+
|
|
6
|
+
### Step 1: FORK
|
|
7
|
+
|
|
8
|
+
Fork the project [on GitHub](https://github.com/solid/node-solid-server) and check out
|
|
9
|
+
your copy.
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
$ git clone git@github.com:your_username/node-solid-server.git
|
|
13
|
+
$ cd node-solid-server
|
|
14
|
+
$ git remote add upstream git://github.com/solid/node-solid-server.git
|
|
15
|
+
$ npm install
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Step 2: BRANCH
|
|
20
|
+
|
|
21
|
+
Create a feature branch and start hacking:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
$ git checkout -b my-feature-branch -t origin/master
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Step 3: COMMIT
|
|
29
|
+
|
|
30
|
+
Make sure git knows your name and email address:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
$ git config --global user.name "J. Random User"
|
|
34
|
+
$ git config --global user.email "j.random.user@example.com"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Writing good commit logs is important. A commit log should describe what
|
|
38
|
+
changed and why. Follow these guidelines when writing one:
|
|
39
|
+
|
|
40
|
+
1. The first line should be 50 characters or less and contain a short
|
|
41
|
+
description of the change prefixed with the name of the changed
|
|
42
|
+
subsystem (e.g. "net: add localAddress and localPort to Socket").
|
|
43
|
+
2. Keep the second line blank.
|
|
44
|
+
3. Wrap all other lines at 72 columns.
|
|
45
|
+
|
|
46
|
+
A good commit log looks like this:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
subsystem: explaining the commit in one line
|
|
50
|
+
|
|
51
|
+
Body of commit message is a few lines of text, explaining things
|
|
52
|
+
in more detail, possibly giving some background about the issue
|
|
53
|
+
being fixed, etc etc.
|
|
54
|
+
|
|
55
|
+
The body of the commit message can be several paragraphs, and
|
|
56
|
+
please do proper word-wrap and keep columns shorter than about
|
|
57
|
+
72 characters or so. That way `git log` will show things
|
|
58
|
+
nicely even when it is indented.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The header line should be meaningful; it is what other people see when they
|
|
62
|
+
run `git shortlog` or `git log --oneline`.
|
|
63
|
+
|
|
64
|
+
Check the output of `git log --oneline files_that_you_changed` to find out
|
|
65
|
+
what subsystem (or subsystems) your changes touch.
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Step 4: REBASE
|
|
69
|
+
|
|
70
|
+
Use `git rebase` (not `git merge`) to sync your work from time to time.
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
$ git fetch upstream
|
|
74
|
+
$ git rebase upstream/master
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### Step 5: TEST
|
|
79
|
+
|
|
80
|
+
Bug fixes and features should come with tests. Add your tests in the
|
|
81
|
+
`test/` directory. Look at other tests to see how they should be
|
|
82
|
+
structured (license boilerplate, common includes, etc.).
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
$ npm test
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Makeall tests pass. Please, do not submit patches that fail either check.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Step 6: PUSH
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
$ git push origin my-feature-branch
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Go to https://github.com/username/node-solid-server and select your feature branch. Click
|
|
98
|
+
the 'Pull Request' button and fill out the form.
|
|
99
|
+
|
|
100
|
+
Pull requests are usually reviewed within a few days. If there are comments
|
|
101
|
+
to address, apply your changes in a separate commit and push that to your
|
|
102
|
+
feature branch. Post a comment in the pull request afterwards; GitHub does
|
|
103
|
+
not send out notifications when you add commits.
|
|
104
|
+
|
|
105
|
+
### Step 7: PUBLISH
|
|
106
|
+
|
|
107
|
+
If you have permission access, we reccomend using:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
$ npm version patch && npm publish && git push --follow-tags
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Using HUB
|
|
114
|
+
|
|
115
|
+
[hub](https://hub.github.com/) is a tool released by Github to help developers to use their website from command line.
|
|
116
|
+
|
|
117
|
+
The described guidelines can be resumed as following:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
$ git clone https://github.com/solid/node-solid-server
|
|
121
|
+
$ cd node-solid-server
|
|
122
|
+
|
|
123
|
+
# to fork the repository
|
|
124
|
+
$ hub fork
|
|
125
|
+
|
|
126
|
+
# to fork the repository
|
|
127
|
+
$ git checkout -b feature-branch
|
|
128
|
+
|
|
129
|
+
# after committing your changes, push to your repo
|
|
130
|
+
$ git push your_username feature-branch
|
|
131
|
+
|
|
132
|
+
# start a PR
|
|
133
|
+
$ hub pull-request
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
This document is forked from [joyent/node](https://github.com/joyent/node/blob/master/CONTRIBUTING.md)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
[issue tracker]: https://github.com/solid/node-solid-server/issues
|
package/CONTRIBUTORS.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Contributors to the solid-server npm module
|
|
2
|
+
|
|
3
|
+
The Solid community wants to acknowledge the hard work and dedication put in by many people, several of whom are listed below.
|
|
4
|
+
|
|
5
|
+
Please [let us know](https://github.com/solid/node-solid-server/edit/master/CONTRIBUTORS.md) if anyone is missing from this list, or if you wish to add yourself.
|
|
6
|
+
|
|
7
|
+
## Project lead
|
|
8
|
+
- [Tim Berners-Lee](https://www.w3.org/People/Berners-Lee/)
|
|
9
|
+
|
|
10
|
+
## Current code contributors
|
|
11
|
+
People with significant code contributions over the past couple of months, in alphabetical order:
|
|
12
|
+
|
|
13
|
+
- [Arne Hassel](http://icanhasweb.net/)
|
|
14
|
+
- [Kjetil Kjernsmo](http://kjetil.kjernsmo.net/)
|
|
15
|
+
- [Ruben Taelman](https://www.rubensworks.net/)
|
|
16
|
+
|
|
17
|
+
## Previous code contributors
|
|
18
|
+
People with significant code contributions further in the past, in alphabetical order:
|
|
19
|
+
|
|
20
|
+
- [Nicola Greco](https://nicola.io/)
|
|
21
|
+
- [Martin Martinez Rivera](https://github.com/martinmr)
|
|
22
|
+
- [Andrei Sambra](https://deiu.me/)
|
|
23
|
+
- [Ruben Verborgh](https://ruben.verborgh.org/)
|
|
24
|
+
- [Dmitri Zagidulin](http://computingjoy.com/)
|
|
25
|
+
|
|
26
|
+
## Project contributors
|
|
27
|
+
People who have significantly contributed to issues, testing, and/or discussions, in alphabetical order:
|
|
28
|
+
- [Justin Bingham](https://github.com/justinwb)
|
|
29
|
+
- [Sarven Capadisli](http://csarven.ca/)
|
|
30
|
+
- [Melvin Carvalho](https://melvincarvalho.com/)
|
|
31
|
+
- [Amy Guy](https://rhiaro.co.uk/)
|
|
32
|
+
- [Kingsley Idehen](https://github.com/kidehen)
|
|
33
|
+
|
|
34
|
+
## Community contributors
|
|
35
|
+
Thanks to everyone who has tried solid-server, discussed about it, created issues and/or pull requests.
|
|
36
|
+
Your input is necessary to help Solid grow!
|
package/Dockerfile
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
RUN npm install
|
|
8
|
+
COPY . /usr/src/app
|
|
9
|
+
|
|
10
|
+
# start
|
|
11
|
+
EXPOSE 8443
|
|
12
|
+
COPY config.json-default config.json
|
|
13
|
+
RUN openssl req \
|
|
14
|
+
-new \
|
|
15
|
+
-newkey rsa:4096 \
|
|
16
|
+
-days 365 \
|
|
17
|
+
-nodes \
|
|
18
|
+
-x509 \
|
|
19
|
+
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \
|
|
20
|
+
-keyout privkey.pem \
|
|
21
|
+
-out fullchain.pem
|
|
22
|
+
CMD npm run solid start
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2014–present Arne Hassel, Nicola Greco, Kjetil Kjernsmo,
|
|
4
|
+
Martin Martinez Rivera, Andrei Sambra, Ruben Taelman, Ruben Verborgh,
|
|
5
|
+
and Dmitri Zagidulin
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
21
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
22
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|