Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Keystone failure response "error" or "identityFault"?

Hello, I recently installed a devstack in order to build an OpenStack monitoring client. Getting my client to authenticate with Keystone has been the first order of business.

My client needs to be able to report authentication errors up to the end user so they can know that the client configuration needs to be updated. The problem I am having is parsing the error responses from the keystone server.

When I send the wrong user name I get back:

<?xml version="1.0" encoding="UTF-8"?>
<error xmlns="" message="Could not find user, test_user." code="401" title="Unauthorized"/>

But when I try to parse this error I get:

javax.xml.bind.UnmarshalException: unexpected element 
(uri:"", local:"error"). 
Expected elements are 

Which is expected since there is no definition for a fault called “error” in the schema:

I am trying to understand my next steps here. I looked online and it seems there are plenty of examples of systems returning this “error” element. But there are also numerous examples of systems returning “identityFault” elements instead.

  • Does the “error” element predate the “identityFault” elements? Is this from pre-v2.0?
  • My version of Keystone is 2014.1.dev107.g6940924 which seems to be pretty recent (long after v2.0) so is it a bug?
  • Is there some configuration switch that needs to be thrown to cause the keystone server to respond with “IdentityFault” instead of “error”?

Look forward to your feedback.

Dave Graham CA Technologies