Use authentication for Distillery control page
This commit is contained in:
parent
da32b67981
commit
1caecc0f19
8 changed files with 122 additions and 82 deletions
|
|
@ -26,8 +26,6 @@ type Template struct {
|
|||
TriplestoreAdminPassword string `env:"GRAPHDB_ADMIN_PASSWORD"`
|
||||
MysqlAdminUsername string `env:"MYSQL_ADMIN_USER"`
|
||||
MysqlAdminPassword string `env:"MYSQL_ADMIN_PASSWORD"`
|
||||
DisAdminUsername string `env:"DIS_ADMIN_USER"`
|
||||
DisAdminPassword string `env:"DIS_ADMIN_PASSWORD"`
|
||||
DockerNetworkName string `env:"DOCKER_NETWORK_NAME"`
|
||||
SessionSecret string `env:"SESSION_SECRET"`
|
||||
}
|
||||
|
|
@ -76,17 +74,6 @@ func (tpl *Template) SetDefaults(env environment.Environment) (err error) {
|
|||
}
|
||||
}
|
||||
|
||||
if tpl.DisAdminUsername == "" {
|
||||
tpl.DisAdminUsername = "admin"
|
||||
}
|
||||
|
||||
if tpl.DisAdminPassword == "" {
|
||||
tpl.DisAdminPassword, err = password.Password(64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if tpl.DockerNetworkName == "" {
|
||||
tpl.DockerNetworkName, err = password.Password(10)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue