You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by bp...@apache.org on 2022/04/08 05:18:54 UTC

[ranger] branch master updated: RANGER-3677 : Update Password Policy validation at WEB-UI

This is an automated email from the ASF dual-hosted git repository.

bpatel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new 758926e9b RANGER-3677 : Update Password Policy validation at WEB-UI
758926e9b is described below

commit 758926e9ba99d3e6c9331cb8bef09058c1a660f0
Author: Dhaval.Rajpara <dh...@gmail.com>
AuthorDate: Tue Mar 29 16:02:21 2022 +0530

    RANGER-3677 : Update Password Policy validation at WEB-UI
---
 .../src/main/webapp/scripts/modules/globalize/message/en.js           | 4 ++--
 security-admin/src/main/webapp/scripts/views/user/UserProfileForm.js  | 4 ++--
 security-admin/src/main/webapp/scripts/views/users/UserForm.js        | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
index be779f55f..d235ea7c9 100644
--- a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
+++ b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
@@ -524,10 +524,10 @@ define(function(require) {
 				alphaNumericUnderscoreDotComma :'* Only Alpha Numeric,underscore,comma,hypen,dot and space characters are allowed',
 				oldPasswordError       :'Your password does not match. Please try again with proper password',
 				oldPasswordRepeatError :'You can not use old password.',
-				newPasswordError       :'Invalid Password. Minimum 8 characters with min one alphabet and one numeric.',
+				newPasswordError       :'Invalid Password. Password should be minimum 8 characters, atleast one uppercase letter, one lowercase letter and one numeric. For FIPS environment password should be minimum 14 characters with atleast one uppercase letter, one special characters, one lowercase letter and one numeric.',
 				emailIdError           : 'Please enter valid email address.',
 				enterValidName         : 'Please enter valid name.',
-				passwordError          :'Password should be minimum 8 characters with min one alphabet and one numeric. For FIPS environment password should be minimum 14 characters with min one alphabet and one numeric.',
+				passwordError          :'Password should be minimum 8 characters, atleast one uppercase letter, one lowercase letter and one numeric. For FIPS environment password should be minimum 14 characters with atleast one uppercase letter, one special characters, one lowercase letter and one numeric.',
 				userNameValidationMsg  :'1. User name should be start with alphabet / numeric / underscore / non-us characters.<br> 2. Allowed special character ,._\-+/@= and space. <br>3. Name length should be greater than one.',
 				groupNameValidationMsg :'1. Group name should be start with alphabet / numeric / underscore / non-us characters.<br> 2. Allowed special character ,._\-+/@= and space. <br>3. Name length should be greater than one.',
                 firstNameValidationMsg :'1. First name should be start with alphabet / numeric / underscore / non-us characters.<br> 2. Allowed special character ._-@ and space. <br>3. Name length should be greater than one.',
diff --git a/security-admin/src/main/webapp/scripts/views/user/UserProfileForm.js b/security-admin/src/main/webapp/scripts/views/user/UserProfileForm.js
index 5ebd29048..d6300251e 100644
--- a/security-admin/src/main/webapp/scripts/views/user/UserProfileForm.js
+++ b/security-admin/src/main/webapp/scripts/views/user/UserProfileForm.js
@@ -107,9 +107,9 @@ define(function(require){
 				this.fields.newPassword.$el.show();
 				this.fields.reEnterPassword.$el.show();
 				this.fields.oldPassword.editor.validators = ['required'];
-				this.fields.newPassword.editor.validators = ['required',{type : 'regexp' ,regexp :/^.*(?=.{8,256})(?=.*\d)(?=.*[a-zA-Z]).*$/, message : ' Invalid password '}];
+				this.fields.newPassword.editor.validators = ['required',{type : 'regexp' ,regexp :/^.*(?=.{8,256})(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).*$/, message : ' Invalid password '}];
 				this.fields.reEnterPassword.editor.validators = ['required',
-				                                                 {type : 'regexp' ,regexp :/^.*(?=.{8,256})(?=.*\d)(?=.*[a-zA-Z]).*$/, message : ' Invalid password '},
+				                                                 {type : 'regexp' ,regexp :/^.*(?=.{8,256})(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).*$/, message : ' Invalid password '},
 				                                                 { type: 'match', field: 'newPassword', message: 'Passwords must match!' }];
 			}
 		},
diff --git a/security-admin/src/main/webapp/scripts/views/users/UserForm.js b/security-admin/src/main/webapp/scripts/views/users/UserForm.js
index 586a1c0e3..4fc06a842 100644
--- a/security-admin/src/main/webapp/scripts/views/users/UserForm.js
+++ b/security-admin/src/main/webapp/scripts/views/users/UserForm.js
@@ -87,7 +87,7 @@ define(function(require){
 					type		: 'PasswordFiled',
 					title		: localization.tt("lbl.newPassword") +' *',
 					validators  : ['required',
-					               {type:'regexp',regexp:/^.*(?=.{8,256})(?=.*\d)(?=.*[a-zA-Z]).*$/,message :' Invalid password'}],
+					               {type:'regexp',regexp:/^.*(?=.{8,256})(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).*$/,message :' Invalid password'}],
 					editorAttrs : {'oncopy':'return false;','autocomplete':'off'},
 					errorMsg    : localization.tt('validationMessages.passwordError')
 				},
@@ -95,7 +95,7 @@ define(function(require){
 					type		: 'PasswordFiled',
 					title		: localization.tt("lbl.passwordConfirm") +' *',
 					validators  : ['required',{type: 'match', field: 'password', message: 'Passwords must match !'},
-					               {type:'regexp',regexp:/^.*(?=.{8,256})(?=.*\d)(?=.*[a-zA-Z]).*$/,message :' Invalid password'}],
+					               {type:'regexp',regexp:/^.*(?=.{8,256})(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).*$/,message :' Invalid password'}],
 					editorAttrs : {'oncopy':'return false;','autocomplete':'off'},
 					errorMsg    : localization.tt('validationMessages.passwordError')
 				},