Skip to content

Commit

Permalink
do not encrypt/decrypt password
Browse files Browse the repository at this point in the history
  • Loading branch information
Hou Junjie committed Jan 5, 2021
1 parent d2dcb82 commit dfecf26
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 104 deletions.
10 changes: 2 additions & 8 deletions src/csi/backend/plugin/fusionstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/Huawei/eSDK_K8S_Plugin/src/storage/fusionstorage/client"
"github.com/Huawei/eSDK_K8S_Plugin/src/utils"
"github.com/Huawei/eSDK_K8S_Plugin/src/utils/log"
"github.com/Huawei/eSDK_K8S_Plugin/src/utils/pwd"
)

const (
Expand Down Expand Up @@ -35,13 +34,8 @@ func (p *FusionStoragePlugin) init(config map[string]interface{}, keepLogin bool
return errors.New("password must be provided")
}

decrypted, err := pwd.Decrypt(password)
if err != nil {
return err
}

cli := client.NewClient(url, user, decrypted)
err = cli.Login()
cli := client.NewClient(url, user, password)
err := cli.Login()
if err != nil {
return err
}
Expand Down
10 changes: 2 additions & 8 deletions src/csi/backend/plugin/oceanstor.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"github.com/Huawei/eSDK_K8S_Plugin/src/storage/oceanstor/client"
"github.com/Huawei/eSDK_K8S_Plugin/src/utils"
"github.com/Huawei/eSDK_K8S_Plugin/src/utils/log"
"github.com/Huawei/eSDK_K8S_Plugin/src/utils/pwd"
)

const (
Expand Down Expand Up @@ -51,15 +50,10 @@ func (p *OceanstorPlugin) init(config map[string]interface{}, keepLogin bool) er
return errors.New("product only support config: V3, V5, Dorado")
}

decrypted, err := pwd.Decrypt(password)
if err != nil {
return err
}

vstoreName, _ := config["vstoreName"].(string)

cli := client.NewClient(urls, user, decrypted, vstoreName)
err = cli.Login()
cli := client.NewClient(urls, user, password, vstoreName)
err := cli.Login()
if err != nil {
return err
}
Expand Down
35 changes: 0 additions & 35 deletions src/tools/passwdEncrypt/passwdEncrypt.go

This file was deleted.

53 changes: 0 additions & 53 deletions src/utils/pwd/pwd.go

This file was deleted.

0 comments on commit dfecf26

Please sign in to comment.