Page MenuHomeIn-Portal Phabricator

INP-1904 - Support opening an Admin Console from a Site Domain
Needs ReviewPublic

Authored by alex on Wed, Mar 12, 8:33 AM.

Details

Reviewers
erik
Test Plan
IMPORTANT: Replace test.domain.com with the domain you're using during test execution.

Preconditions

  1. used domains:
    • test.domain.com - base domain for testing
    • sd1.test.domain.com - domain, where 1st site domain could be accessed

Preparations

  • in any editor:
    1. open the OS-specific hosts file (the C:\Windows\System32\drivers\etc\hosts on Windows; the /etc/hosts on macOS/Linux) for editing as Administrator
    2. add entries for each of the above-shown domains in there (e.g. if you have aaa.bbb.ccc.ddd test.domain.com entry, then add aaa.bbb.ccc.ddd sd1.test.domain.com entry and so on)
    3. save changes
  • in IDE:
    1. open themes/default/index.tpl template for editing
      1. add <inp2:m_CheckSSL mode="required" condition="Require_SSL" /> code on a new line after the 1st HTML comment
      2. add the [Site Domain ID: <inp2:site-domain.current_Field name="DomainId"/>]<br/><script> document.write('[URL: ' + window.location.href + ']<br/><br/>');</script> line above the <inp2:st_ContentBlock num="1"/> line
      3. save changes
    2. open themes/advanced/index.tpl template for editing
      1. add <inp2:m_CheckSSL mode="required" condition="Require_SSL" /> code on a new line after the 1st HTML comment
      2. add the [Site Domain ID: <inp2:site-domain.current_Field name="DomainId"/>]<br/><script> document.write('[URL: ' + window.location.href + ']<br/><br/>');</script> line above the <inp2:st_ContentBlock num="1"/> line
      3. save changes
    3. open core/admin_templates/incs/form_blocks.tpl template for editing
      1. add the [SD ID: <inp2:site-domain.current_Field name="DomainId"/>] code in the <span class="tablenav_link" id="blue_bar">...</span> element
      2. save changes
  • in the Admin Console:
    1. login to the Admin Console by accessing it on the test.domain.com domain over http:// protocol
    2. go to the ConfigurationWebsiteAdvanced section
    3. uncheck these system settings:
      • Require SSL for login & checkout
      • Require SSL for Administrative Console
      • Redirect to HTTP when SSL is not required
    4. set SSL Domain (www.domain.com) system setting to the test.domain.com
    5. clear the SSL Domain for Administrative Console (www.domain.com) system setting
    6. Session Cookie Domains (single domain per line) system setting to this value (multi-line):
test.domain.com
sd1.test.domain.com
  1. save changes
  2. go to the ConfigurationWebsiteThemes section
  3. enable the default theme
  4. go to the ConfigurationWebsiteSite Domains section
  5. add 1st site domain with:
    • (fixed) Domain Name=sd1.test.domain.com
    • (fixed) SSL Domain Name=sd1.test.domain.com
    • Theme=default
  6. logout from the Admin Console
  7. delete all cookies

Part 1.1 - testing admin console access on the main domain over http protocol

NOTE: Key points: force redirect to SSL domains is disabled here.
  1. login to the Admin Console by accessing it on the test.domain.com domain over http:// protocol
  2. confirm that you're looking at Admin Console at the test.domain.com domain over http:// protocol
  3. go to the ConfigurationWebsiteAdvanced section
  4. uncheck these system settings:
    • Require SSL for login & checkout
    • Require SSL for Administrative Console
  5. save changes
  6. reload the page
  7. confirm that you're looking at Admin Console at the test.domain.com domain over http:// protocol
  8. confirm that [SD ID: ] is added in the current page blur bar
  9. go to the Website & ContentBrowse Website section
  10. confirm, that:
    • you see editing mode controls (the Browse Mode, Content Mode and such) in the top frame
    • you're currently in the Browse Mode
    • (new) the advanced theme is being used
    • you'll see [Site Domain ID: 0] text
    • you'll see the [URL: ...], where ... is replaced with URL from a test.domain.com domain using http:// protocol
  11. switch to the Content Mode
  12. confirm, that orange buttons for editing page/content blocks are now shown
  13. logout

Part 1.2 - testing admin console access on the main domain over https protocol

NOTE: Key points: force redirect to SSL domains remained disabled.
  1. login to the Admin Console by accessing it on the test.domain.com domain over https:// protocol
  2. confirm that you're looking at Admin Console at the test.domain.com domain over https:// protocol
  3. go to the Website & ContentLabels & Phrases
  4. confirm that [SD ID: ] is added in the current page blur bar
  5. go to the Website & ContentBrowse Website section
  6. confirm, that:
    • you see editing mode controls (the Browse Mode, Content Mode and such) in the top frame
    • you're currently in the Browse Mode
    • (new) the advanced theme is being used
    • you'll see [Site Domain ID: 0] text
    • you'll see the [URL: ...], where ... is replaced with URL from a test.domain.com domain using https:// protocol
  7. switch to the Content Mode
  8. confirm, that orange buttons for editing page/content blocks are now shown
  9. logout

(new) Part 1.3 - testing SSL redirect for Admin Console on the main domain

NOTE: Key points: force redirect to SSL domains is enabled here.
  1. login to the Admin Console by accessing it on the test.domain.com domain over http:// protocol
  2. go to the ConfigurationWebsiteAdvanced section
  3. check these system settings:
    • Require SSL for login & checkout
    • Require SSL for Administrative Console
  4. save changes
  5. reload the page
  6. confirm that you're looking at Admin Console at the test.domain.com domain over https:// protocol (redirect from http:// to https:// should have happened)
  7. confirm that [SD ID: ] is added in the current page blur bar
  8. go to the Website & ContentBrowse Website section
  9. confirm, that:
    • you see editing mode controls (the Browse Mode, Content Mode and such) in the top frame
    • you're currently in the Browse Mode
    • (new) the advanced theme is being used
    • you'll see [Site Domain ID: 0] text
    • you'll see the [URL: ...], where ... is replaced with URL from a test.domain.com domain using https:// protocol
  10. switch to the Content Mode
  11. confirm, that orange buttons for editing page/content blocks are now shown
  12. logout

(new) Part 1.4 - testing SSL redirect for Front-End on the main domain

NOTE: Key points: force redirect to SSL domains is remained enabled here.
  1. open the Front-End on the test.domain.com domain over http:// protocol
  2. confirm, that:
    • you've been redirected to the https:// protocol on the same domain
    • (new) the advanced theme is being used
    • you'll see [Site Domain ID: 0] text
    • you'll see the [URL: ...], where ... is replaced with URL from a test.domain.com domain using https:// protocol

Part 2 - testing front-end access on the main domain

NOTE: Key points: force redirect to SSL domains is remained enabled here.
  1. login to the Admin Console by accessing it on the test.domain.com domain over https:// protocol
  2. go to the ConfigurationWebsiteAdvanced section
  3. uncheck these system settings:
    • Require SSL for login & checkout
    • Require SSL for Administrative Console
  4. save changes
  5. (new) logout
NOTE: Key points: force redirect to SSL domains is disabled here.
  1. open the Front-End on the test.domain.com domain over http:// protocol
  2. confirm, that:
    • you've remained on the same domain/protocol
    • you'll see [Site Domain ID: 0] text
    • you'll see the [URL: ...], where ... is replaced with URL from a test.domain.com domain using http:// protocol
  3. open the Front-End on the test.domain.com domain over https:// protocol
  4. confirm, that:
    • you've remained on the same domain/protocol
    • (new) the advanced theme is being used
    • you'll see [Site Domain ID: 0] text
    • you'll see the [URL: ...], where ... is replaced with URL from a test.domain.com domain using https:// protocol

Part 3.1 - testing admin console access on site domain over http protocol

NOTE: Key points: force redirect to SSL domains is disabled here.
  1. login to the Admin Console by accessing it on the sd1.test.domain.com domain over http:// protocol
  2. go to the ConfigurationWebsiteAdvanced section
  3. uncheck these system settings:
    • Require SSL for login & checkout
    • Require SSL for Administrative Console
  4. save changes
  5. reload the page
  6. (removed) if you're on the https:// protocol, then adjust URL to use http:// protocol
  7. confirm that you're looking at Admin Console at the sd1.test.domain.com domain over http:// protocol
  8. confirm that [SD ID: 1] is added in the current page blur bar (the 1 is site domain ID)
  9. go to the Website & ContentBrowse Website section
  10. confirm, that:
    • you see editing mode controls (the Browse Mode, Content Mode and such) in the top frame
    • you're currently in the Browse Mode
    • (new) the default theme is being used
    • you'll see [Site Domain ID: 1] text (the 1 is site domain ID)
    • you'll see the [URL: ...], where ... is replaced with URL from a sd1.test.domain.com domain using http:// protocol
  11. switch to the Content Mode
  12. confirm, that orange buttons for editing page/content blocks are now shown
  13. logout

Part 3.2 - testing admin console access on site domain over https protocol

NOTE: Key points: force redirect to SSL domains is remained disabled here.
  1. login to the Admin Console by accessing it on the sd1.test.domain.com domain over https:// protocol
  2. (fixed) confirm that you're looking at Admin Console at the sd1.test.domain.com domain over https:// protocol
  3. go to the Website & ContentLabels & Phrases
  4. confirm that [SD ID: 1] is added in the current page blur bar (the 1 is site domain ID)
  5. go to the Website & ContentBrowse Website section
  6. confirm, that:
    • you see editing mode controls (the Browse Mode, Content Mode and such) in the top frame
    • you're currently in the Browse Mode
    • (new) the default theme is being used
    • you'll see [Site Domain ID: 1] text (the 1 is site domain ID)
    • you'll see the [URL: ...], where ... is replaced with URL from a sd1.test.domain.com domain using https:// protocol
  7. switch to the Content Mode
  8. confirm, that orange buttons for editing page/content blocks are now shown
  9. logout

(new) Part 3.3 - testing SSL redirect for Admin Console on the site domain

NOTE: Key points: force redirect to SSL domains is enabled here.
  1. login to the Admin Console by accessing it on the sd1.test.domain.com domain over http:// protocol
  2. go to the ConfigurationWebsiteAdvanced section
  3. check these system settings:
    • Require SSL for login & checkout
    • Require SSL for Administrative Console
  4. save changes
  5. reload the page
  6. confirm that you're looking at Admin Console at the sd1.test.domain.com domain over https:// protocol (redirect from http:// to https:// should have happened)
  7. confirm that [SD ID: 1] is added in the current page blur bar (the 1 is site domain ID)
  8. go to the Website & ContentBrowse Website section
  9. confirm, that:
    • you see editing mode controls (the Browse Mode, Content Mode and such) in the top frame
    • you're currently in the Browse Mode
    • (new) the default theme is being used
    • you'll see [Site Domain ID: 1] text (the 1 is site domain ID)
    • you'll see the [URL: ...], where ... is replaced with URL from a sd1.test.domain.com domain using https:// protocol
  10. switch to the Content Mode
  11. confirm, that orange buttons for editing page/content blocks are now shown
  12. logout

(new) Part 3.4 - testing SSL redirect for Front-End on the site domain

NOTE: Key points: force redirect to SSL domains is remained enabled here.
  1. open the Front-End on the sd1.test.domain.com domain over http:// protocol
  2. confirm, that:
    • you've been redirected to the https:// protocol on the same domain
    • (new) the default theme is being used
    • you'll see [Site Domain ID: 1] text (the 1 is site domain ID)
    • you'll see the [URL: ...], where ... is replaced with URL from a sd1.test.domain.com domain using https:// protocol

Part 4 - testing front-end access on site domain

NOTE: Key points: force redirect to SSL domains is remained enabled here.
  1. (new) login to the Admin Console by accessing it on the sd1.test.domain.com domain over https:// protocol
  2. (new) go to the ConfigurationWebsiteAdvanced section
  3. (new) uncheck these system settings:
    • Require SSL for login & checkout
    • Require SSL for Administrative Console
  4. (new) save changes
  5. (new) logout
NOTE: Key points: force redirect to SSL domains is disabled here.
  1. open the Front-End on the sd1.test.domain.com domain over http:// protocol
  2. confirm, that:
    • you've remained on the same domain/protocol
    • (new) the default theme is being used
    • you'll see [Site Domain ID: 1] text (the 1 is site domain ID)
    • you'll see the [URL: ...], where ... is replaced with URL from a sd1.test.domain.com domain using http:// protocol
  3. open the Front-End on the sd1.test.domain.com domain over https:// protocol
  4. confirm, that:
    • you've remained on the same domain/protocol
    • (new) the default theme is being used
    • you'll see [Site Domain ID: 1] text (the 1 is site domain ID)
    • you'll see the [URL: ...], where ... is replaced with URL from a sd1.test.domain.com domain using https:// protocol

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.3.x
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 11069
Build 3769: arc lint + arc unit

Event Timeline

alex created this revision.Wed, Mar 12, 8:33 AM
alex requested review of this revision.Wed, Mar 12, 8:33 AM
erik requested changes to this revision.Wed, Mar 12, 10:03 AM

Part 3.1.7 confirm that [SD ID: 1] is added in the current page blur bar (the 1 is site domain ID) - NO, [SD ID: ] is added. And this is right, because at Preparations 10 "add 1st site domain with: Domain Name=sd1-http.test.domain.com", not sd1.test.domain.com
Part 3.1.9 confirm, that you'll see [Site Domain ID: 1] text (the 1 is site domain ID) - NO I see [Site Domain ID: 0]
Part 3.1.12 logout - FAILED, infinite redirect to http://sd1.test.domain.com/SVN/5.3.x/admin/index.php?env=-index%3Am0--default---&expired=1 happens
Part 3.2.2 confirm that you're looking at Admin Console at the test.domain.com domain over https:// protocol - NO, I'm looking at Admin Console at the sd1.test.domain.com domain over https:// protocol
Part 3.2.3 confirm that [SD ID: 1] is added in the current page blur bar (the 1 is site domain ID) = NO, [SD ID: ] is added in the current page blue bar
Part 3.2.5 confirm, that you'll see [Site Domain ID: 1] text (the 1 is site domain ID) - NO I see [Site Domain ID: 0]
Part 4.2 confirm, that you'll see [Site Domain ID: 1] text (the 1 is site domain ID) - NO I see [Site Domain ID: 0]
Part 4.4 confirm, that you'll see [Site Domain ID: 1] text (the 1 is site domain ID) - NO I see [Site Domain ID: 0]

This revision now requires changes to proceed.Wed, Mar 12, 10:03 AM
alex edited the test plan for this revision. (Show Details)Wed, Mar 12, 10:51 AM
alex edited the test plan for this revision. (Show Details)Wed, Mar 12, 11:26 AM
alex edited the test plan for this revision. (Show Details)Wed, Mar 12, 11:38 AM
alex edited the test plan for this revision. (Show Details)
alex edited the test plan for this revision. (Show Details)Wed, Mar 12, 12:02 PM
alex edited the test plan for this revision. (Show Details)Wed, Mar 12, 12:27 PM
alex edited the test plan for this revision. (Show Details)Wed, Mar 12, 1:12 PM
alex added a comment.Wed, Mar 12, 1:14 PM
In D513#10467, @erik wrote:

Part 3.1.7 confirm that [SD ID: 1] is added in the current page blur bar (the 1 is site domain ID) - NO, [SD ID: ] is added. And this is right, because at Preparations 10 "add 1st site domain with: Domain Name=sd1-http.test.domain.com", not sd1.test.domain.com
Part 3.1.9 confirm, that you'll see [Site Domain ID: 1] text (the 1 is site domain ID) - NO I see [Site Domain ID: 0]

My apologies. That was a copy/paste mistake. Fixed now.

In D513#10467, @erik wrote:

I've added admin console logout step in the Part 2 which solved this problem.

In D513#10467, @erik wrote:

Part 3.2.2 confirm that you're looking at Admin Console at the test.domain.com domain over https:// protocol - NO, I'm looking at Admin Console at the sd1.test.domain.com domain over https:// protocol
Part 3.2.3 confirm that [SD ID: 1] is added in the current page blur bar (the 1 is site domain ID) = NO, [SD ID: ] is added in the current page blue bar
Part 3.2.5 confirm, that you'll see [Site Domain ID: 1] text (the 1 is site domain ID) - NO I see [Site Domain ID: 0]
Part 4.2 confirm, that you'll see [Site Domain ID: 1] text (the 1 is site domain ID) - NO I see [Site Domain ID: 0]
Part 4.4 confirm, that you'll see [Site Domain ID: 1] text (the 1 is site domain ID) - NO I see [Site Domain ID: 0]

My apologies. That was a copy/paste mistake. Fixed now.


@erik, executed test plan by myself and all worked as planned. Please retest.

alex requested review of this revision.Wed, Mar 12, 1:14 PM