ging / fiware-idm-deprecated

DEPRECATED - Identity Manager - Keyrock
Apache License 2.0
18 stars 25 forks source link

KeyError after Login in v5.4.0 #78

Closed thomaskoeck closed 7 years ago

thomaskoeck commented 7 years ago

Hi,

I need some help please: I am currently using the docker image of KeyRock v5.3.0. Yesterday I saw that a couple of days ago there was a version 5.4.0 of KeyRock released. So I decided to update to this version, but unfortunately there seems to be bug. After I logged in as "idm" I always got a KeyError message. The following message is returned:

Traceback: File "/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1. response = middleware_method(request) File "/horizon/openstack_dashboard/fiware_middleware/middleware.py" in process_request
  2. if (fiware_api.keystone.user_is_password_expired(request)): File "/horizon/openstack_dashboard/fiware_api/keystone.py" in user_is_password_expired
  3. return (datetime.datetime.today() - password_changed_date).days > settings.FIWARE_DEFAULT_DURATION['user_password']

Exception Type: KeyError at / Exception Value: 'user_password'

In KeyRock v5.3.0 I can login as "idm" without any problems.

Can someone help me with this?

Thanks in advance.

Best regards, Thomas

federicofdez commented 7 years ago

Good morning @thomaskoeck ,

Thank you for writing! One of the features that has been introduced in release 5.4.0 is password expiration, that is to say, that whenever a user has not changed their password for a certain amount of time, they are asked to do so during login. This amount of time is specified (in days) in this setting that your installation is missing: FIWARE_DEFAULT_DURATION['user_password'].

When updating from a previous release, it is neccesary to include any new setting in your local_settings.py file, because it is not into version control for security purposes (but the default template, local_settings.py.example actually is).

We might provide some sanity-checks tool in the future to try to avoid this kind of situations, but I'm afraid that for now the only way to handle it is by hand.

Feel free to write back if we can be of further help!

Best regards, Federico Fernández

federicofdez commented 7 years ago

Just to make it more clear:

thomaskoeck commented 7 years ago

Everything works now, thank you very much.

federicofdez commented 7 years ago

Glad to hear that! I'll close the issue then.

Cheers!