Hi, as per client requirement, i need to access Configure<Security<User Source - Password Policy in gateway from perspective view. I have created a user management Page in View
and in that user management page i have given an password policies and setting page.
but here i want to know when was the last password has changed. so that user can get a message before expire of password to changes the password for that i need to access Configure<Security<User Source - Password Policy in gateway from perspective view. Please let me know how to do it from view.
Hi,
In which mode is your user source? Internal, Database ?
If your are in Database mode, you can simply add a new table with the password creation date. Each time a user change a password just refresh the creation date to "now()".
And then, when the user log in, check that the date is older than the expiration time, then force the user to change the password.
And if you want to force the user to really change the password, just create another table and store the X last password hashes per user, and check if the new password hash is equal to one of these.
For your information, ignition will hash and encode in base64 all passwords.
So to store passwords, or check if the password are equals, use the function below
import hashlib
import base64
passwordHash = base64.b64encode(hashlib.sha1("Sup3rS3cr3tPa$$word").digest())
I hope this helps you.
Best regards,
Steven Cheron
1 Like
i will try this ..Thank you steven for your help!!
1 Like