Invalid credentials when user data folder is completely removed
shyba opened this issue · comments
Victor Shyba commented
Steps:
- Take a working logged user.
- Stop and remove docker container.
- Call reset_data on cli and remove the config file remaining. (/var/lib/dispatcher/user_name/)
- Try to login again.
Expected: Successful login
Got: Invalid Credentials.
For more info, see last comment on #61
lieblingswelt commented
The actual exception is as follows:
ERROR:pixelated.manager:Error during request:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 862, in _handle
return route.call(**args)
File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 1729, in wrapper
rv = callback(*a, **ka)
File "/vagrant/pixelated/../pixelated/manager/__init__.py", line 57, in wrapper
return callback(*args, **kwargs)
File "/vagrant/pixelated/../pixelated/manager/__init__.py", line 66, in wrapper
return callback(*args, **kwargs)
File "/vagrant/pixelated/../pixelated/manager/__init__.py", line 206, in _authenticate_agent
result = self._authenticator.authenticate(name, password)
File "/vagrant/pixelated/../pixelated/authenticator.py", line 56, in authenticate
return self._is_valid_credentials(username, password)
File "/vagrant/pixelated/../pixelated/authenticator.py", line 67, in _is_valid_credentials
cfg = self._users.config(username)
File "/vagrant/pixelated/../pixelated/users.py", line 127, in config
with open(user_config, 'r') as fd:
IOError: [Errno 2] No such file or directory: '/var/lib/dispatcher/alice/user.cfg'
Victor Shyba commented
Fixed. After removing all files from data folder I am able to login again normally. 👍