Wednesday, July 31, 2019

User Profile Emulation in PeopleSoft

We used to simulate the user issue in non prod by changing the password for respective username and login to replicate the issue.Its always a security concern and there is no track of it.

I have seen other ERP application does gives this emulate  as different user functionality without touching their security. But peoplesoft does not give such feature for user emulation.

i have created an Idea in oracle community to get this future in peopletools. hope this will be accommodated in future release. Please do vote .

https://community.oracle.com/ideas/23725

In the interim i came up with below idea.with this approach you do not need to change end user password and also it keeps the track of individual user who is emulating as other user.

So below blog will explain you on how you will emulate as different user.

1. Create new site called simulate in existing weblogic domain.

for example : 

Existing Site Name : PSDEV
New Site Name  : SIMULATE

2. Add below html in your original site signin.html. (PSDEV)


<a href="https://velu.peoplesoft.com/psp/simulate/?cmd=login">Impersonate User</a>

3. Add below html in your new site signin.html (SIMULATE)









<div>
               <span class="ps_label-show" id="ptLabelUserid"><label for="imuserid"><%=1333%></label></span>
             </div>
             <div class="ps_box-control">
               <input type="text" id="imuserid" name="imuserid" value="<%=IMUSERID%>" title="<%=1333%>">
           </div>

4. Open your FUNCLIB_LDAP record and goto LDAPAUTH field peoplecode.

Create new function called IMPERSONATE as below.









Function impersonate();
   &signonusername = %SignonUserId;
   &userName = %Request.GetParameter("IMUSERID");
   &ipaddress = %Request.GetHeader("X-FORWARDED-FOR");
   SQLExec("select roleuser from psroleuser where rolename='PeopleSoft Administrator' and roleuser=:1", &signonusername, &roleuser);
   If &userName = "" Then
      SetAuthenticationResult( True, Upper(&signonusername), "", False);
   Else
      If &roleuser = "" Or
            &userName = "PSADMIN" Or
            &userName = "PSAPPS" Or
            &userName = "PTWEBSERVER" Then
         SetAuthenticationResult( False, &userID, "You are not authorized to do Impersonation");
      Else
         SQLExec("INSERT INTO PS_IMPERSONATE VALUES (:1,:2,:3,:4)", &signonusername, &userName, &ipaddress, %Datetime);
         SetAuthenticationResult( True, Upper(&userName), "", False);
      End-If;
   End-If;
   
End-Function;

5. Create a new record with below field to keep a track of who is logging in.






Make sure you build the record

6.Add LDAP_AUTH peoplecode in signon peoplecode as below.










Bounce your app server by clearing cache.

Tetsing:

1. Open your exiting PIA. You will see a Hyperlink called Impersonate User.














2. Click on impersonate user. It will take you to your newly created SITE called simulate.

















Now provide your username/password and the username you want to login as.(in Impersonate user as)


















You can see it logged in as user id which you put in.















3.You can query the table select * from PS_IMPERSONATE to check if the values are captured. this will help you for audit purpose.

Points to note:

1. I have hardcoded Peoplesoft Administrator role in peoplcode. So if you any user want to use this functionality they should have Peoplesoft Administrator Role else it will throw below error.










2. Also you may need to use peoplesoft password to login , if you use LDAP password it may fail. I will update the post once i enhance my peoplecode to make it work with LDAP password

Peopletools 8.56.18
DB 12C


NOTE: I would recommend only to use it in NON-PROD .. never move this code to production .

I just did this as for learning purpose. Implement this on your sole responsibility.

Thursday, July 11, 2019

Weblogic Console password reset

I have tried so many ways and concluded that  We don’t have any procedure to override the existing console password. So, in this blog w

Monday, April 15, 2019

Find Menu Navigation in Peoplesoft

Below are few ways to find Menu Navigation

1. SQL to find Menu navigation.


SELECT A.PORTAL_LABEL || ' --> ' || B.PORTAL_LABEL || ' --> '  || C.PORTAL_LABEL || ' --> '  ||  D.PORTAL_LABEL Navigation FROM PSPRSMDEFN D, PSPRSMDEFN C, PSPRSMDEFN B
, PSPRSMDEFN A WHERE D.PORTAL_PRNTOBJNAME = C.PORTAL_OBJNAME AND C.PORTAL_PRNTOBJNAME = B.PORTAL_OBJNAME AND B.PORTAL_PRNTOBJNAME = A.PORTAL_OBJNAME AND D.PORTAL_NAME = C.PORTAL_NAME AND C.PORTAL_NAME = B.PORTAL_NAME AND B.PORTAL_NAME = A.PORTAL_NAME
AND D.PORTAL_URI_SEG2 = <provide Component name>;

2. Use enterprise component to find object navigation as below. Navigate Menu --> Enterprise Components --> Find Object Navigation..

Also you can refer below doc .

Sunday, April 14, 2019

PeopleSoft Fluid Approval Form Instruction Page -Rich Text Editor



In classic Approval page form builder we do see an option for Rich Text editing as below. But when you look at the fluid page RTE is not enabled . This is due to the limitation of FLUID page as it does not support RTE (E-FLUID : Is RTE(Rich Text Editor) Field Supported In Fluid Pages ? (Doc ID 2108005.1)

So as a workaround you can try to embed HTML tag as shown below in FLUID form builder instructions page.
 
i have simple html tag as shown below . It works well.



You can also try in HTML editor and simply copy paste with HTML tags.





Peoplesoft Downtime Notification in Header

  Often we recycle Non prod server or even prod server during business hours. ideally we send email to users but not all the time users will...