SSO Handler managing login for one site with multiple Domains?

Author Message

Rene Hrdina

Monday 09 August 2010 5:49:55 am

Hi Everyone,

following scenario:

We got a website running that is accessible via multiple domains. The Problem is that when a user logs in at www.domain1.com he's not logged in at www.domain2.com.

So i guess we'll have to implement a Single Sing On Handler.

Since i can not just read the cookie created on www.domain1.com when the user visits www.domain2.com we'll have to come up with a more sophisticated solution.

Has anyone ever created a solution for such a problem and would share some ideas regarding this topic with me ?

I'd appreciate any tips, hints and ideas on how to implement such a SSO.

regards

Andrew Duck

Monday 09 August 2010 6:17:42 am

Hi Rene,

Yes you are correct that a single signon handler would be a good approach. I have built similar implementations in both cross-domain (a.com, b.com) and root-domain (sub.a.com, sub2.a.com, *.a.com) environments.

It really depends on how you store your cookies - there was recently an enhancement for eZ Publish which should come out in 4.4 which allows you to specify the domain name you wanted stored for login cookies - then it's a matter of building a suitable SSO handler to meet your requirements.

In your case with multiple different domain names you will need an intermediate domain that handles all authorisations via redirects to that domain to check the auth cookie - then you need to redirect back to the requested domain and set a login cookie for the specific domain.

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 03:21:16
Script start
Timing: Jan 19 2025 03:21:16
Module start 'layout'
Timing: Jan 19 2025 03:21:16
Module start 'content'
Timing: Jan 19 2025 03:21:17
Module end 'content'
Timing: Jan 19 2025 03:21:17
Script end

Main resources:

Total runtime0.9330 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.4141152.6563
Module start 'layout' 0.00590.0031 742.070339.5078
Module start 'content' 0.00900.9225 781.5781525.3594
Module end 'content' 0.93150.0015 1,306.93758.0938
Script end 0.9330  1,315.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3426160.0002
Check MTime0.00130.1384160.0001
Mysql Total
Database connection0.00070.074710.0007
Mysqli_queries0.878994.2018540.0163
Looping result0.00060.0628520.0000
Template Total0.890395.420.4451
Template load0.00210.225920.0011
Template processing0.888295.192820.4441
Template load and register function0.00020.021810.0002
states
state_id_array0.00250.272710.0025
state_identifier_array0.00320.346020.0016
Override
Cache load0.00170.1847170.0001
Sytem overhead
Fetch class attribute can translate value0.00060.065520.0003
Fetch class attribute name0.00110.123130.0004
XML
Image XML parsing0.00080.085320.0004
class_abstraction
Instantiating content class attribute0.00000.000930.0000
General
dbfile0.00460.4950180.0003
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs