Skip to content

Commit

Permalink
Fix URLs to use v3 when only v2 endpoint is listed in the catalog
Browse files Browse the repository at this point in the history
It covers the cases where we can authenticate with keystone v3 but the endpoint returned in the catalog is v2
see #492
  • Loading branch information
Anthony Chevalet committed Jul 20, 2020
1 parent 7911675 commit 124181c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/fog/openstack/core.rb
Expand Up @@ -222,6 +222,11 @@ def authenticate
@openstack_auth_url
end

# Manages cases where identity endpoint returned is v2 but v3 should be used
if @openstack_service_type.include? 'identity_v3' and @openstack_management_url =~ /\/v2.0(\/)*$/
@openstack_management_url = @openstack_auth_url
end

@current_user = token.user['name']
@current_user_id = token.user['id']
@current_tenant = token.tenant
Expand Down

0 comments on commit 124181c

Please sign in to comment.