Skip to content

Commit 6d9e863

Browse files
committed
Merge branch 'dz_oidc' into rv/patch/n3
* dz_oidc: (58 commits) Cache APT packages on Travis CI. Remove deprecated solid:inbox term from account template Verify webid provider when extracting webid from claim Switch to the official oidc issuer link rel value Add package-lock.json 3.5.2 Fix databrowser loading for .html resources Add token reuse test Add support for Proof of Possession tokens, update tests Add a 'two pods plus external web app' integration test Remove clean scripts. Remove specific test commands. Follow Mocha naming conventions. Document solid-test executable. Add solid-test script. Rename main executable to solid. Set default test timeout to 10 seconds. Add authProxy option. Set Forwarded header on proxied requests. Set Host header on proxied requests. ...
2 parents d108753 + 4bcd7fc commit 6d9e863

File tree

101 files changed

+8649
-839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+8649
-839
lines changed

.travis.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,23 @@ sudo: false
22
language: node_js
33
node_js:
44
- "6.0"
5+
- "8.0"
6+
- "node"
7+
env:
8+
- CXX=g++-4.8
59

6-
cache:
7-
directories:
8-
- node_modules
910
addons:
11+
apt:
12+
sources:
13+
- ubuntu-toolchain-r-test
14+
packages:
15+
- g++-4.8
1016
hosts:
1117
- nic.localhost
1218
- tim.localhost
1319
- nicola.localhost
20+
21+
cache:
22+
apt: true
23+
directories:
24+
- node_modules

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- [x] [WebID+TLS Authentication](https://www.w3.org/2005/Incubator/webid/spec/tls/)
1616
- [x] [Real-time live updates](https://github.com/solid/solid-spec#subscribing) (using WebSockets)
1717
- [x] Identity provider for WebID
18-
- [x] Proxy for cross-site data access
18+
- [x] CORS proxy for cross-site data access
1919
- [ ] Group members in ACL
2020
- [x] Email account recovery
2121

@@ -59,10 +59,14 @@ $ solid start --root path/to/folder --port 8443 --ssl-key path/to/ssl-key.pem --
5959
# Solid server (solid v0.2.24) running on https://localhost:8443/
6060
```
6161

62+
### Running in development environments
63+
64+
Solid requires SSL certificates to be valid, so you cannot use self-signed certificates. To switch off this security feature in development environments, you can use the `bin/solid-test` executable, which unsets the `NODE_TLS_REJECT_UNAUTHORIZED` flag. If you want to test WebID-TLS authentication with self-signed certificates, additionally set `"rejectUnauthorized": false` in `config.json`.
65+
6266
##### How do I get an SSL key and certificate?
63-
You need an SSL certificate you get this from your domain provider or for free from [Let's Encrypt!](https://letsencrypt.org/getting-started/).
67+
You need an SSL certificate from a _certificate authority_, such as your domain provider or [Let's Encrypt!](https://letsencrypt.org/getting-started/).
6468

65-
If you don't have one yet, or you just want to test `solid`, generate a certificate (**DO NOT USE IN PRODUCTION**):
69+
For testing purposes, you can use `bin/solid-test` with a _self-signed_ certificate, generated as follows:
6670
```
6771
$ openssl genrsa 2048 > ../localhost.key
6872
$ openssl req -new -x509 -nodes -sha256 -days 3650 -key ../localhost.key -subj '/CN=*.localhost' > ../localhost.cert
@@ -93,6 +97,9 @@ $ solid --idp --port 8443 --cert /path/to/cert --key /path/to/key --root ./accou
9397

9498
Your users will have a dedicated folder under `./accounts`. Also, your root domain's website will be in `./accounts/yourdomain.tld`. New users can create accounts on `/api/accounts/new` and create new certificates on `/api/accounts/cert`. An easy-to-use sign-up tool is found on `/api/accounts`.
9599

100+
### Running Solid behind a reverse proxy (such as NGINX)
101+
See [Running Solid behind a reverse proxy](https://github.com/solid/node-solid-server/wiki/Running-Solid-behind-a-reverse-proxy).
102+
96103
##### How can send emails to my users with my Gmail?
97104

98105
> To use Gmail you may need to configure ["Allow Less Secure Apps"](https://www.google.com/settings/security/lesssecureapps) in your Gmail account unless you are using 2FA in which case you would have to create an [Application Specific](https://security.google.com/settings/security/apppasswords) password. You also may need to unlock your account with ["Allow access to your Google account"](https://accounts.google.com/DisplayUnlockCaptcha) to use SMTP.
@@ -151,7 +158,7 @@ $ solid start --help
151158
--ssl-key [value] Path to the SSL private key in PEM format
152159
--ssl-cert [value] Path to the SSL certificate key in PEM format
153160
--idp Enable multi-user mode (users can sign up for accounts)
154-
--proxy [value] Serve proxy on path (default: '/proxy')
161+
--corsProxy [value] Serve the CORS proxy on this path
155162
--file-browser [value] Url to file browser app (uses Warp by default)
156163
--data-browser Enable viewing RDF resources using a default data browser application (e.g. mashlib)
157164
--suffix-acl [value] Suffix for acl files (default: '.acl')
@@ -195,7 +202,7 @@ default settings.
195202
mount: '/', // Where to mount Linked Data Platform
196203
webid: false, // Enable WebID+TLS authentication
197204
suffixAcl: '.acl', // Suffix for acl files
198-
proxy: false, // Where to mount the proxy
205+
corsProxy: false, // Where to mount the CORS proxy
199206
errorHandler: false, // function(err, req, res, next) to have a custom error handler
200207
errorPages: false // specify a path where the error pages are
201208
}

bin/lib/options.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ module.exports = [
7575
return answers.webid
7676
}
7777
},
78+
{
79+
name: 'certificateHeader',
80+
question: 'Accept client certificates through this HTTP header (for reverse proxies)',
81+
default: '',
82+
prompt: false
83+
},
7884
{
7985
name: 'useOwner',
8086
question: 'Do you already have a WebID?',
@@ -129,21 +135,33 @@ module.exports = [
129135
// help: 'URI to use as a default app for resources (default: https://linkeddata.github.io/warp/#/list/)'
130136
// },
131137
{
132-
name: 'useProxy',
138+
name: 'useCorsProxy',
133139
help: 'Do you want to have a CORS proxy endpoint?',
134140
flag: true,
135141
prompt: true,
136142
hide: true
137143
},
138144
{
139145
name: 'proxy',
140-
help: 'Serve proxy on path',
146+
help: 'Obsolete; use --corsProxy',
147+
prompt: false
148+
},
149+
{
150+
name: 'corsProxy',
151+
help: 'Serve the CORS proxy on this path',
141152
when: function (answers) {
142-
return answers.useProxy
153+
return answers.useCorsProxy
143154
},
144155
default: '/proxy',
145156
prompt: true
146157
},
158+
{
159+
name: 'authProxy',
160+
help: 'Object with path/server pairs to reverse proxy',
161+
default: {},
162+
prompt: false,
163+
hide: true
164+
},
147165
{
148166
name: 'file-browser',
149167
help: 'Type the URL of default app to use for browsing files (or use default)',

bin/solid

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env node
2+
3+
var program = require('commander')
4+
var packageJson = require('../package.json')
5+
var loadInit = require('./lib/init')
6+
var loadStart = require('./lib/start')
7+
8+
program
9+
.version(packageJson.version)
10+
11+
loadInit(program)
12+
loadStart(program)
13+
14+
program.parse(process.argv)
15+
if (program.args.length === 0) program.help()

bin/solid-test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
NODE_TLS_REJECT_UNAUTHORIZED=0 exec `dirname "$0"`/solid $@

bin/solid.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

bin/solid.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
solid

default-templates/new-account/profile/card

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
solid:account </> ; # link to the account uri
1919
pim:storage </> ; # root storage
2020

21-
solid:inbox </inbox/> ;
2221
ldp:inbox </inbox/> ;
2322

2423
pim:preferencesFile </settings/prefs.ttl> ; # private settings/preferences

default-templates/new-account/settings/prefs.ttl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@prefix dct: <http://purl.org/dc/terms/>.
22
@prefix pim: <http://www.w3.org/ns/pim/space#>.
3+
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
34

45
<>
56
a pim:ConfigurationFile;

default-views/auth/auth-hidden-fields.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
<input type="hidden" name="redirect_uri" id="redirect_uri" value="{{redirect_uri}}" />
66
<input type="hidden" name="state" id="state" value="{{state}}" />
77
<input type="hidden" name="nonce" id="nonce" value="{{nonce}}" />
8+
<input type="hidden" name="request" id="request" value="{{request}}" />

0 commit comments

Comments
 (0)