AKS_Cover

Implement SignOn Password Custom Profile

How to Implement Signon Password Custom Profile Option in R12.2.X.

Reference DOC: How to Implement Signon Password Custom Profile Option in EBS 11i / R12 (Doc ID 362663.1)
How to Implement Signon Password Custom Profile Option in EBS 11i / R12
KB253549

 

cd /apps/prod/PROD/fs2/EBSapps/comn/java/classes/oracle/apps/fnd/security/AppsPasswordValidationCUS.java

vi AppsPasswordValidationCUS and copy below text in it.

My Custom java class is provided below.

// Disclaimer:
// This sample is provided for educational purposes only. It is NOT supported
// by Oracle World Wide Technical Support. The sample has been tested and
// appears to work as intended. However, you should always test in YOUR
// environment before relying on it.
//
// Source File Name: AppsPasswordValidationCUS.java
//

package oracle.apps.fnd.security;

import oracle.apps.fnd.common.VersionInfo;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

// Referenced classes of package oracle.apps.fnd.security:
// PasswordValidation

public class AppsPasswordValidationCUS
implements PasswordValidation
{

public String getErrorStackApplicationName()
{
return “FND”;
}

public String getErrorStackMessageName()
{
return m_errorStackMessageName;
}

public boolean validate(String username, String password)
{
if(password ==null || password.length() == 0 || username == null || username.length() == 0)
{
m_errorStackMessageName = “PASSWORD-INVALID”;
return false;
}
if(password.length() < 6)
{
m_errorStackMessageName = “PASSWORD-INVALID-LENGTH”;
return false;
}
if(!validateLettersAndDigits(password))
{
m_errorStackMessageName = “PASSWORD-INVALID-LETTER-NUMBER”;
return false;
}
if(!validateNoUsername(username, password))
{
m_errorStackMessageName = “PASSWORD-INVALID-USERNAME”;
return false;
}
if(!validateNoRepeats(password))
{
m_errorStackMessageName = “PASSWORD-INVALID-REPEATS”;
return false;
}
// Validation for Special Characters
if(!SpecialChars(password)) {
m_errorStackMessageName = “PASSWORD-INVALID-CUX”;
return false;
}

if(!validateUpperCase(password)) {
m_errorStackMessageName = “PASSWORD-INVALID-UPPERCASE”;
return false;
}

if(!validateLowerCase(password)) {
m_errorStackMessageName = “PASSWORD-INVALID-LOWERCASE”;
return false;
}

return true;
}

// Validation for Special Characters
private boolean SpecialChars(String p_password){
Pattern p = Pattern.compile(“[^a-zA-Z0-9\\s]”);
Matcher m = p.matcher(p_password);
if (m.find()){
return true; // Special Character Found
}else
return false;
}

// check UpperCase
private boolean validateUpperCase(String p_password){
for (int i = 0; i < p_password.length(); i++) {
//if the character is a letter
if (Character.isLetter(p_password.charAt(i))) {
//if any character is not in upper case, return false
if (Character.isUpperCase(p_password.charAt(i)))
return true;
}
}
return false;
}

// check LowerCase
private boolean validateLowerCase(String p_password){
for (int i = 0; i < p_password.length(); i++) {
//if the character is a letter
if (Character.isLetter(p_password.charAt(i))) {
//if any character is not in upper case, return false
if (Character.isLowerCase(p_password.charAt(i)))
return true;
}
}
return false;
}

private boolean validateLettersAndDigits(String p_password)
{
boolean flag = false;
boolean flag1 = false;
for(int i = 0; i < p_password.length(); i++)
{
if(Character.isLetter(p_password.charAt(i)))
flag = true;
if(Character.isDigit(p_password.charAt(i)))
flag1 = true;
}

return flag && flag1;
}

private boolean validateNoUsername(String p_username, String p_password)
{
return p_password.toUpperCase().indexOf(p_username.toUpperCase()) == -1;
}

private boolean validateNoRepeats(String p_password)
{
for(int i = 1; i < p_password.length(); i++)
if(p_password.charAt(i) == p_password.charAt(i – 1))
return false;

return true;
}

private String m_errorStackMessageName;

}

Note: You may need to put the AppsPasswordValidationCUS file in the Middle tier code tree under any directory under $JAVA_TOP/oracle/apps/fnd/security sub directory)
1 . Source application env
cd /u01/oracle/PROD
. ./EBSapps.env run

2. Run the loadjava command from the database tier:
loadjava -user apps/apps -verbose -resolve -force AppsPasswordValidationCUS.java

3. You can execute the following select after running the loadjava command to verify that load was successful and class is valid.
Just a check to confirm all went ok.
SELECT dbms_java.longname(object_name), status
FROM user_objects
WHERE object_type = ‘JAVA CLASS’
AND dbms_java.longname(object_name) like ‘%AppsPasswordValidationCUS’;
4. Update profile option (Signon Password Custom) for (Site) level to be:

oracle.apps.fnd.security.AppsPasswordValidationCUS
5. Make sure profile Signon Password Hard to Guess is blank.

Customize your error message:
1. Go to ‘Application Developer’ > Application > Messages
Create Below messages:
Create a new message to store ‘PASSWORD-INVALID-CUX’ with message of ‘Password should contain at least one digit, one lower character, one upper character and one special character!’
Create a new message to store ‘PASSWORD-INVALID-UPPERCASE’ with message of ‘One Letter Must Be in Upper Case’ !
Create a new message to store ‘PASSWORD-INVALID-LOWERCASE’ with message of ‘One Letter Must Be in Lower Case’ !

4. From the System Administrator responsibility, submit the concurrent program ‘Generate Messages’ (FNDMDGEN) and confirm the request completes successfully

 

    About Abdul Khalique Siddique

    In addition to my proficiency in Oracle Database, I have also specialized in Oracle E-Business Suite. I have hands-on experience in implementing, configuring, and maintaining EBS applications, enabling organizations to streamline their business processes and achieve operational efficiency. Also I have hands-on experience in Oracle Cloud Infrastructure (OCI). I have worked with OCI services such as compute, storage, networking, and database offerings, leveraging the power of the cloud to deliver scalable and cost-effective solutions. My knowledge of OCI architecture and deployment models allows me to design and implement robust and secure cloud environments for various business requirements. Furthermore, I have specialized in disaster recovery solutions for Oracle technologies. I have designed and implemented comprehensive disaster recovery strategies, including backup and recovery procedures, standby databases, and high availability configurations. My expertise in data replication, failover mechanisms, and business continuity planning ensures that organizations can quickly recover from disruptions and maintain uninterrupted operations.

    Check Also

    AKS_Cover

    Oracle EBS Advanced Row Compression

    Oracle E-Business Suite Release 12.2 with Oracle Database 12c Release 1 Advanced Row Compression (KB443050). …

    Leave a Reply