wfau / gaia-dmp

Gaia data analysis platform
GNU General Public License v3.0
1 stars 5 forks source link

Add newpasshash to create-user-tools.sh script #793

Closed stvoutsin closed 2 years ago

stvoutsin commented 2 years ago

Creating new "live" users requires getting a shiro jdbc hash and storing it in our data server. In the most recent deploy, I copied a function from the notes:

    newpasshash()
        {
        local password="${1:?}"
        java -jar "${HOME}/lib/shiro-tools-hasher.jar" -i 500000 -f shiro1 -a SHA-256 -gss 128 '${password:?}'
        }

It would be useful to add a function like this to the create-user-tools.sh script. Also we need to validate whether the above works or not. In my recent deploy, this was creating a hash for the literal string: "'${password:?}'" rather than replacing. This may be a mistake from my end, as the notes imply that this should work, but it would be good to double check.

Zarquan commented 2 years ago

Needs double quotes around the variable to replace in bash.

"${password:?}" 
Zarquan commented 2 years ago

Fixed in #846. Creating the password hash is handled by the create-user tools.

Zarquan commented 2 years ago

Fixed by #846