Re: New Password Validations in Jetspeed 2.3.0

DavidSeanTaylor <[email protected]> Tue, 5 Dec 2017 09:15:29 -0800
Newsgroups gmane.comp.jakarta.jetspeed.devel
Message-ID <[email protected]>
--Apple-Mail=_23D0AD7C-4182-4B80-9265-9D27E130EB27
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Try dropping the attached file into WEB-INF/assembly/override/ and =
restarting your server


> On Dec 5, 2017, at 6:45 AM, Dnyaneshwar Dabhade =
<[email protected]> wrote:
>=20
> Team,
> =20
> I want to set password rules on below Jetspeed screen as below.
> =20
> 8 Character Minimum, 1 Upper Case, 1 Lower Case and 1 Digit.
> =20
>=20
> =20
> Does anyone know what configurations required to make it work? I am =
using Jetspeed 2.3.0.
> =20
> =20
> Thanks
> Dnyaneshwar
> =20
> CONFIDENTIALITY NOTICE: THE CONTENTS OF THIS EMAIL MESSAGE AND ANY =
ATTACHMENTS ARE INTENDED SOLELY FOR THE ADDRESSEE(S) AND MAY CONTAIN =
CONFIDENTIAL AND/OR PRIVILEGED INFORMATION AND MAY BE LEGALLY PROTECTED =
FROM DISCLOSURE. IF YOU ARE NOT THE INTENDED RECIPIENT OF THIS MESSAGE =
OR THEIR AGENT, OR IF THIS MESSAGE HAS BEEN ADDRESSED TO YOU IN ERROR, =
PLEASE IMMEDIATELY ALERT THE SENDER BY REPLY EMAIL AND THEN DELETE THIS =
MESSAGE AND ANY ATTACHMENTS. IF YOU ARE NOT THE INTENDED RECIPIENT, YOU =
ARE HEREBY NOTIFIED THAT ANY USE, DISSEMINATION, COPYING, OR STORAGE OF =
THIS MESSAGE OR ITS ATTACHMENTS IS STRICTLY PROHIBITED.


--Apple-Mail=_23D0AD7C-4182-4B80-9265-9D27E130EB27
Content-Type: multipart/mixed;
	boundary="Apple-Mail=_30913567-6602-4618-AF92-2FA9A1F9EDC3"


--Apple-Mail=_30913567-6602-4618-AF92-2FA9A1F9EDC3
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Try dropping the attached file into WEB-INF/assembly/override/ and restarting your server<div class=""><br class=""><div class=""></div></div></body></html>
--Apple-Mail=_30913567-6602-4618-AF92-2FA9A1F9EDC3
Content-Disposition: attachment;
	filename=password-overrides.xml
Content-Type: application/xml;
	name="password-overrides.xml"
Content-Transfer-Encoding: 7bit

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">

  <bean id="org.apache.jetspeed.security.spi.CredentialPasswordValidator" name="org.apache.jetspeed.security.CredentialPasswordValidator"
    class="org.apache.jetspeed.security.spi.impl.DefaultCredentialPasswordValidator">
    <meta key="j2:cat" value="default or security" />

    <!-- UNCOMMENT TO TURN ON Regex-based password validation. The pattern below gives: 
      * Must be at least 6 characters
      * Must contain at least one one lower case letter, one upper case letter, one digit and one special character
      * Valid special characters are @#$%^&+=
      -->
      <constructor-arg index="0"><value><![CDATA[^.*(?=.{6,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=]).*$]]></value></constructor-arg>       
  </bean>

  <bean id="loginValidationValve"
      class="org.apache.jetspeed.security.impl.LoginValidationValveImpl"
      init-method="initialize">
  <!-- maxNumberOfAuthenticationFailures
       This value should be in sync with the value for
       org.apache.jetspeed.security.spi.impl.MaxPasswordAuthenticationFailuresInterceptor
       (if used) to make sense.
       Any value < 2 will suppress the LoginConststants.ERROR_FINAL_LOGIN_ATTEMPT
       error code when only one last attempt is possible before the credential
       will be disabled after the next authentication failure.
  -->
  <constructor-arg index="0"><value>3</value></constructor-arg>  
</bean>

  <bean id="org.apache.jetspeed.security.spi.impl.UserPasswordCredentialPolicyManagerImpl"
    class="org.apache.jetspeed.security.spi.impl.UserPasswordCredentialPolicyManagerImpl">
    <meta key="j2:cat" value="default or security" />
    <constructor-arg index="0" ref="org.apache.jetspeed.security.CredentialPasswordEncoder" />
    <constructor-arg index="1" ref="org.apache.jetspeed.security.CredentialPasswordValidator" />
    <constructor-arg index="2">
      <list>
        <!-- enforce an invalid preset password value in the persisent store is required to be changed -->
        <bean class="org.apache.jetspeed.security.spi.impl.ValidatePasswordOnLoadInterceptor" />
        <!-- ensure preset cleartext passwords in the persistent store  will be encoded on first use -->
        <bean class="org.apache.jetspeed.security.spi.impl.EncodePasswordOnFirstLoadInterceptor" />

        <bean class="org.apache.jetspeed.security.spi.impl.MaxPasswordAuthenticationFailuresInterceptor">
            <constructor-arg index="0"><value>3</value></constructor-arg>
        </bean>
        <!-- set value in days for password expiration interceptor -->
        <bean class="org.apache.jetspeed.security.spi.impl.PasswordExpirationInterceptor">
            <constructor-arg index="0"><value>30</value></constructor-arg>
        </bean>
        <bean class="org.apache.jetspeed.security.spi.impl.PasswordHistoryInterceptor">
             <constructor-arg index="0"><value>3</value></constructor-arg>       
           </bean>
      </list>
    </constructor-arg>
  </bean>

  <bean class="org.apache.jetspeed.security.spi.impl.MaxPasswordAuthenticationFailuresInterceptor">
    <constructor-arg index="0"><value>3</value></constructor-arg>
  </bean>

  <!-- set value in days for password expiration interceptor -->
  <bean class="org.apache.jetspeed.security.spi.impl.PasswordExpirationInterceptor">
    <constructor-arg index="0"><value>30</value></constructor-arg>
  </bean>

  <bean id="passwordCredentialValve"
        class="org.apache.jetspeed.security.impl.PasswordCredentialValveImpl"
        init-method="initialize">
   <constructor-arg>
     <!-- expirationWarningDays -->
     <list>
       <value>2</value>
       <value>3</value>
       <value>7</value>
     </list>
   </constructor-arg>
  </bean> 


</beans>


--Apple-Mail=_30913567-6602-4618-AF92-2FA9A1F9EDC3
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D""><div class=3D""><div class=3D""><br class=3D""><div =
class=3D""><div><blockquote type=3D"cite" class=3D""><div class=3D"">On =
Dec 5, 2017, at 6:45 AM, Dnyaneshwar Dabhade &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div =
class=3D"WordSection1" style=3D"page: WordSection1; font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: normal; letter-spacing: normal; orphans: auto; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: =
0px;"><div style=3D"margin: 0in 0in 0.0001pt; font-size: 11pt; =
font-family: Calibri, sans-serif;" class=3D"">Team,<o:p =
class=3D""></o:p></div><div style=3D"margin: 0in 0in 0.0001pt; =
font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><o:p =
class=3D"">&nbsp;</o:p></div><div style=3D"margin: 0in 0in 0.0001pt; =
font-size: 11pt; font-family: Calibri, sans-serif;" class=3D"">I want to =
set password rules on below Jetspeed screen as below.<o:p =
class=3D""></o:p></div><div style=3D"margin: 0in 0in 0.0001pt; =
font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><o:p =
class=3D"">&nbsp;</o:p></div><div style=3D"margin: 0in 0in 0.0001pt; =
font-size: 12pt; font-family: 'Times New Roman', serif;" class=3D""><span =
style=3D"font-size: 11pt; font-family: Calibri, sans-serif; color: =
rgb(31, 73, 125);" class=3D"">8 Character Minimum, 1 Upper Case, 1 Lower =
Case and 1 Digit.</span><span style=3D"" class=3D""><o:p =
class=3D""></o:p></span></div><div style=3D"margin: 0in 0in 0.0001pt; =
font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><o:p =
class=3D"">&nbsp;</o:p></div><div style=3D"margin: 0in 0in 0.0001pt; =
font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><object =
width=3D"357" height=3D"136" id=3D"Picture_x0020_1" class=3D"" =
data=3D"cid:[email protected]" =
type=3D"application/x-apple-msg-attachment"></object><o:p =
class=3D""></o:p></div><div style=3D"margin: 0in 0in 0.0001pt; =
font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><o:p =
class=3D"">&nbsp;</o:p></div><div style=3D"margin: 0in 0in 0.0001pt; =
font-size: 11pt; font-family: Calibri, sans-serif;" class=3D"">Does =
anyone know what configurations required to make it work? I am using =
Jetspeed 2.3.0.<o:p class=3D""></o:p></div><div style=3D"margin: 0in 0in =
0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" =
class=3D""><o:p class=3D"">&nbsp;</o:p></div><div style=3D"margin: 0in =
0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" =
class=3D""><o:p class=3D"">&nbsp;</o:p></div><div style=3D"margin: 0in =
0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" =
class=3D"">Thanks<o:p class=3D""></o:p></div><div style=3D"margin: 0in =
0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" =
class=3D"">Dnyaneshwar<o:p class=3D""></o:p></div><div style=3D"margin: =
0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" =
class=3D""><o:p class=3D"">&nbsp;</o:p></div></div><span =
style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
orphans: auto; text-align: start; text-indent: 0px; text-transform: =
none; white-space: normal; widows: auto; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; float: none; display: inline =
!important;" class=3D"">CONFIDENTIALITY NOTICE: THE CONTENTS OF THIS =
EMAIL MESSAGE AND ANY ATTACHMENTS ARE INTENDED SOLELY FOR THE =
ADDRESSEE(S) AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED INFORMATION =
AND MAY BE LEGALLY PROTECTED FROM DISCLOSURE. IF YOU ARE NOT THE =
INTENDED RECIPIENT OF THIS MESSAGE OR THEIR AGENT, OR IF THIS MESSAGE =
HAS BEEN ADDRESSED TO YOU IN ERROR, PLEASE IMMEDIATELY ALERT THE SENDER =
BY REPLY EMAIL AND THEN DELETE THIS MESSAGE AND ANY ATTACHMENTS. IF YOU =
ARE NOT THE INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY USE, =
DISSEMINATION, COPYING, OR STORAGE OF THIS MESSAGE OR ITS ATTACHMENTS IS =
STRICTLY PROHIBITED.</span></div></blockquote></div><br =
class=3D""></div></div></div></body></html>=

--Apple-Mail=_30913567-6602-4618-AF92-2FA9A1F9EDC3--

--Apple-Mail=_23D0AD7C-4182-4B80-9265-9D27E130EB27--