You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Arun Patidar (JIRA)" <ji...@apache.org> on 2015/02/06 12:30:34 UTC

[jira] [Commented] (OFBIZ-6061) When logging out in a multi-tenant environment, loginWorker strips the tenantId from the delegator - reverting to default. This is fine for the back-end, but it causes havoc with front-end applications.

    [ https://issues.apache.org/jira/browse/OFBIZ-6061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14309002#comment-14309002 ] 

Arun Patidar commented on OFBIZ-6061:
-------------------------------------

Hi Gavin,

I got your point and your fix looks reasonable to me. But I have handled this case in OFBIZ-5986 ticket by commenting this code block. Currently that task is under review so patch still not committed.

We have to maintain the delegator after logout in all cases as there can be a case where front store application runs on tenant environment without specifying Delegator for it in  web.xml

Delegator will switch automatically when user logs using with tenantId or hitting request with specific domain name.Currently these all under discussion and progress. I will come up with a fix for that.

> When logging out in a multi-tenant environment, loginWorker strips the tenantId from the delegator - reverting  to default.  This is fine for the back-end, but it causes havoc with front-end applications. 
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-6061
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6061
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Trunk, 12.04.04, 12.04.05, 13.07.01
>            Reporter: Gavin Mabie
>            Assignee: Gavin Mabie
>            Priority: Minor
>              Labels: login, multi-tenant
>             Fix For: Release Branch 11.04, Release Branch 12.04, Release Branch 13.07, Trunk
>
>         Attachments: MultiTenantLoginWorker.patch
>
>
> 1. When logging out in a multi-tenant environment, users have the ability to 2. specify a tenantId when they want to login again;
> 3. This is the result of the doBasicLogout method in LoginWorker.java which basically resets the delegator to default when a logout occurs;
> 4. While this works well for back-end multi-tenant applications, it presents an issue with tenant-specific applications.  The tenant-specific application data resides in the tenant db andthis creates problems when the logout resets to 
> default.
> 5. This proposal utilises the entityDelegatorName as specified in the component's web.xml to:
> 5.1 Check if there is a tenant involved, in which case it will use this as reset delegator;
> 5.2 If not, it reverts to the default delegator.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)