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

Pwd encrypter #612

Merged
merged 13 commits into from
Feb 14, 2019
1 change: 0 additions & 1 deletion client/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ func LoadKeystoneAuthOptionsFromEnv() *KeystoneAuthOptions {
}

opt.Password = pwdCiphertext

opt.TenantName = os.Getenv(OsTenantName)
projectName := os.Getenv(OsProjectName)
opt.DomainID = os.Getenv(OsUserDomainId)
Expand Down
2 changes: 1 addition & 1 deletion script/devsds/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ echo
echo "Execute commands blow to set up ENVs which are needed by OpenSDS CLI:"
echo "------------------------------------------------------------------"
echo "export OPENSDS_AUTH_STRATEGY=$OPENSDS_AUTH_STRATEGY"
echo "export OPENSDS_ENDPOINT=https://localhost:50040"
echo "export OPENSDS_ENDPOINT=http://localhost:50040"
if osds::util::is_service_enabled keystone; then
echo "source $DEV_STACK_DIR/openrc"
fi
Expand Down
2 changes: 1 addition & 1 deletion script/devsds/lib/certificate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash

# Copyright (c) 2019 Huawei Technologies Co., Ltd. All Rights Reserved.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (
)

type tool struct {
encrypter string `yaml:"PwdEncrypter,omitempty"`
PwdEncrypter string `yaml:"PwdEncrypter,omitempty"`
}

var encrypterCommand = &cobra.Command{
Expand Down Expand Up @@ -59,7 +59,7 @@ func encrypter(cmd *cobra.Command, args []string) {
}

// Encrypt the password
encrypterTool := pwd.NewPwdEncrypter(pwdEncrypter.encrypter)
encrypterTool := pwd.NewPwdEncrypter(pwdEncrypter.PwdEncrypter)
plaintext, err := encrypterTool.Encrypter(args[0])
if err != nil {
fmt.Println("Encrypt password error:", err)
Expand All @@ -70,7 +70,7 @@ func encrypter(cmd *cobra.Command, args []string) {
}

func loadConf(f string) (*tool, error) {
var conf = &tool{}
conf := &tool{}
confYaml, err := ioutil.ReadFile(f)
if err != nil {
return nil, fmt.Errorf("Read config yaml file (%s) failed, reason:(%v)", f, err)
Expand Down