Skip to content

Commit

Permalink
chore(devserver): enable Basic auth by default (#871)
Browse files Browse the repository at this point in the history
* chore(devserver): allow setting other auth than noop, and add basic credentials file

* chore(devserver): default to basic auth, write credentials only if basic auth used

* note credentials in startup script
  • Loading branch information
andrewazores committed Mar 22, 2022
1 parent f7f7e50 commit 249df8f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion devserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ for i in archive clientlib conf templates probes; do
fi
done

if [ -z "$CRYOSTAT_AUTH_MANAGER" ]; then
CRYOSTAT_AUTH_MANAGER="io.cryostat.net.BasicAuthManager"
fi
if [ "$CRYOSTAT_AUTH_MANAGER" = "io.cryostat.net.BasicAuthManager" ]; then
# credentials `user:pass`
echo "user:d74ff0ee8da3b9806b18c877dbf29bbde50b5bd8e4dad7a3a725000feb82e8f1" > "${work_dir}/conf/cryostat-users.properties"
fi

if [ -z "$CRYOSTAT_CORS_ORIGIN" ]; then
"${MVN}" -DskipTests=true clean prepare-package
else
Expand Down Expand Up @@ -103,7 +111,7 @@ MAVEN_OPTS="${flags[@]}" \
CRYOSTAT_REPORT_GENERATOR="http://localhost:10001" \
GRAFANA_DATASOURCE_URL="http://localhost:8080" \
GRAFANA_DASHBOARD_URL="http://localhost:3000" \
CRYOSTAT_AUTH_MANAGER=io.cryostat.net.NoopAuthManager \
CRYOSTAT_AUTH_MANAGER="${CRYOSTAT_AUTH_MANAGER}" \
CRYOSTAT_ARCHIVE_PATH="${work_dir}/archive" \
CRYOSTAT_CLIENTLIB_PATH="${work_dir}/clientlib" \
CRYOSTAT_CONFIG_PATH="${work_dir}/conf" \
Expand Down

0 comments on commit 249df8f

Please sign in to comment.