← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1695131] [NEW] DirectMappingError shows incorrect message when insecure_debug set to true

 

Public bug reported:

When I set the rule below:
[
{
    "local": [
        {
            "user":{
                   "name":"{0}"
                   }
        },
        {
            "group": {
                   "id":"c59d9770089b4d5aaa893973bbcfb538"
                    }
        }
    ],
    "remote":[
              {
              "type":"openstack_user",
              "any_one_of": [
                        "bob"
                           ]
              }
             ]
}
]

and I want to get the unscoped token, the error shows:

keystoneauth1.exceptions.http.InternalServerError: An unexpected error
prevented the server from fulfilling your request. (HTTP 500) (Request-
ID: req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f)


Then I set the 'insecure_debug' to 'True', the error shows:
keystoneauth1.exceptions.http.InternalServerError: An unexpected error prevented the server from fulfilling your request: . (Disable insecure_debug mode to suppress these details.) (HTTP 500) (Request-ID: req-eb26c090-87b2-4fa8-90d9-004928a61711)


I have digging the error happens in '_update_local_mapping' method in keystone/federation/utils.py.
Some logs bellow:

2017-06-02 09:48:02.160 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] {u'remote': [{u'type': u'openstack_user', u'any_one_of': [u'bob']}], u'local': [{u'user': {u'name': u'{0}'}}, {u'group': {u'id': u'c59d9770089b4d5aaa893973bbcfb538'}}]} process /usr/lib/python2.7/site-packages/keystone/federation/utils.py:531
2017-06-02 09:48:02.160 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] _verify_all_requirements /usr/lib/python2.7/site-packages/keystone/federation/utils.py:796
2017-06-02 09:48:02.161 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] _verify_all_requirements /usr/lib/python2.7/site-packages/keystone/federation/utils.py:806
2017-06-02 09:48:02.161 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] <keystone.federation.utils.DirectMaps object at 0x7f4073fa3f90> process /usr/lib/python2.7/site-packages/keystone/federation/utils.py:537
2017-06-02 09:48:02.161 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] direct_maps: <keystone.federation.utils.DirectMaps object at 0x7f4073fa3f90> _update_local_mapping /usr/lib/python2.7/site-packages/keystone/federation/utils.py:717
2017-06-02 09:48:02.162 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] local: {u'user': {u'name': u'{0}'}} _update_local_mapping /usr/lib/python2.7/site-packages/keystone/federation/utils.py:718
2017-06-02 09:48:02.162 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] direct_maps: <keystone.federation.utils.DirectMaps object at 0x7f4073fa3f90> _update_local_mapping /usr/lib/python2.7/site-packages/keystone/federation/utils.py:717
2017-06-02 09:48:02.162 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] local: {u'name': u'{0}'} _update_local_mapping /usr/lib/python2.7/site-packages/keystone/federation/utils.py:718
2017-06-02 09:48:02.163 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] 
{0} _update_local_mapping /usr/lib/python2.7/site-packages/keystone/federation/utils.py:728
2017-06-02 09:48:02.169 2933 WARNING oslo_config.cfg [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] Option "rpc_backend" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
2017-06-02 09:48:02.191 2933 DEBUG keystone.auth.plugins.mapped [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] An unexpected error prevented the server from fulfilling your request. handle_unscoped_token /usr/lib/python2.7/site-packages/keystone/auth/plugins/mapped.py:283
2017-06-02 09:48:02.192 2933 WARNING keystone.common.wsgi [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] An unexpected error prevented the server from fulfilling your request.

** Affects: keystone
     Importance: Undecided
     Assignee: yangweiwei (496176919-6)
         Status: In Progress

-- 
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/1695131

Title:
  DirectMappingError shows incorrect message when  insecure_debug set to
  true

Status in OpenStack Identity (keystone):
  In Progress

Bug description:
  When I set the rule below:
  [
  {
      "local": [
          {
              "user":{
                     "name":"{0}"
                     }
          },
          {
              "group": {
                     "id":"c59d9770089b4d5aaa893973bbcfb538"
                      }
          }
      ],
      "remote":[
                {
                "type":"openstack_user",
                "any_one_of": [
                          "bob"
                             ]
                }
               ]
  }
  ]

  and I want to get the unscoped token, the error shows:

  keystoneauth1.exceptions.http.InternalServerError: An unexpected error
  prevented the server from fulfilling your request. (HTTP 500)
  (Request-ID: req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f)

  
  Then I set the 'insecure_debug' to 'True', the error shows:
  keystoneauth1.exceptions.http.InternalServerError: An unexpected error prevented the server from fulfilling your request: . (Disable insecure_debug mode to suppress these details.) (HTTP 500) (Request-ID: req-eb26c090-87b2-4fa8-90d9-004928a61711)

  
  I have digging the error happens in '_update_local_mapping' method in keystone/federation/utils.py.
  Some logs bellow:

  2017-06-02 09:48:02.160 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] {u'remote': [{u'type': u'openstack_user', u'any_one_of': [u'bob']}], u'local': [{u'user': {u'name': u'{0}'}}, {u'group': {u'id': u'c59d9770089b4d5aaa893973bbcfb538'}}]} process /usr/lib/python2.7/site-packages/keystone/federation/utils.py:531
  2017-06-02 09:48:02.160 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] _verify_all_requirements /usr/lib/python2.7/site-packages/keystone/federation/utils.py:796
  2017-06-02 09:48:02.161 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] _verify_all_requirements /usr/lib/python2.7/site-packages/keystone/federation/utils.py:806
  2017-06-02 09:48:02.161 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] <keystone.federation.utils.DirectMaps object at 0x7f4073fa3f90> process /usr/lib/python2.7/site-packages/keystone/federation/utils.py:537
  2017-06-02 09:48:02.161 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] direct_maps: <keystone.federation.utils.DirectMaps object at 0x7f4073fa3f90> _update_local_mapping /usr/lib/python2.7/site-packages/keystone/federation/utils.py:717
  2017-06-02 09:48:02.162 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] local: {u'user': {u'name': u'{0}'}} _update_local_mapping /usr/lib/python2.7/site-packages/keystone/federation/utils.py:718
  2017-06-02 09:48:02.162 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] direct_maps: <keystone.federation.utils.DirectMaps object at 0x7f4073fa3f90> _update_local_mapping /usr/lib/python2.7/site-packages/keystone/federation/utils.py:717
  2017-06-02 09:48:02.162 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] local: {u'name': u'{0}'} _update_local_mapping /usr/lib/python2.7/site-packages/keystone/federation/utils.py:718
  2017-06-02 09:48:02.163 2933 DEBUG keystone.federation.utils [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] 
  {0} _update_local_mapping /usr/lib/python2.7/site-packages/keystone/federation/utils.py:728
  2017-06-02 09:48:02.169 2933 WARNING oslo_config.cfg [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] Option "rpc_backend" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
  2017-06-02 09:48:02.191 2933 DEBUG keystone.auth.plugins.mapped [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] An unexpected error prevented the server from fulfilling your request. handle_unscoped_token /usr/lib/python2.7/site-packages/keystone/auth/plugins/mapped.py:283
  2017-06-02 09:48:02.192 2933 WARNING keystone.common.wsgi [req-94ec1d2f-4e3e-4174-a1d7-1ff574169f1f - - - - -] An unexpected error prevented the server from fulfilling your request.

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


Follow ups