Maintenance Page with Backdoor Login

A standard requirement when doing PeopleSoft maintenance is to change the normal sign in page. When the system is offline, we often like to display a maintenance page that informs users that the system will be down and prevents them from logging in. This is done easily enough by changing the signin.html page, adding a message and removing the login form.

However, there is one more requirement that is a little tricky. Once the maintenance is complete, there are often tasks that need to be completed before handing the system back to the end users. These can be configuration changes, running batch processes or simply completing validation that everything was applied correctly and is in working order. How can the core team sign on to the system and complete these tasks, all while preventing end user access?

I recently came up with a bit of JavaScript that gave us a backdoor to the system during our last PeopleTools upgrade. What the script does is hide the login form on the sign in page, preventing login.  The trick was that our core team knew the key to the backdoor. After the sign in page would load, when they pressed Ctrl+Space the login form would be reveled. The combination of keys was only known to the team, so they were the only ones able to get in. Keep in mind if you had some crafty end users this could obviously be worked around, but it did the trick for us.

The JavaScript and HTML to accomplish this is listed below.  Adding the script and HTML changes to your signin.html page is pretty straight forward. First include the file containing the JavaScript, or write it inline. You then need to wrap your login form elements in a <div> with an id=loginbox. I would suggest starting before the <div> containing ptLabelUserid and ending after the <div> containing the submit button. Lastly, you need to add hideLogin(true); to the body onload attribute.

Keep in mind the key doesn’t have to be Ctrl+Space, it can be any key combination really.You will see in the comments of the script a link to information about other keycodes that can be used.

Updated: 10/11/2016
Instead of hard coding a true value for your hideLogin() parameter, why not use a Custom Property set in the Web Profile? You can create any Custom Property you would like, for example: login.isLoginHidden and set to true. Then reference the property in your signin.hmtl page like this: hideLogin("<%=login.isLoginHidden%>"). This will allow you to toggle the hide login functionality by updating the web profile and bouncing the server.

Click here to see a working demo. Enjoy!


6 thoughts on “Maintenance Page with Backdoor Login”

  1. Pingback: #5 – UMRUG 2015 Recap | psadmin.io

  2. Nice and thank you. Might use this. We current (as another option for anyone not wanting to allow any way in) is we install and additional PIA domain on a port number only open to our VPN. We can get in at anytime using that hostname and port number. To avoid editing the signin page we have our load balancer have a final failover service to go to when all others are down. Most LBs have this. This service is a simple apache install with mod_rewrite to rewrite any and all requests to index. That index page is a simple outage message with the date and time of the work.

    1. Matt – that sounds similar to solutions I’ve done in the past – a separate site/domain that only power users know about. But the issue we always ran into is that a separate domain runs on a different port or you can use a different site name. That causes issues with the report repository, etc. Do you have a solution for that, or does your VPN domain have limitations that users are aware of (eg, know that reports aren’t accessible)?

        1. Chris,

          I’m going to do an update to this post shortly that will explain how to accomplish this. Check back soon!

  3. Can you mail me the exact signin.html , am not able to get the above said functionality , when I add the above said code in signin.html, noting is happening as expected.

    Aravind

Leave a Reply to Kyle Benson Cancel reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax