Appboard/old/login and urls: Difference between revisions

imported>Cmace
(copied from internalwiki)
 
imported>Cmace
(copied from internal)
Line 68: Line 68:
Because this URL exposes the password of the User, it is not recommended for use in accessing a production system.
Because this URL exposes the password of the User, it is not recommended for use in accessing a production system.


====Directly Accessing an AppBoard Stack====
Perform the following steps to form a URL to directly access a particular stack within AppBoard:
As noted above, the general form of the URL is:
<tt><nowiki>https://hostname.com/enportal/servlet/pd?</nowiki></tt>
with the following URL parameters:
*redirect=
*login
*domainSelect=
*userid=
*password=
Also, the AppBoard URL for accessing a specific stack is formed like this:
/enportal/visualizer/Appboard_Viewer.html#onlyStackIds=8242G9Y0-3894-5E23-9007-6D962CF78E9B;stacksControl=Button
In this example, the ID (8242G9Y0-3894-5E23-9007-6D962CF78E9B) can be found in the <tt>[AppBoard_Home]/server/webapps/enportal/WEB-INF/xmlroot/appboard/config/stacks.xml</tt> file for the stack you are trying to show.  It would be something like this:
<obj className="appboard.config.Stack" id="<b>8242G9Y0-3894-5E23-9007-6D962CF78E9B</b>">
<attribute name="title" value="An Example Stack">
So, this direct access URL would be used in the '''redirect'''= parameter in the URL at the top, but since it needs to be passed in as a whole string and not parsed in the first pass, you need to URL encode it to protect special characters like / and ? and #.  This can be done using a web utility site, such as:  http://meyerweb.com/eric/tools/dencoder/
When you put the specific stack URL into that page and encode it, you get:
%2Fenportal%2Fvisualizer%2FAppboard_Viewer.html%23onlyStackIds%3D8242G9Y0-3894-5E23-9007-6D962CF78E9B%3BstacksControl%3DButton
And then you put that into the full URL from the top to form this:
https://hostname.com/enportal/servlet/pd?redirect=%2Fenportal%2Fvisualizer%2FAppboard_Viewer.html%23onlyStackIds%3D8242G9Y0-3894-5E23-9007-6D962CF78E9B%3BstacksControl%3DButton&login&domainSelect=System&userid=administrator&password=administrator
This would log you in as administrator/administrator/System and go to the stack with that ID.


====Resuming Expired AppBoard Sessions====
====Resuming Expired AppBoard Sessions====

Revision as of 16:35, 19 July 2012

This page details the various elements related to accessing and logging in to AppBoard/enPortal.


Login Page

After submitting an AppBoard or enPortal URL in a web broswer for the first time, the User will encounter a Login page. The User must enter a User Name, Password, and Domain provided to them by the system administrator.


Template-tip.png
If all Users in a system will be in the same Domain, the Login page can be simplified by modifying the page to hide the Domain field and auto-submit the Domain value.


Upon initial installation of the system, the administrator can log in with the following credentials:


  • User Name: administrator
  • Password: administrator
  • Domain: System


The system will check for the entered values in its user database (or external LDAP repository, if configured to do so). If the User has valid credentials, they will be taken to the appropriate landing page inside the system, which will depend on which URL was used to access the system (see URLs section below).


Template-note.png
All values entered on the login page are case-sensitive.


System Login Page

After installation, a default system login page is used. You can replace the system login page with a custom page built to match the desired branding of your organization.


Perform the following steps to create and implement a custom system login page:


  1. Locate the standard system login page in [INSTALL_HOME]/server/webapps/enportal/login_pages/login.jsp
  2. Create a new folder "MyLoginPage" under [INSTALL_HOME]/server/webapps/enportal/login_pages
  3. Copy the default login.jsp page into the new folder.
  4. Modify the login page in your custom folder to match the branding and requirements of your organization.
  5. Set the new system login page in the admin GUI:
    1. Log in to enPortal as an administrator.
    2. Mouse over the Advanced tab and click Explore System. The Explorer panel is displayed.
    3. Right-click on the Explorer folder, and select System Login Page.
    4. In the box, type the new login page path and filename, relative to the /enportal/login_pages/ directory. Example: MyLoginPage/login.jsp
    5. Click Save.
    6. Log out and observe the login page to validate that it is the new custom page.


You can also customize login pages to be different for each Domain. A user would see the default login page on first login, but subsequent logins would use a cookie which stores the last Domain accessed for determining the appropriate login page.

Bypassing the Login Page

There are some special cases where a User can log in without going through the system Login page:


Direct Login Using URL Parameters

For development or testing purposes, it may be desirable to create a URL that contains the login credentials. This enables the User to login without going through a login page. The following sample URLs can be used for this purpose:


  • enPortal:
http://localhost:8080/enportal/home?login&userid=administrator&password=administrator&domainSelect=System
  • AppBoard:
http://localhost:8080/enportal/ab/home?login&userid=administrator&password=administrator&domainSelect=System


Because this URL exposes the password of the User, it is not recommended for use in accessing a production system.


Directly Accessing an AppBoard Stack

Perform the following steps to form a URL to directly access a particular stack within AppBoard:


As noted above, the general form of the URL is:

https://hostname.com/enportal/servlet/pd?

with the following URL parameters:

  • redirect=
  • login
  • domainSelect=
  • userid=
  • password=


Also, the AppBoard URL for accessing a specific stack is formed like this:

/enportal/visualizer/Appboard_Viewer.html#onlyStackIds=8242G9Y0-3894-5E23-9007-6D962CF78E9B;stacksControl=Button


In this example, the ID (8242G9Y0-3894-5E23-9007-6D962CF78E9B) can be found in the [AppBoard_Home]/server/webapps/enportal/WEB-INF/xmlroot/appboard/config/stacks.xml file for the stack you are trying to show. It would be something like this:

<obj className="appboard.config.Stack" id="8242G9Y0-3894-5E23-9007-6D962CF78E9B">
<attribute name="title" value="An Example Stack">


So, this direct access URL would be used in the redirect= parameter in the URL at the top, but since it needs to be passed in as a whole string and not parsed in the first pass, you need to URL encode it to protect special characters like / and ? and #. This can be done using a web utility site, such as: http://meyerweb.com/eric/tools/dencoder/


When you put the specific stack URL into that page and encode it, you get:

%2Fenportal%2Fvisualizer%2FAppboard_Viewer.html%23onlyStackIds%3D8242G9Y0-3894-5E23-9007-6D962CF78E9B%3BstacksControl%3DButton


And then you put that into the full URL from the top to form this:

https://hostname.com/enportal/servlet/pd?redirect=%2Fenportal%2Fvisualizer%2FAppboard_Viewer.html%23onlyStackIds%3D8242G9Y0-3894-5E23-9007-6D962CF78E9B%3BstacksControl%3DButton&login&domainSelect=System&userid=administrator&password=administrator


This would log you in as administrator/administrator/System and go to the stack with that ID.

Resuming Expired AppBoard Sessions

If a User's session expires in an AppBoard view, the user can resume the session without going to the Login page (and forcing a reload of the Flash plugin). The system will provide a login window with the User Name and Domain filled in. The User can simply enter the password and click Login to log in and resume the previous session.

URLs

The following table summarizes the primary URLs that are available for accessing AppBoard/enPortal:


AppBoard/enPortal URLs
Component
URL*
Description
AppBoard http://localhost:8080/enportal/ab/home If the User's default role is portalAdministration, this will launch the AppBoard Builder. Otherwise, this will launch the AppBoard Viewer.
AppBoard Builder http://localhost:8080/enportal/ab/home?builder If user 's Role is portalAdministration, this will launch the AppBoard Builder. Otherwise, this will launch the AppBoard Viewer.
AppBoard Builder (Debug mode**) http://localhost:8080/enportal/ab/home?debug=true If user 's Role is portalAdministration, this will launch the AppBoard Builder in debug mode. Otherwise, this will launch the AppBoard Viewer.
AppBoard Viewer http://localhost:8080/enportal/ab/home?viewer Launches the AppBoard Viewer. (A non-administrator User will also access the AppBoard Viewer by going to the Home URL or AppBoard URL)
AppBoard Viewer (Debug Mode**) http://localhost:8080/enportal/ab/home?viewer&debug=true Launches the AppBoard Viewer in debug mode.
enPortal http://localhost:8080/enportal/home Launches enPortal
Home URL http://localhost:8080/ Launches either AppBoard or enPortal, depending on the Home URL configuration (see "Home URL" section below)


* The URLs in the above table assume that the server name is "localhost" and the system is running on the default port of 8080.
** Using debug mode requires installing a debug version of Flash player.


Home URL

The Home URL is used to determine what URL to send a User to when a full path is not provided in the URL, or in cases such as when a User switches to a different Role. There are two main home URLs:


  • enPortal: /enportal/home
  • AppBoard: /enportal/ab/home


The choice of which is accessed by default for a particular system is configured in the following files:


  • enPortal: /server/webapps/enportal/WEB-INF/config/config.properties
    • dispatch.loginredirect=/enportal/home
  • AppBoard: /server/webapps/enportal/WEB-INF/config/appboard.properties
    • dispatch.loginredirect=/enportal/ab/home


If there are values in both of the above files, the one in appboard.properties will take precedence and be used.

Determining Roles

Every User has a default Role. Some Users can have multiple Roles assigned to them. Such Users will have a Role chooser displayed in the banner of AppBoard or enPortal. When a User logs in to AppBoard/enPortal, they will be presented the appropriate landing page and content associated with their default Role. If a User has multiple Roles, he can switch to a different Role at any time using the Role chooser.


The system performs the following steps when a User switches Roles:


  1. Logs the User out of the system.
  2. Logs the User in to the system under the new Role.
  3. Takes the User to the Home URL of the system (this may vary depending on whether the User is an administrator).