Skip to content

Commit

Permalink
Merge pull request #607 from opensds/development
Browse files Browse the repository at this point in the history
Merge from Development to Master
  • Loading branch information
xing-yang authored Feb 2, 2019
2 parents acbf88e + 266321d commit 76481a4
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pkg/api/filter/auth/keystone.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"github.com/opensds/opensds/pkg/utils"
"github.com/opensds/opensds/pkg/utils/config"
"github.com/opensds/opensds/pkg/utils/constants"
"github.com/opensds/opensds/pkg/utils/pwd"
)

func NewKeystone() AuthBase {
Expand All @@ -49,19 +48,12 @@ type Keystone struct {

func (k *Keystone) SetUp() error {
c := config.CONF.KeystoneAuthToken
// Decrypte the password
pwdCiphertext := c.Password
pwdTool := pwd.NewPwdTool(config.CONF.OsdsLet.PasswordDecryptTool)
password, err := pwdTool.Decrypter(pwdCiphertext)
if err != nil {
return err
}

opts := gophercloud.AuthOptions{
IdentityEndpoint: c.AuthUrl,
DomainName: c.UserDomainName,
Username: c.Username,
Password: password,
Password: c.Password,
TenantName: c.ProjectName,
}
provider, err := openstack.AuthenticatedClient(opts)
Expand Down

0 comments on commit 76481a4

Please sign in to comment.