Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon Cognito: Enforcing password expiration policy

Tags:

Is there a way to enforce password expiration policy on users in Amazon Cognito user pools?

like image 942
Doron Zavelevsky Avatar asked Jul 04 '17 00:07

Doron Zavelevsky


People also ask

Do Cognito passwords expire?

The default setting is 7 days, measured from the time when an administrator or the user creates the account. The maximum setting is 365 days. After the account expires, the user can't log in to the account until you update the user's profile. To do this, update an attribute or resend the password to the user.

What happens when AWS password expires?

If a password expires, the IAM user can't sign in to the AWS Management Console but can continue to use their access keys. When you create or change a password policy, most of the password policy settings are enforced the next time your users change their passwords.

What happens when domain password expires?

So, what happens when a password expires in Active Directory? The account will not be locked, but the user will have to change the password before they can access domain resources.

How do I enable password expiration?

In the menu on the left, navigate to Computer Configuration>Windows Settings>Security Settings>Account Policies>Password Policy, and double-click “Maximum Password Age.” Change the value from “42” to your preferred length of days, and then click “OK” to save the setting.


1 Answers

It doesn't look like expiration is built into the password policy. You could track password expiration by adding a passwordUpdatedAt field and manually updating that attribute on user sign up and on changePassword. Then you could schedule something that queries users with expired passwords and call AdminResetUserPassword for those users. It would be somewhat more reliable if AWS published Cognito Userpoool User events like changePassword or just baked it into the service.

like image 118
eddywashere Avatar answered Sep 24 '22 11:09

eddywashere