Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make password for dataverseAdmin configurable #4178 #5201

Merged
merged 1 commit into from
Oct 18, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf/docker-aio/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ There isn't any strict requirement on the local port (8083, 8084 in this doc), t

* `empty reply from server` or `Failed to connect to ::1: Cannot assign requested address` tend to indicate either that you haven't given glassfish enough time to start, or your docker setup is in an inconsistent state and should probably be restarted.

* For manually fiddling around with the created dataverse, use user `dataverseAdmin` with password `admin`.
* For manually fiddling around with the created dataverse, use user `dataverseAdmin` with password `admin1`.
2 changes: 1 addition & 1 deletion conf/docker-aio/testscripts/post
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#/bin/sh
cd scripts/api
./setup-all.sh --insecure | tee /tmp/setup-all.sh.out
./setup-all.sh --insecure -p=admin1 | tee /tmp/setup-all.sh.out
cd ../..
psql -U dvnapp dvndb -f scripts/database/reference_data.sql
psql -U dvnapp dvndb -f doc/sphinx-guides/source/_static/util/pg8-createsequence-prep.sql
Expand Down
8 changes: 7 additions & 1 deletion scripts/api/setup-all.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

SECURESETUP=1
DV_SU_PASSWORD="admin"

for opt in $*
do
Expand All @@ -11,6 +12,11 @@ do
"-insecure")
SECURESETUP=0;
;;
-p=*)
# https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash/14203146#14203146
DV_SU_PASSWORD="${opt#*=}"
shift # past argument=value
;;
*)
echo "invalid option: $opt"
exit 1 >&2
Expand Down Expand Up @@ -58,7 +64,7 @@ curl -X PUT -d 'native/http' $SERVER/admin/settings/:UploadMethods
echo

echo "Setting up the admin user (and as superuser)"
adminResp=$(curl -s -H "Content-type:application/json" -X POST -d @data/user-admin.json "$SERVER/builtin-users?password=admin&key=burrito")
adminResp=$(curl -s -H "Content-type:application/json" -X POST -d @data/user-admin.json "$SERVER/builtin-users?password=$DV_SU_PASSWORD&key=burrito")
echo $adminResp
curl -X POST "$SERVER/admin/superuser/dataverseAdmin"
echo
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy/phoenix.dataverse.org/post
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#/bin/sh
cd scripts/api
./setup-all.sh --insecure | tee /tmp/setup-all.sh.out
./setup-all.sh --insecure -p=admin1 | tee /tmp/setup-all.sh.out
cd ../..
psql -U dvnapp dvndb -f scripts/database/reference_data.sql
psql -U dvnapp dvndb -f doc/sphinx-guides/source/_static/util/pg8-createsequence-prep.sql
Expand Down