]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: add password expiration date
authorTatjana Dehler <tdehler@suse.com>
Fri, 13 Sep 2019 12:08:39 +0000 (14:08 +0200)
committerTatjana Dehler <tdehler@suse.com>
Fri, 13 Dec 2019 07:53:05 +0000 (08:53 +0100)
commit0221241909e93a8239e256de0cf1efa2bdfe9bbf
tree59bf1aab6f7b37378ab67b3a73570761f376389d
parent0327a12db19eb7fde02bbe63738d53e4e08fc9ec
mgr/dashboard: add password expiration date

Add a 'pwd_expiration_date' field to the User object to be able
to set password expiration date per user.

There are two options to set a password expiration date for a
user:

1. Set the 'USER_PWD_EXPIRATION_SPAN' setting. If defined
   the expiration date of the password will be calculated
   automatically based on the given value. It will also be
   updated automatically when the user changes the password.
2. Set an expiration date by setting the 'pwdExpirationDate'
   field when creating a user.

Add two more settings in addition: USER_PWD_EXPIRATION_WARNING_1
and USER_PWD_EXPIRATION_WARNING_2. These two settings are
defining the amount of days to notify the user that his password
will expiration soon.

It's not possible to set the 'pwd_expiration_date' field to a
date in the past.

If the password of a user is already expired he is no longer
allowed to log into the dashboard.

Fixes: https://tracker.ceph.com/issues/40329
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
23 files changed:
doc/mgr/dashboard.rst
qa/tasks/mgr/dashboard/test_auth.py
qa/tasks/mgr/dashboard/test_user.py
src/pybind/mgr/dashboard/.pylintrc
src/pybind/mgr/dashboard/controllers/auth.py
src/pybind/mgr/dashboard/controllers/settings.py
src/pybind/mgr/dashboard/controllers/user.py
src/pybind/mgr/dashboard/exceptions.py
src/pybind/mgr/dashboard/frontend/src/app/core/auth/auth.module.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/login/login.component.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.model.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/auth.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/settings.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-pwd-expiration-settings.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/shared/models/login-response.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/auth-storage.service.ts
src/pybind/mgr/dashboard/services/access_control.py
src/pybind/mgr/dashboard/settings.py
src/pybind/mgr/dashboard/tests/test_access_control.py