You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Les Hazlewood (JIRA)" <ji...@apache.org> on 2011/04/21 09:22:05 UTC

[jira] [Commented] (SHIRO-287) Enable web-configured SecurityManager to be statically accessible for non-request threads

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

Les Hazlewood commented on SHIRO-287:
-------------------------------------

I just committed this change to trunk (AbstractShiroFilter).  Static memory remains disabled by default (and must be explicitly enabled via a Filter init-param or JavaBeans property) pending further review/discussion.

> Enable web-configured SecurityManager to be statically accessible for non-request threads
> -----------------------------------------------------------------------------------------
>
>                 Key: SHIRO-287
>                 URL: https://issues.apache.org/jira/browse/SHIRO-287
>             Project: Shiro
>          Issue Type: New Feature
>            Reporter: Les Hazlewood
>            Assignee: Les Hazlewood
>              Labels: SecurityManager, Shiro, request, static, thread, web, web.xml
>             Fix For: 1.2.0
>
>
> For any work done on threads that are not triggered by a request thread, the SecurityManager should be accessible to these threads so the Subject.Builder can be used properly.
> This can be accomplished by setting the configured SecurityManager as a static member variable in SecurityUtils (via SecurityUtils.setSubjectManager).  While static memory is not ideal, it is probably good enough for 90% of web applications, and can be a viable solution. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira