Session authentication issues can occur when the client
has been initialized and some intermediate failure has occurred
such as a transport failure to the remote BMC or even with setting
changes on the remote BMC.
Previously, these sorts of issues could result in cases where
the client does not properly respond. Either by falling back
to "basic" authentication, or getting stuck in a loop where
the client was unable to re-negotiate a new session with the BMC.
In the event of the BMC no longer being able to support Session
authentication, after a session initialization, the client will
raise an AccessError exception to signify to the consumer that
something has occurred with credentials preventing further client
use without potentially re-initializing the client.
Should the re-authentication fail, the exception will be directly
raised such that the client can no longer fall into a recursive
loop.
Should the state in the client be unable to be determined,
and an AccessError is raised, the client will now attempt to
re-authenticate.
Ultimately moves from using the SessionService to using a new
base class method ``create_session``. The SessionService
class ``create_session`` method is still usable as well, however
new authentication attempts will not utilize it in order to bypass
potential failure cases.
Functionally, this change requires change
I9eb238d1bbaf522d03ee3fce12fc0ab80c1b69b4 to be present
as it removes X-Auth-Token headers which can lead to spurious
authentication failures when sessions expire. Prior to any
authentication action, this patch does *also* do the needful
to prevent a poisoned client which would have potentially
resulted in an AccessError previously.
Change-Id: Id9a32ebcc04f4f3fecb4e10cf157a97322707c94
Story: 2009719
Task: 44106