rackspace / gophercloud

A Go SDK for OpenStack. IN FEATURE FREEZE. See Issue #592
http://gophercloud.io
Other
456 stars 180 forks source link

X509 access #517

Closed lborensky closed 8 years ago

lborensky commented 8 years ago

Hi,

I use a certificate (file CRT) to connect to secure API. For example:

curl -v --cacert $OS_CACERT -s -X 'POST' ${OS_AUTH_URL}/identity/v2.0/tokens \ -H "Content-Type: application/json" \ -d '{"auth": {"tenantName": "ito:unix", "passwordCredentials": {"username": "laurent.borensky", "password": "*****"}}}' \ | python -m json.tool $

I would like to use Gophercloud to manage resources in OpenStack, but I do not know how.My code is

provider, err := openstack.AuthenticatedClient(opts)

with all initialized variables (OS_* as OS_API_KEY), but I still have the following error:

AuthenticatedClient Post https://secapi2.services.rhone.zmhg/identity/v2.0/tokens: x509: certificate is valid for secapi2.rhone.thalesgroup.com, not secapi2.services.rhone.zmhg

Do you have an idea of my problem? Thank you.

Regards

jrperritt commented 8 years ago

It looks like your cert is valid for secapi2.rhone.thalesgroup.com but not the $OS_AUTH_URL you've set (secapi2.services.rhone.zmhg). Perhaps you should create a new cert with that subdomain or add it to the existing one. Either way, I don't think this is a Gophercloud issue.

lborensky commented 8 years ago

Hi,

Thank you for your response. Effectively, I made a mistake with the certificate. With the good URL and the good certificate, I have this error. "Get /: unsupported protocol scheme " when authenticating.

Regards,

2016-01-04 17:35 GMT+01:00 jrperritt notifications@github.com:

It looks like your cert is valid for secapi2.rhone.thalesgroup.com but not the $OS_AUTH_URL you've set (secapi2.services.rhone.zmhg). Perhaps you should create a new cert with that subdomain or add it to the existing one. Either way, I don't think this is a Gophercloud issue.

— Reply to this email directly or view it on GitHub https://github.com/rackspace/gophercloud/issues/517#issuecomment-168726835 .

jrperritt commented 8 years ago

Closing this since it doesn't look like a Gophercloud issue. If there is some evidence and/or code to prove otherwise, please reopen.