You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Peter Ladanyi (JIRA)" <ji...@apache.org> on 2010/08/14 20:58:19 UTC

[jira] Created: (SHIRO-188) Asynchronous change of Subject. (hybrid session management)

Asynchronous change of Subject. (hybrid session management)
-----------------------------------------------------------

                 Key: SHIRO-188
                 URL: https://issues.apache.org/jira/browse/SHIRO-188
             Project: Shiro
          Issue Type: Improvement
            Reporter: Peter Ladanyi


I have procedure that needs to asynchronously modify principals of current subjects.

My code is running in web container so i have shiro filter that does the usual thing reconstructs subject and binds it to thread local and then does the clean up. I have found that to be able do such thing i need to run in native session mode. Where the shiro does the session management,  what is not really the preferred way because of bypassing web container session management. 
Maybe there should be kind of hybrid session management that will do possible to change  also detached session (after do filter is called) .


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (SHIRO-188) Asynchronous change of Subject. (hybrid session management)

Posted by Kalle Korhonen <ka...@gmail.com>.
Hmm.. an interesting approach to convincing committers to take on an
issue you don't want to work on. I've been trying to tell people to do
as I say for years but I have yet to crack open that nut. For
courtesy, we can leave it open for now but I don't see this issue
making progress without an initial contribution.

Kalle


On Mon, Aug 16, 2010 at 11:33 PM, Peter Ladanyi (JIRA) <ji...@apache.org> wrote:
>
>    [ https://issues.apache.org/jira/browse/SHIRO-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899304#action_12899304 ]
>
> Peter Ladanyi commented on SHIRO-188:
> -------------------------------------
>
> Kalle,
>
> what i see  is only your unwillingnest to solve things.
> Ajax and bigger thread pool is not the right solution. You should know that.
>
>
>
>
>> Asynchronous change of Subject. (hybrid session management)
>> -----------------------------------------------------------
>>
>>                 Key: SHIRO-188
>>                 URL: https://issues.apache.org/jira/browse/SHIRO-188
>>             Project: Shiro
>>          Issue Type: Improvement
>>            Reporter: Peter Ladanyi
>>
>> I have procedure that needs to asynchronously modify principals of current subjects.
>> My code is running in web container so i have shiro filter that does the usual thing reconstructs subject and binds it to thread local and then does the clean up. I have found that to be able do such thing i need to run in native session mode. Where the shiro does the session management,  what is not really the preferred way because of bypassing web container session management.
>> Maybe there should be kind of hybrid session management that will do possible to change  also detached session (after do filter is called) .
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Commented: (SHIRO-188) Asynchronous change of Subject. (hybrid session management)

Posted by "Kalle Korhonen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHIRO-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12898769#action_12898769 ] 

Kalle Korhonen commented on SHIRO-188:
--------------------------------------

Http session mode works, without a question. To me, this issue sounds invalid - it's up to the client to send the right identifying key (either as a request parameter or a cookie) to attach to the correct session.

> Asynchronous change of Subject. (hybrid session management)
> -----------------------------------------------------------
>
>                 Key: SHIRO-188
>                 URL: https://issues.apache.org/jira/browse/SHIRO-188
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Peter Ladanyi
>
> I have procedure that needs to asynchronously modify principals of current subjects.
> My code is running in web container so i have shiro filter that does the usual thing reconstructs subject and binds it to thread local and then does the clean up. I have found that to be able do such thing i need to run in native session mode. Where the shiro does the session management,  what is not really the preferred way because of bypassing web container session management. 
> Maybe there should be kind of hybrid session management that will do possible to change  also detached session (after do filter is called) .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHIRO-188) Asynchronous change of Subject. (hybrid session management)

Posted by "Kalle Korhonen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHIRO-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899294#action_12899294 ] 

Kalle Korhonen commented on SHIRO-188:
--------------------------------------

Configure more threads for your container use :) Seriously though, I don't see how and why this should be Shiro's problem to solve generically. All containers I know of are inherently request/thread-based when it comes to attaching a session. I suppose an ajax request would still be by far the most common way to solve it even if it's less than optimal when your thread pool is that small. However, nothing prevents you from handling this asynchronously within the container, spawning a new thread and holding on to the session as long as you have to. You'd likely have to come up with some code suggesting how the proposed feature might work in Shiro, otherwise this issue is at risk of being closed.

> Asynchronous change of Subject. (hybrid session management)
> -----------------------------------------------------------
>
>                 Key: SHIRO-188
>                 URL: https://issues.apache.org/jira/browse/SHIRO-188
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Peter Ladanyi
>
> I have procedure that needs to asynchronously modify principals of current subjects.
> My code is running in web container so i have shiro filter that does the usual thing reconstructs subject and binds it to thread local and then does the clean up. I have found that to be able do such thing i need to run in native session mode. Where the shiro does the session management,  what is not really the preferred way because of bypassing web container session management. 
> Maybe there should be kind of hybrid session management that will do possible to change  also detached session (after do filter is called) .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHIRO-188) Asynchronous change of Subject. (hybrid session management)

Posted by "Les Hazlewood (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHIRO-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12898634#action_12898634 ] 

Les Hazlewood commented on SHIRO-188:
-------------------------------------

Hi Peter,

I'm not sure what this means - ShiroFilter works with either servlet container sessions or Shiro's native sessions.  There is a sample web app in shiro's source distribution that shows this working.  Could you please clarify?

> Asynchronous change of Subject. (hybrid session management)
> -----------------------------------------------------------
>
>                 Key: SHIRO-188
>                 URL: https://issues.apache.org/jira/browse/SHIRO-188
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Peter Ladanyi
>
> I have procedure that needs to asynchronously modify principals of current subjects.
> My code is running in web container so i have shiro filter that does the usual thing reconstructs subject and binds it to thread local and then does the clean up. I have found that to be able do such thing i need to run in native session mode. Where the shiro does the session management,  what is not really the preferred way because of bypassing web container session management. 
> Maybe there should be kind of hybrid session management that will do possible to change  also detached session (after do filter is called) .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHIRO-188) Asynchronous change of Subject. (hybrid session management)

Posted by "Peter Ladanyi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHIRO-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899304#action_12899304 ] 

Peter Ladanyi commented on SHIRO-188:
-------------------------------------

Kalle, 

what i see  is only your unwillingnest to solve things. 
Ajax and bigger thread pool is not the right solution. You should know that. 




> Asynchronous change of Subject. (hybrid session management)
> -----------------------------------------------------------
>
>                 Key: SHIRO-188
>                 URL: https://issues.apache.org/jira/browse/SHIRO-188
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Peter Ladanyi
>
> I have procedure that needs to asynchronously modify principals of current subjects.
> My code is running in web container so i have shiro filter that does the usual thing reconstructs subject and binds it to thread local and then does the clean up. I have found that to be able do such thing i need to run in native session mode. Where the shiro does the session management,  what is not really the preferred way because of bypassing web container session management. 
> Maybe there should be kind of hybrid session management that will do possible to change  also detached session (after do filter is called) .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHIRO-188) Asynchronous change of Subject. (hybrid session management)

Posted by "Peter Ladanyi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHIRO-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12898734#action_12898734 ] 

Peter Ladanyi commented on SHIRO-188:
-------------------------------------

Hi Les, 

That part is just saying that there are two session management mode supported (http and native) . 
Where i see the limitation is that when i'm using http session mode than i'm not able to do asynchronous change of session data (principals).



> Asynchronous change of Subject. (hybrid session management)
> -----------------------------------------------------------
>
>                 Key: SHIRO-188
>                 URL: https://issues.apache.org/jira/browse/SHIRO-188
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Peter Ladanyi
>
> I have procedure that needs to asynchronously modify principals of current subjects.
> My code is running in web container so i have shiro filter that does the usual thing reconstructs subject and binds it to thread local and then does the clean up. I have found that to be able do such thing i need to run in native session mode. Where the shiro does the session management,  what is not really the preferred way because of bypassing web container session management. 
> Maybe there should be kind of hybrid session management that will do possible to change  also detached session (after do filter is called) .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHIRO-188) Asynchronous change of Subject. (hybrid session management)

Posted by "Peter Ladanyi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHIRO-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899281#action_12899281 ] 

Peter Ladanyi commented on SHIRO-188:
-------------------------------------

Kalle, 

U r probably right about the initiator of change ..that should be client, but lets consider that if the credential validation takes some time like 5 to 15 sec. 
and u have on Glassfish only 5 threads to handle requests,you will probably decide to do the validation asynchronously and that means that u need to be able to modify also "detached sessions".



> Asynchronous change of Subject. (hybrid session management)
> -----------------------------------------------------------
>
>                 Key: SHIRO-188
>                 URL: https://issues.apache.org/jira/browse/SHIRO-188
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Peter Ladanyi
>
> I have procedure that needs to asynchronously modify principals of current subjects.
> My code is running in web container so i have shiro filter that does the usual thing reconstructs subject and binds it to thread local and then does the clean up. I have found that to be able do such thing i need to run in native session mode. Where the shiro does the session management,  what is not really the preferred way because of bypassing web container session management. 
> Maybe there should be kind of hybrid session management that will do possible to change  also detached session (after do filter is called) .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.