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

credential incorrectly processes tenant/project id #67

Open
wallyworld opened this issue Aug 7, 2018 · 0 comments
Open

credential incorrectly processes tenant/project id #67

wallyworld opened this issue Aug 7, 2018 · 0 comments

Comments

@wallyworld
Copy link
Member

It's possible to have a novarc file with a keystone v3 set of credential attributes like this:

export OS_USERNAME=fred
export OS_PASSWORD=secret
export OS_USER_DOMAIN_NAME=user
export OS_PROJECT_NAME=vinu
export OS_PROJECT_ID=cab03d5e990e438dae80aedb58ffde77
export OS_PROJECT_DOMAIN_NAME=user

These will be parsed into a credential where the "TenantName" attribute is set to "cab03d5e990e438dae80aedb58ffde77". But that value is the tenant id, not name. And then when we go to authenticate, we do this:

auth.Auth.Scope = &v3AuthScope{
Project: &v3AuthProject{
Domain: &v3AuthDomain{
Name: projectDomain,
},
Name: creds.TenantName,
},
}

The auth v3AuthProject struct does have an ID field and that's what should be set in this case.

The identity.Credentials struct could gain a TenantId field and we use that if set. But maybe we can simply not use the id at all because:

  1. We only use Name in v3AuthDomain (we ignore ID)
  2. I tested auth with v3AuthProject.Name = "" and it worked

So we could start by simply modifying the CredentialsFromEnv() function and associated validation to not set TenantName from OS_TENANT_ID etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant