Bug 727481 - [webadmin] F5 (refresh) goes back to login screen
Summary: [webadmin] F5 (refresh) goes back to login screen
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-webadmin
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: m2
: 3.1
Assignee: Asaf Shakarchi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-02 09:09 UTC by Einav Cohen
Modified: 2012-08-09 08:03 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-09 08:02:01 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description Einav Cohen 2011-08-02 09:09:30 UTC
Description of problem:
F5 (refresh) goes back to login screen. It should remain in the main screen in case the session is still valid, and return to login screen if session has expired.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Vojtech Szocs 2011-08-02 15:18:45 UTC
Steps to reproduce:
1. access WebAdmin host page, app redirects to #login default place (anonymous user)
2. enter username/password, click Login button, app redirects to #vms default place (logged-in user)
3. press F5 (refresh)

Reloading the page via F5 causes the entire application to reload: WebAdmin host page will be requested, JavaScript code will be executed, etc.

Since the user was previously on #vms place, and this place is protected (only accessible to logged-in users), and the application code got reloaded, application thinks the user is not logged in yet, and redirects the user to #login default place for anonymous users [ApplicationPlaceManager.revealUnauthorizedPlace method]. Note: in general, F5 shouldn't be used for single-page web apps.

Proposed solution (F5 workaround):
- when the browser requests WebAdmin host page, we already know if the user is logged-in or not (a user session exists or not)
- we can embed this information inside WebAdmin host page (host page needs to be rendered dynamically though, can't be plain HTML)
- WebAdmin application code will retrieve this information, and if the user is logged in, will redirect to main (logged-in) section

In order to be able to fully support F5 (reload the app and redirect to the exact same place the user was before), we need to integrate the proposed functionality described above, into LoggedInGatekeeper.

Comment 2 Vojtech Szocs 2011-08-02 15:24:10 UTC
The idea behind using a dynamic host page to inject authentication information is described in the following article.

Using a Dynamic Host Page for Authentication and Initialization [http://code.google.com/webtoolkit/articles/dynamic_host_page.html]

Comment 3 Itamar Heim 2012-08-09 08:02:01 UTC
closing ON_QA bugs as oVirt 3.1 was released:
http://www.ovirt.org/get-ovirt/

Comment 4 Itamar Heim 2012-08-09 08:03:26 UTC
closing ON_QA bugs as oVirt 3.1 was released:
http://www.ovirt.org/get-ovirt/


Note You need to log in before you can comment on or make changes to this bug.