Clarify use of X-Project-Id in documentation

Bug #1519173 reported by Dave McCowan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
Low
Priti Desai

Bug Description

Many of the example API calls in Barbican documents use the unauthorized context without explanation.
As Barbican adoption is increasing, this is leading to confusion, as users attempt to follow the examples with a deployment that includes authorization.

I think all of the API examples should be based on the authorized context, and a separate page should be added detailing how to use unauthorized context.

Here's a example:

http://docs.openstack.org/developer/barbican/api/userguide/secrets.html

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

This is confusing because, without explanation, new users expect to use X-Project-Id header.

Revision history for this message
Priti Desai (priti-desai) wrote :

Yup, I understand the pain, was recently referring to these doc. There should be a -H 'X-Auth-Token: 12345' in every request instead of 'X-Project-ID'. Do you foresee adding one page for every API type? I think adding a note in the end of each API type should be sufficient. Thoughts?

Changed in barbican:
assignee: nobody → Priti Desai (priti-desai)
Revision history for this message
Dave McCowan (dave-mccowan) wrote :

I suggest removing X-Project-ID from every doc page that is describing how to use an API.
Examples should instead show using X-Auth-Token, like https://github.com/openstack/barbican/blob/master/doc/source/api/userguide/quotas.rst does.

We could add a paragraph somewhere under https://github.com/openstack/barbican/tree/master/doc/source/setup to say, "as an alternative to deploying with Keystone, there is the option of unauthenticated context".

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to barbican (master)

Fix proposed to branch: master
Review: https://review.openstack.org/251593

Changed in barbican:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Reviewed: https://review.openstack.org/251593
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=db58049e9199ee5d672054ea6c3d55aae3851830
Submitter: Jenkins
Branch: master

commit db58049e9199ee5d672054ea6c3d55aae3851830
Author: priti_desai <email address hidden>
Date: Tue Dec 1 00:17:12 2015 +0000

    Authorized API Requests

    Most of the API Calls use unauthorized context.
    Changing all of the API examples to use authorized context.
    Adding a doc on no auth barbican and usage of
    X-Project-Id instead of X-Auth-Token in APIs.

    Change-Id: I68dec0927fad7f5f47c6a8221e735eb62cb381d4
    Closes-Bug: 1519173

Changed in barbican:
status: In Progress → Fix Committed
Changed in barbican:
milestone: none → mitaka-1
importance: Undecided → Low
milestone: mitaka-1 → mitaka-2
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/barbican 2.0.0.0b2

This issue was fixed in the openstack/barbican 2.0.0.0b2 development milestone.

Revision history for this message
Jeremy Liu (liujiong) wrote :

confuse me too.

Changed in barbican:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.