FINERACT-2081: Update password policy
This commit is contained in:
committed by
Arnold Gálovics
parent
975a176610
commit
832b84f574
@@ -170,4 +170,5 @@
|
||||
<include file="parts/0149_update_global_configuration_names.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/0150_transaction_summary_with_asset_owner_report_interest_waiver_interest_refund_added.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/0151_interest_refund_business_events.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/0152_update_password_validation_policy.xml" relativeToChangelogFile="true" />
|
||||
</databaseChangeLog>
|
||||
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
|
||||
<changeSet author="fineract" id="1" context="mysql">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">
|
||||
SELECT COUNT(*) FROM m_password_validation_policy WHERE `key` = 'strong'
|
||||
</sqlCheck>
|
||||
</preConditions>
|
||||
|
||||
<insert tableName="m_password_validation_policy">
|
||||
<column name="regex" value="^(?!.*(.)\1)(?!.*\s)(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^\w\s]).{12,50}$"/>
|
||||
<column name="description" value="Password must be 12 to 50 characters long, containing at least one uppercase letter, one lowercase letter, one numeric digit, and one special character, with no spaces or consecutive repeating characters"/>
|
||||
<column name="active" valueBoolean="false"/>
|
||||
<column name="key" value="strong"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
<changeSet author="fineract" id="1" context="postgresql">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">
|
||||
SELECT COUNT(*) FROM m_password_validation_policy WHERE key = 'strong'
|
||||
</sqlCheck>
|
||||
</preConditions>
|
||||
|
||||
<insert tableName="m_password_validation_policy">
|
||||
<column name="regex" value="^(?!.*(.)\1)(?!.*\s)(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^\w\s]).{12,50}$"/>
|
||||
<column name="description" value="Password must be 12 to 50 characters long, containing at least one uppercase letter, one lowercase letter, one numeric digit, and one special character, with no spaces or consecutive repeating characters"/>
|
||||
<column name="active" valueBoolean="false"/>
|
||||
<column name="key" value="strong"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="2" context="mysql">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<and>
|
||||
<sqlCheck expectedResult="1">
|
||||
SELECT COUNT(*) FROM m_password_validation_policy WHERE `key` = 'simple' AND active = 1;
|
||||
</sqlCheck>
|
||||
<sqlCheck expectedResult="0">
|
||||
SELECT COUNT(*) FROM m_password_validation_policy WHERE `key` = 'strong' AND active = 1;
|
||||
</sqlCheck>
|
||||
</and>
|
||||
</preConditions>
|
||||
|
||||
<update tableName="m_password_validation_policy">
|
||||
<column name="active" valueBoolean="false"/>
|
||||
<where>`key` = 'simple' AND active = true</where>
|
||||
</update>
|
||||
<update tableName="m_password_validation_policy">
|
||||
<column name="active" valueBoolean="true"/>
|
||||
<where>`key` = 'strong' AND active = false</where>
|
||||
</update>
|
||||
</changeSet>
|
||||
<changeSet author="fineract" id="2" context="postgresql">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<and>
|
||||
<sqlCheck expectedResult="1">
|
||||
SELECT COUNT(*) FROM m_password_validation_policy WHERE key = 'simple' AND active = TRUE;
|
||||
</sqlCheck>
|
||||
<sqlCheck expectedResult="0">
|
||||
SELECT COUNT(*) FROM m_password_validation_policy WHERE key = 'strong' AND active = TRUE;
|
||||
</sqlCheck>
|
||||
</and>
|
||||
</preConditions>
|
||||
|
||||
<update tableName="m_password_validation_policy">
|
||||
<column name="active" valueBoolean="false"/>
|
||||
<where>key = 'simple' AND active = TRUE</where>
|
||||
</update>
|
||||
<update tableName="m_password_validation_policy">
|
||||
<column name="active" valueBoolean="true"/>
|
||||
<where>key = 'strong' AND active = FALSE</where>
|
||||
</update>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user