Add documentation on how to integrate SilverBullet with Authelia (#448)

pull/454/head
Firas Dib 2023-07-03 22:51:24 +02:00 committed by GitHub
parent 56e1489a01
commit 9b1bf73bbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 1 deletions

26
website/Authelia.md Normal file
View File

@ -0,0 +1,26 @@
# How to setup SilverBullet with Authelia
In order for SilverBullet to work as intended, some files will need to be excluded from your authentication method of choice. These files need to always be accessible, for example for offline or [[PWA]] support.
The files are the following:
- The web manifest
- The app icon
- The service worker
These files can be whitelisted by adjusting your Authelia configuration to something like this:
```yaml
access_control:
default_policy: deny
rules:
- domain: silverbullet.yourdomain.com
resources:
- '/.client/manifest.json$'
- '/.client/[a-zA-Z0-9_-]+.png$'
- '/service_worker.js$'
policy: bypass
- domain: yourdomain.com
policy: two_factor
```
Please adjust this to fit your specific needs. The important part is that the files are associated with `policy: bypass`.

View File

@ -112,4 +112,7 @@ You can configure SB with environment variables instead of flags as well. The fo
* `SB_USER`: Sets single-user credentials (like `--user`), e.g. `SB_USER=pete:1234`
* `SB_PORT`: Sets the port to listen to, e.g. `SB_PORT=1234`
* `SB_FOLDER`: Sets the folder to expose, e.g. `SB_FOLDER=/space`
* `SB_AUTH`: Loads an [[Authentication]] database from a (JSON encoded) string, e.g. `SB_AUTH=$(cat /path/to/.auth.json)`
* `SB_AUTH`: Loads an [[Authentication]] database from a (JSON encoded) string, e.g. `SB_AUTH=$(cat /path/to/.auth.json)`
## Using Authelia
You need to adjust a few configuration options in [[Authelia]] in order for SilverBullet to work as intended.