add basic auth to Docker frontdoor

This commit is contained in:
Kenneth Bingham 2023-11-27 17:28:25 -05:00
parent d2dd89f6e5
commit 3ebf0316bc
No known key found for this signature in database
GPG Key ID: 31709281860130B6

View File

@ -57,15 +57,26 @@ docker compose down && docker compose up
You can require a password or an OAuth login with certain email addresses.
## OAuth Email
### OAuth Email
You can allow specific email addresses or an email domain by setting `ZROK_OAUTH_PROVIDER` to `github` or `google` and `ZROK_SHARE_OPTS` to specify additional command-line options to `zrok reserve public`. Read more about the OAuth features in [this blog post](https://blog.openziti.io/the-zrok-oauth-public-frontend).
You can allow specific email addresses or an email domain by setting `ZROK_OAUTH_PROVIDER` to `github` or `google` and
`ZROK_SHARE_OPTS` to specify additional command-line options to `zrok reserve public`. Read more about the OAuth
features in [this blog post](https://blog.openziti.io/the-zrok-oauth-public-frontend).
```bash title=".env"
ZROK_OAUTH_PROVIDER="github"
ZROK_SHARE_OPTS="--oauth-email-domains @example.com"
```
### Password
You can require a password by setting `ZROK_SHARE_OPTS` to specify additional command-line options to `zrok reserve
public`.
```bash title=".env"
ZROK_SHARE_OPTS="--basic-auth 'admin:passwd'"
```
## Share Something Different
The reserved public share project uses zrok's `caddy` mode. Caddy accepts configuration as a Caddyfile that is mounted into the container ([zrok Caddyfile examples](https://github.com/openziti/zrok/tree/main/etc/caddy)).