* internal/clientcache: restore user on login
A user that previously had its last auth token deleted
(for example, if they logged out), should be restored
again when they successfully authenticate again.
* internal/clientcache: delete keyringless expired auth tokens
Previously, we would only correctly delete auth tokens
that were expired (or deleted) if they were also in the
keyring.
* internal/clientcache: remove tautological condition
At this stage we already know that at is non-nil, because
the case above would have been true if it was nil.
* internal/clientcache: improve error handling
The previous error handling would have ignored API errors that were not ErrUnauthorized or ErrNotFound.
Handle all API errors the same as other unexpected errors.
* internal/clientcache: make errors distinct
These two error conditions are otherwise impossible
to tell apart.
* test(e2e): Update search test to catch bug (#5551)
---------
Co-authored-by: Michael Li <michael.li@hashicorp.com>
pull/5464/head
Johan Brandhorst-Satzkorn1 year agocommitted byGitHub