Provides additional logging for PeopleSoft applications.
X-PS-APPSERVER
: Displays the appserver host with port (Enabled by default)X-PS-APPSTATUS
: Displays the appserver's status (running/stopped)X-PS-AUTHTOKEN
: Displays the authtoken of PIAX-PS-CLIENTIP
: Displays the client's ip address (Enabled by default)X-PS-COOKIE
: Displays all cookies associated with requestX-PS-MENU
: Displays the current menu being accessedX-PS-PWDDAYSLEFT
: Displays the user's remaining days before password expiresX-PS-ROLES
: Displays the client's PS rolesX-PS-SESSION-COOKIE
: Displays the session cookieX-PS-SESSION-COUNT
: Displays the current total open sessions to PIAX-PS-SITE
: Displays the PIA site nameX-PS-SRID
: Displays the SRID for the user's sessionX-PS-USERID
: Displays the client's user id (Enabled by default)
- Java 7
- BEA Library - You can normally find this library in your PIA install under
domain/applications/peoplesoft/lib/bea.jar
- PIA Common Library - You can normally find this library in your PIA install under
domain/applications/peoplesoft/pspc.war/WEB-INF/lib/piacommon.jar
- WebLogic Server Library API - You can normally find this library in your WLS install under
ORACLE_HOME/wlserver/server/lib/wls-api.jar
Note: BEA, PIA Common, and WLS API libs need to be copied to the libs folder of this project or it will not build properly.
git clone https://github.com/bloodmc/PortalServletFilter.git
In order to build PortalServletFilter you simply need to run the gradlew
command. On Windows systems you should run gradlew.bat
instead of ./gradlew
to invoke the Gradle wrapper. You can find the compiled JAR file in ./build/libs
named portalservlet-x.x.jar
.
- Copy the portalservlet-x.x.jar to your
domain/applications/peoplesoft/PORTAL.war/WEB-INF/lib
folder. - Edit
web.xml
underdomain/applications/peoplesoft/PORTAL.war/WEB-INF
to use the new filter. Here is an example of how it should look
<filter>
<filter-name>PortalServletFilter</filter-name>
<filter-class>com.peoplesoft.pt.custom.filter.PortalServletFilter</filter-class>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
<filter-name>PortalServletFilter</filter-name>
<url-pattern>/psp/*</url-pattern>
<url-pattern>/psc/*</url-pattern>
<url-pattern>/cs/*</url-pattern>
</filter-mapping>
- Login to your weblogic console
- Open
http://server:port/console
and login. - Go to
Environment > Servers > PIA > Logging > HTTP
. - Click
Lock & Edit
. - Select the checkbox for
HTTP access log file enabled
. - Save the changes.
- Expand the
Advanced
section. - Change the Format to Extended.
- Add each sc(HEADER) to the Extended Logging Format Fields. Replace
HEADER
with what you want to use. - (Optional) Set the Log File Buffer to 0 if you are debugging and need to see entries immediately.
- Save the changes.
- Click the
Release Configuration
button. - Restart the web server.
You can find the PortalServletFilter configuration in your PIA install under domain/piaconfig/properties/PortalServletFilter.properties
.
This config allows you to customize what headers you wanted added to responses. After making changes, you will need to restart the PIA server.
All headers are added to the client response. If you do NOT want these headers to appear on client side then you will have to strip them. If you are using a load balancer, here is how you can strip them from the response :
- Create a Content Rule with type
Delete Header
and set the pattern to/X-PS.*/
- HAProxy (credit to coryfazzini for this one)
- Add the following to your frontend or backend section haproxy.cfg :
rspidel ^X-PS-.*