mirror of
https://github.com/openziti/zrok.git
synced 2024-11-07 08:44:14 +01:00
Merge pull request #456 from openziti/linux-service-basic-auth
add a separate config var for basic auth
This commit is contained in:
commit
b1b0f69bac
@ -94,14 +94,13 @@ else
|
||||
fi
|
||||
if [[ -n "${ZROK_OAUTH_PROVIDER:-}" ]]; then
|
||||
ZROK_CMD+=" --oauth-provider ${ZROK_OAUTH_PROVIDER}"
|
||||
fi
|
||||
if [[ -n "${ZROK_OAUTH_EMAILS:-}" ]]; then
|
||||
for EMAIL in ${ZROK_OAUTH_EMAILS}; do
|
||||
if ! [[ ${EMAIL} =~ @ ]]; then
|
||||
echo "WARNING: '${EMAIL}' does not contain '@' so it may match more than one email domain!" >&2
|
||||
fi
|
||||
ZROK_CMD+=" --oauth-email-domains ${EMAIL}"
|
||||
done
|
||||
if [[ -n "${ZROK_OAUTH_EMAILS:-}" ]]; then
|
||||
for EMAIL in ${ZROK_OAUTH_EMAILS}; do
|
||||
ZROK_CMD+=" --oauth-email-domains ${EMAIL}"
|
||||
done
|
||||
fi
|
||||
elif [[ -n "${ZROK_BASIC_AUTH:-}" ]]; then
|
||||
ZROK_CMD+=" --basic-auth ${ZROK_BASIC_AUTH}"
|
||||
fi
|
||||
echo "INFO: running: zrok ${ZROK_CMD}"
|
||||
zrok ${ZROK_CMD} | jq -rc | tee ~/.zrok/reserved.json
|
||||
|
@ -73,6 +73,11 @@ ZROK_SHARE_OPTS=""
|
||||
# WARNING: changing this value requires provisioning a new frontend URL
|
||||
#ZROK_OAUTH_EMAILS="bob@acme.example.com alice@forge.example.com @corp.example.com"
|
||||
|
||||
# you MAY require a password with HTTP basic authentication
|
||||
# WARNING: changing this value requires provisioning a new frontend URL
|
||||
# NOTE: basic auth and oauth are mutually exclusive
|
||||
#ZROK_BASIC_AUTH=""
|
||||
|
||||
# set if self-hosting zrok and not using only the default frontend name 'public'; must be a space-separated list
|
||||
# WARNING: changing this value requires provisioning a new frontend URL
|
||||
#ZROK_FRONTENDS="public"
|
||||
|
Loading…
Reference in New Issue
Block a user