Insert username/passwd_hash to database

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Insert username/passwd_hash to database

linux168
We are using MySQL instead of HSQLDB.
We want to insert username/one_way_hash_password to glu database so we can
automate the glu console installation.

We could not figure out how to create one_way_hash_password,
especially SECURE_RANDOM and salt are no where to be found!

What is the best approach to do so?
Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Insert username/passwd_hash to database

frenchyan
Administrator
The code that generate the one way hash is here: https://github.com/pongasoft/glu/blob/250efb0064a1890f2e7a2a974775e02e166f1349/console/org.linkedin.glu.console-webapp/grails-app/domain/org/linkedin/glu/console/domain/DbUserCredentials.groovy#L26

Best approach would be to copy/paste the relevant part to generate them.

As a side note, github has a very effective search interface... https://github.com/pongasoft/glu/search?q=hash&type=Code

Yan