Skip to content

Commit

Permalink
Allow OpenStack Reauthentication
Browse files Browse the repository at this point in the history
Tokens expire, we should allow the client to transparently
reauthenticate us rather than have the region service sitting punting
out errors!
  • Loading branch information
spjmurray committed Apr 25, 2024
1 parent dff438a commit b9e48df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/providers/openstack/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func (p *ApplicationCredentialProvider) Client() (*gophercloud.ProviderClient, e
IdentityEndpoint: p.endpoint,
ApplicationCredentialID: p.id,
ApplicationCredentialSecret: p.secret,
AllowReauth: true,
}

return authenticatedClient(options)
Expand Down Expand Up @@ -102,6 +103,7 @@ func (p *PasswordProvider) Client() (*gophercloud.ProviderClient, error) {
UserID: p.userID,
Password: p.password,
TenantID: p.projectID,
AllowReauth: true,
}

return authenticatedClient(options)
Expand Down Expand Up @@ -138,6 +140,7 @@ func (p *DomainScopedPasswordProvider) Client() (*gophercloud.ProviderClient, er
Scope: &gophercloud.AuthScope{
DomainID: p.domainID,
},
AllowReauth: true,
}

return authenticatedClient(options)
Expand Down Expand Up @@ -169,6 +172,7 @@ func (p *TokenProvider) Client() (*gophercloud.ProviderClient, error) {
options := gophercloud.AuthOptions{
IdentityEndpoint: p.endpoint,
TokenID: p.token,
AllowReauth: true,
}

return authenticatedClient(options)
Expand Down

0 comments on commit b9e48df

Please sign in to comment.