Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for optional Password Policy #3032

Merged
merged 26 commits into from
Nov 17, 2016
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
05cc0d9
Introducing passwordPolicy with resetTokenValidityDuration
bhaskaryasa Nov 7, 2016
bbd5d37
validator added to passwordPolicy
bhaskaryasa Nov 8, 2016
96920bd
Add some unit tests for passwordPolicy.validator
bhaskaryasa Nov 9, 2016
e7307be
Add unit test for reset password failure for non-conformance
bhaskaryasa Nov 9, 2016
3206b34
Update README.md for passwordPolicy
bhaskaryasa Nov 9, 2016
052d6eb
Added code to handle Parse.Error from rest.update in UserController.u…
bhaskaryasa Nov 10, 2016
6bbdbbe
Merge branch 'password-policy' of https://github.com/bhaskaryasa/pars…
bhaskaryasa Nov 10, 2016
838d7cb
Added optional setting to disallow username in password
bhaskaryasa Nov 10, 2016
54bf4d1
fdescribe -> describe
bhaskaryasa Nov 10, 2016
59fb9d7
updated PasswordPolicy.spec.js to use request-promise
bhaskaryasa Nov 11, 2016
e82e1bf
passwordPolicy.validator split into two separate options - RegExp and…
bhaskaryasa Nov 11, 2016
2f0fcd7
Introducing passwordPolicy with resetTokenValidityDuration
bhaskaryasa Nov 7, 2016
f41747b
validator added to passwordPolicy
bhaskaryasa Nov 8, 2016
3cd904e
Add some unit tests for passwordPolicy.validator
bhaskaryasa Nov 9, 2016
f385f6a
Add unit test for reset password failure for non-conformance
bhaskaryasa Nov 9, 2016
5b868f6
Update README.md for passwordPolicy
bhaskaryasa Nov 9, 2016
1c1a515
Added code to handle Parse.Error from rest.update in UserController.u…
bhaskaryasa Nov 10, 2016
bd1673d
Added optional setting to disallow username in password
bhaskaryasa Nov 10, 2016
45ee8b5
fdescribe -> describe
bhaskaryasa Nov 10, 2016
f7ce2c7
updated PasswordPolicy.spec.js to use request-promise
bhaskaryasa Nov 11, 2016
838eb27
passwordPolicy.validator split into two separate options - RegExp and…
bhaskaryasa Nov 11, 2016
a9f55f8
fixed some typos
bhaskaryasa Nov 11, 2016
7401000
expect username parameter in redirect to password_reset_success
bhaskaryasa Nov 11, 2016
4ce59aa
pull from origin
bhaskaryasa Nov 11, 2016
9ed141c
Fix postgres issue for _perishable_token_expires_at
bhaskaryasa Nov 12, 2016
72a0670
fix for _perishable_token_expires_at
bhaskaryasa Nov 12, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ The client keys used with Parse are no longer necessary with Parse Server. If yo
* `sessionLength` - The length of time in seconds that a session should be valid for. Defaults to 31536000 seconds (1 year).
* `revokeSessionOnPasswordReset` - When a user changes their password, either through the reset password email or while logged in, all sessions are revoked if this is true. Set to false if you don't want to revoke sessions.
* `accountLockout` - Lock account when a malicious user is attempting to determine an account password by trial and error.
* `passwordPolicy` - Optional password policy rules to enforce.

##### Logging

Expand Down Expand Up @@ -277,6 +278,15 @@ var server = ParseServer({
duration: 5, // duration policy setting determines the number of minutes that a locked-out account remains locked out before automatically becoming unlocked. Set it to a value greater than 0 and less than 100000.
threshold: 3, // threshold policy setting determines the number of failed sign-in attempts that will cause a user account to be locked. Set it to an integer value greater than 0 and less than 1000.
},
// optional settings to enforce password policies
passwordPolicy: {
// optional setting to enforce strong passwords
// can be a RegExp/String representing pattern to enforce or a function that return a bool
validator: /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})/, // enforce password with at least 8 char with at least 1 lower case, 1 upper case and 1 digit
doNotAllowUsername: true, // optional setting to disallow username in passwords
//optional setting to set a validity duration for password reset links (in seconds)
resetTokenValidityDuration: 24*60*60, // expire after 24 hours
}
});
```

Expand Down
Loading