Re: [openstack-dev] openstack-barbican-authenticate-keystone-barbican-command

2015-11-04 Thread Dave McCowan (dmccowan)
Hi Arif--
Maybe using the OpenStack client would be easier for you.  It will take 
care of authenticating with Keystone, setting the HTTP headers, and providing 
reasonable defaults.
It looks like you have installed OpenStack with DevStack.  If this is the 
case:

$ cd ~/devstack
$ source openrc admin admin
$ openstack secret store -p "super secret data"
# An HREF is returned in the response when the secret has been stored
$ openstack secret get   -p
# Your secret is returned

   Drop by our IRC channel at #openstack-barbican on freenode if you have more 
questions, or if this suggestion doesn't work with your deployment.
--Dave

From: OpenStack Mailing List Archive mailto:cor...@gmail.com>>
Reply-To: "OpenStack Development Mailing List (not for usage questions)" 
mailto:openstack-dev@lists.openstack.org>>
Date: Monday, October 26, 2015 at 1:46 AM
To: "OpenStack Development Mailing List (not for usage questions)" 
mailto:openstack-dev@lists.openstack.org>>
Subject: Re: [openstack-dev] 
openstack-barbican-authenticate-keystone-barbican-command

Link: https://openstack.nimeyo.com/62868/?show=63238#c63238
From: marif82 mailto:mari...@gmail.com>>


Hi Dave,

Thanks for your response.
I am the beginner in OpenStack so I don't know how to get Keystone token so I 
searched and found "admintoken = a682f596-76f3-11e3-b3b2-e716f9080d50" in 
keystone.conf file. As you suggested i have removed the projectid from curl 
command and X-Auth-Token in curl command as per your suggestion and I am still 
getting the same error, please see below:

bash-4.2$ curl -X POST -H 'content-type:application/json' -H 
'X-Auth-Token:a682f59676f311e3b3b2e716f9080d50' -H 'X-Project-Id:12345' -d 
'{"payload": "my-secret-here", "payloadcontenttype": "text/plain"}' 
http://localhost:9311/v1/secrets -v
* About to connect() to localhost port 9311 
(#0<https://openstack.nimeyo.com/tag/0>)
* Trying ::1...
* Connection refused
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 9311 
(#0<https://openstack.nimeyo.com/tag/0>)

POST /v1/secrets HTTP/1.1
User-Agent: curl/7.29.0
Host: localhost:9311
Accept: /
content-type:application/json
X-Auth-Token:a682f59676f311e3b3b2e716f9080d50
X-Project-Id:12345
Content-Length: 67

* upload completely sent off: 67 out of 67 bytes
< HTTP/1.1 401 Unauthorized
< Content-Type: text/html; charset=UTF-8
< Content-Length: 23
< WWW-Authenticate: Keystone uri='http://localhost:35357'
< Connection: close
<
* Closing connection 0
Authentication requiredbash-4.2$

Please help me.

Regards,
Arif
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] openstack-barbican-authenticate-keystone-barbican-command

2015-10-25 Thread OpenStack Mailing List Archive

Link: https://openstack.nimeyo.com/62868/?show=63238#c63238
From: marif82 

Hi Dave,

Thanks for your response.
I am the beginner in OpenStack so I don't know how to get Keystone token so I searched and found "admintoken = a682f596-76f3-11e3-b3b2-e716f9080d50" in keystone.conf file. As you suggested i have removed the projectid from curl command and X-Auth-Token in curl command as per your suggestion and I am still getting the same error, please see below:

bash-4.2$ curl -X POST -H 'content-type:application/json' -H 'X-Auth-Token:a682f59676f311e3b3b2e716f9080d50' -H 'X-Project-Id:12345' -d '{"payload": "my-secret-here", "payloadcontenttype": "text/plain"}' http://localhost:9311/v1/secrets -v
* About to connect() to localhost port 9311 (#0)
*   Trying ::1...
* Connection refused
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 9311 (#0)


  POST /v1/secrets HTTP/1.1
  User-Agent: curl/7.29.0
  Host: localhost:9311
  Accept: /
  content-type:application/json
  X-Auth-Token:a682f59676f311e3b3b2e716f9080d50
  X-Project-Id:12345
  Content-Length: 67


* upload completely sent off: 67 out of 67 bytes
< HTTP/1.1 401 Unauthorized
< Content-Type: text/html; charset=UTF-8
< Content-Length: 23
< WWW-Authenticate: Keystone uri='http://localhost:35357'
< Connection: close
<
* Closing connection 0
Authentication requiredbash-4.2$

Please help me.

Regards,
Arif



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] openstack-barbican-authenticate-keystone-barbican-command

2015-10-21 Thread Dolph Mathews
On Wed, Oct 21, 2015 at 6:26 AM, Dave McCowan (dmccowan)  wrote:

> Hi Arif--
> Are you using Keystone for authentication?
> If so, you need to get an authentication token from Keystone and add
> it as a header to your curl command: -H "X-Auth-Token:*$TOKEN*".
> You do not need to specify the project ID (-H 'X-Project-Id:12345').
> The project ID will be based on your Keystone user's project ID.
>

++ To add to that, X-Project-Id is provided to Barbican by
keystonemiddleware.auth_token (along with the rest of your authorization
context) after your X-Auth-Token is authenticated. If you're not using
keystonemiddleware.auth_token, you could specify X-Project-Id yourself, and
Barbican would blindly trust you.


> --Dave
>
> From: OpenStack Mailing List Archive 
> Reply-To: "openstack-dev@lists.openstack.org" <
> openstack-dev@lists.openstack.org>
> Date: Wednesday, October 21, 2015 at 3:11 AM
> To: "openstack-dev@lists.openstack.org"  >
> Subject: [openstack-dev]
> openstack-barbican-authenticate-keystone-barbican-command
>
> Link: https://openstack.nimeyo.com/62868/?show=62868#q62868
> From: marif82 
>
> Hi Asha,
>
> I am also getting the same error when I am executing the curl command to
> create secret.
>
> bash-4.2$ curl -X POST -H 'content-type:application/json' -H
> 'X-Project-Id:12345' -d '{"payload": "my-secret-here","payload*content*type":
> "text/plain"}' http://localhost:9311/v1/secrets
> Authentication requiredbash-4.2$
>
> Can you please help me how you have solved this problem. I am using the
> safenet HSM for MKEK and HMAC and it generated successfully on HSM
> partition.
>
> Please help me to resolve this issue.
>
> Thanks & Regards,
> Arif
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] openstack-barbican-authenticate-keystone-barbican-command

2015-10-21 Thread Dave McCowan (dmccowan)
Hi Arif--
Are you using Keystone for authentication?
If so, you need to get an authentication token from Keystone and add it as 
a header to your curl command: -H "X-Auth-Token:$TOKEN".
You do not need to specify the project ID (-H 'X-Project-Id:12345').  The 
project ID will be based on your Keystone user's project ID.
--Dave

From: OpenStack Mailing List Archive mailto:cor...@gmail.com>>
Reply-To: 
"openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>" 
mailto:openstack-dev@lists.openstack.org>>
Date: Wednesday, October 21, 2015 at 3:11 AM
To: 
"openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>" 
mailto:openstack-dev@lists.openstack.org>>
Subject: [openstack-dev] 
openstack-barbican-authenticate-keystone-barbican-command

Link: https://openstack.nimeyo.com/62868/?show=62868#q62868
From: marif82 mailto:mari...@gmail.com>>


Hi Asha,

I am also getting the same error when I am executing the curl command to create 
secret.

bash-4.2$ curl -X POST -H 'content-type:application/json' -H 
'X-Project-Id:12345' -d '{"payload": "my-secret-here","payloadcontenttype": 
"text/plain"}' http://localhost:9311/v1/secrets
Authentication requiredbash-4.2$

Can you please help me how you have solved this problem. I am using the safenet 
HSM for MKEK and HMAC and it generated successfully on HSM partition.

Please help me to resolve this issue.

Thanks & Regards,
Arif
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] openstack-barbican-authenticate-keystone-barbican-command

2015-10-21 Thread OpenStack Mailing List Archive

Link: https://openstack.nimeyo.com/62868/?show=62868#q62868
From: marif82 

Hi Asha,

I am also getting the same error when I am executing the curl command to create secret. 

bash-4.2$ curl -X POST -H 'content-type:application/json' -H 'X-Project-Id:12345' -d '{"payload": "my-secret-here","payloadcontenttype": "text/plain"}' http://localhost:9311/v1/secrets
Authentication requiredbash-4.2$

Can you please help me how you have solved this problem. I am using the safenet HSM for MKEK and HMAC and it generated successfully on HSM partition.

Please help me to resolve this issue.

Thanks & Regards,
Arif



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev