Forums / Developer / SSO Handler managing login for one site with multiple Domains?

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

eZ debug

Timing: Jan 31 2025 07:43:58
Script start
Timing: Jan 31 2025 07:43:58
Module start 'content'
Timing: Jan 31 2025 07:43:58
Module end 'content'
Timing: Jan 31 2025 07:43:58
Script end

Main resources:

Total runtime0.2520 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0086 589.3047180.7969
Module start 'content' 0.00860.0056 770.101693.8828
Module end 'content' 0.01430.2377 863.9844522.6719
Script end 0.2520  1,386.6563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00361.4279200.0002
Check MTime0.00150.5990200.0001
Mysql Total
Database connection0.00080.303210.0008
Mysqli_queries0.204781.19861410.0015
Looping result0.00120.47841390.0000
Template Total0.237294.110.2372
Template load0.00080.334010.0008
Template processing0.236393.768310.2363
Override
Cache load0.00060.228910.0006
Sytem overhead
Fetch class attribute can translate value0.00080.303210.0008
XML
Image XML parsing0.00020.096010.0002
General
dbfile0.00933.6901200.0005
String conversion0.00000.002730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs