Reviewed:  https://review.openstack.org/298925
Committed: 
https://git.openstack.org/cgit/openstack/keystone-specs/commit/?id=a2d175502e686b379233ae903ecb4cddade16ebc
Submitter: Jenkins
Branch:    master

commit a2d175502e686b379233ae903ecb4cddade16ebc
Author: Sean Perry <sean.pe...@hpe.com>
Date:   Tue Mar 29 11:28:14 2016 -0700

    Cleanup 'implied roles' section of Identity API V3 spec
    
    Replace 'link' with 'links'
    Cleanup comma usage
    Cleanup brace indentation and placement
    Remove incorrect extra 'links'
    Ensure that the output for GET implied role is wrapped in 'role_inference'
    
    Change-Id: Ie6787c1d81a0fa20bcd4f883b68d15fda7e6ca2f
    Closes-Bug: 1563113


** Changed in: keystone
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1563113

Title:
  Implied Roles responses do not match the spec

Status in OpenStack Identity (keystone):
  Fix Released

Bug description:
  http --pretty format PUT
  
https://identity.example.com:35357/v3/roles/5a912666c3704c22a20d4c35f3068a88/implies/edd42085d3ab472e9cf13b3cf3c362b6
  "X-Auth-Token:4879c74089b744439057581c9d85bc19"

      {
          "role_inference": {
              "implies": {
                  "id": "edd42085d3ab472e9cf13b3cf3c362b6", 
                  "links": {
                      "self": 
"https://identity.example.com:35357/v3/roles/edd42085d3ab472e9cf13b3cf3c362b6";
                  }, 
                  "name": "SomeRole1"
              }, 
              "prior_role": {
                  "id": "5a912666c3704c22a20d4c35f3068a88", 
                  "links": {
                      "self": 
"https://identity.example.com:35357/v3/roles/5a912666c3704c22a20d4c35f3068a88";
                  }, 
                  "name": "testing"
              }
          }
      }

  https://github.com/openstack/keystone-specs/blob/master/api/v3
  /identity-api-v3.rst#create-role-inference-rule

      {
          "role_inference": {
              "prior_role": {
                  "id": "--prior-role-id--",
                  "links": {
                      "self": "http://identity:35357/v3/roles/--prior-role-id--";
                  }
                  "name": "prior role name"
              },
              "implies":
                  {
                      "id": "--implied-role1-id--",
                      "link": {
                          "self": 
"http://identity:35357/v3/roles/--implied-role1-id--";
                      },
                      "name": "implied role1 name"
                  }
          },
      }

  Note missing comma and s/links/link/. Also, json is usually output in
  sorted order.

  http --pretty format GET
  https://identity.example.com:35357/v3/role_inferences "X-Auth-
  Token:4879c74089b744439057581c9d85bc19"

      {
          "role_inferences": [
              {
                  "implies": [
                      {
                          "id": "edd42085d3ab472e9cf13b3cf3c362b6", 
                          "links": {
                              "self": 
"https://identity.example.com:35357/v3/roles/edd42085d3ab472e9cf13b3cf3c362b6";
                          }, 
                          "name": "SomeRole1"
                      }
                  ], 
                  "prior_role": {
                      "id": "5a912666c3704c22a20d4c35f3068a88", 
                      "links": {
                          "self": 
"https://identity.example.com:35357/v3/roles/5a912666c3704c22a20d4c35f3068a88";
                      }, 
                      "name": "testing"
                  }
              }
          ]
      }

  https://github.com/openstack/keystone-specs/blob/master/api/v3
  /identity-api-v3.rst#list-all-role-inference-rules

  Again, s/link/links/. No missing comma though.

  http --pretty format GET
  
https://identity.example.com:35357/v3/roles/5a912666c3704c22a20d4c35f3068a88/implies/edd42085d3ab472e9cf13b3cf3c362b6
  "X-Auth-Token:4879c74089b744439057581c9d85bc19"

      {
          "role_inference": {
              "implies": {
                  "id": "edd42085d3ab472e9cf13b3cf3c362b6", 
                  "links": {
                      "self": 
"https://identity.example.com:35357/v3/roles/edd42085d3ab472e9cf13b3cf3c362b6";
                  }, 
                  "name": "SomeRole1"
              }, 
              "prior_role": {
                  "id": "5a912666c3704c22a20d4c35f3068a88", 
                  "links": {
                      "self": 
"https://identity.example.com:35357/v3/roles/5a912666c3704c22a20d4c35f3068a88";
                  }, 
                  "name": "testing"
              }
          }
      }

  https://github.com/openstack/keystone-specs/blob/master/api/v3
  /identity-api-v3.rst#get-role-inference-rule

  According to the spec, there is no "role_inference" wrapper here.
  Also, a top level "links". There is also a missing comma but the
  'links' for implies is correct (only place this is true).

  http --pretty format GET
  
https://identity.example.com:35357/v3/roles/5a912666c3704c22a20d4c35f3068a88/implies
  "X-Auth-Token:4879c74089b744439057581c9d85bc19"

      {
          "role_inference": {
              "implies": [
                  {
                      "id": "edd42085d3ab472e9cf13b3cf3c362b6", 
                      "links": {
                          "self": 
"https://identity.example.com:35357/v3/roles/edd42085d3ab472e9cf13b3cf3c362b6";
                      }, 
                      "name": "SomeRole1"
                  }
              ], 
              "prior_role": {
                  "id": "5a912666c3704c22a20d4c35f3068a88", 
                  "links": {
                      "self": 
"https://identity.example.com:35357/v3/roles/5a912666c3704c22a20d4c35f3068a88";
                  }, 
                  "name": "testing"
              }
          }
      }

  https://github.com/openstack/keystone-specs/blob/master/api/v3
  /identity-api-v3.rst#list-implied-roles-for-role

  This says there will also be a "links" key under role_inference (which
  is wrong). Also, continued failure of s/link/links/.

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1563113/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to