← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1221889] Re: Invalid X-Subject-Token results in HTTP 401 rather than 404

 

** Changed in: keystone
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1221889

Title:
  Invalid X-Subject-Token results in HTTP 401 rather than 404

Status in OpenStack Identity (Keystone):
  Fix Released
Status in Tempest:
  In Progress

Bug description:
  While fixing https://bugs.launchpad.net/keystone/+bug/1186059 I observed that lots of unit tests related to V3 head test is not correct.
  e.g. all the below unit test try to make a head call after deleting/revoking x-subject-token and assumes that it will be unauthorized.
  self.head('/auth/tokens', headers={'X-Subject-Token': token2}, expected_status=401)
  In reality the above call creates another scoped token and auth passed with the new token, in that case 401 is not a correct test it should be 404 which is also aligned with docs https://github.com/openstack/identity-api/blob/master/openstack-identity-api/v3/src/markdown/identity-api-v3.md#403-forbidden. 

  test_deleting_group_grant_revokes_tokens (keystone.tests.test_v3_auth.TestTokenRevoking)
  test_deleting_project_revokes_token (keystone.tests.test_v3_auth.TestTokenRevoking)
  test_deleting_user_grant_revokes_token (keystone.tests.test_v3_auth.TestTokenRevoking)
  test_disabling_project_revokes_token (keystone.tests.test_v3_auth.TestTokenRevoking)
  test_group_membership_changes_revokes_token (keystone.tests.test_v3_auth.TestTokenRevoking)
  test_removing_role_assignment_does_not_affect_other_users (keystone.tests.test_v3_auth.TestTokenRevoking)

  I found this issue with lots of V3 token related tests but as per
  Morgan Fainberg (morganfainberg) this also affecting V2 auth unit
  tests.

  I am trying to fix V3 auth unit test issue as part of
  https://bugs.launchpad.net/keystone/+bug/1186059

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