Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ $ solid start --root path/to/folder --port 8443 --ssl-key path/to/ssl-key.pem --

### Running in development environments

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`.
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 and sets the `rejectUnauthorized` option.

##### How do I get an SSL key and certificate?
You need an SSL certificate from a _certificate authority_, such as your domain provider or [Let's Encrypt!](https://letsencrypt.org/getting-started/).
Expand Down
9 changes: 8 additions & 1 deletion bin/lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module.exports = [
}
},
{
name: 'certificateHeader',
name: 'certificate-header',
question: 'Accept client certificates through this HTTP header (for reverse proxies)',
default: '',
prompt: false
Expand Down Expand Up @@ -115,6 +115,13 @@ module.exports = [
validate: validPath,
prompt: true
},
{
name: 'no-reject-unauthorized',
help: 'Accepts clients with invalid certificates (set for testing WebID-TLS)',
flag: true,
default: false,
prompt: false
},
{
name: 'idp',
help: 'Enable multi-user mode (users can sign up for accounts)',
Expand Down
12 changes: 11 additions & 1 deletion bin/solid-test
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
#!/usr/bin/env bash
NODE_TLS_REJECT_UNAUTHORIZED=0 exec `dirname "$0"`/solid $@
COMMAND=$1
ADD_FLAGS=
shift

# Disable rejectUnauthorized when starting the server
if [ "$COMMAND" == "start" ]; then
ADD_FLAGS="--no-reject-unauthorized"
export NODE_TLS_REJECT_UNAUTHORIZED=0
fi

exec `dirname "$0"`/solid $COMMAND $ADD_FLAGS $@