フォーラム

ホーム » 1. Marketplace App Development

構造的に表示 平面上に表示 ツリー上に表示
Philippe Tran
"Socket accept failed" with PACL and Spring filter
2013/03/22 7:48
答え

Philippe Tran

ランク: Junior Member

投稿: 34

参加年月日: 2009/01/22

最近の投稿

Hi all,

I am using a Spring filter, as defined in web.xml :

<filter>
<filter-name>requestContextFilter</filter-name>
<filter-class>org.springframework.web.filter.RequestContextFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>requestContextFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>


When security manager is on, I can see this :

Mar 22, 2013 3:38:23 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
SEVERE: Socket accept failed
java.lang.ClassCircularityError: com/liferay/portal/security/pacl/PACLPolicyManager$PACLPolicyPrivilegedAction
at com.liferay.portal.security.pacl.PACLPolicyManager.getPACLPolicy(PACLPolicyManager.java:70)
at com.liferay.portal.security.pacl.PortalPolicy.getPermissions(PortalPolicy.java:133)
at com.liferay.portal.security.pacl.PortalPolicy.implies(PortalPolicy.java:197)
at java.security.ProtectionDomain.implies(ProtectionDomain.java:224)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:352)
at java.security.AccessController.checkPermission(AccessController.java:549)
at com.liferay.portal.security.pacl.PortalSecurityManagerImpl.checkPermission(PortalSecurityManagerImpl.java:205)
at java.lang.SecurityManager.checkAccept(SecurityManager.java:1157)
at java.net.ServerSocket.implAccept(ServerSocket.java:466)
at java.net.ServerSocket.accept(ServerSocket.java:430)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:60)
at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:216)
at java.lang.Thread.run(Thread.java:680)

Does anyone know how to make spring filter work with PACL ?

TIA
Philippe
Ray Augé
RE: "Socket accept failed" with PACL and Spring filter
2013/03/22 8:11
答え

Ray Augé

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1171

参加年月日: 2005/02/07

最近の投稿

Wow, Philippe (sorry for name typo) are you working with master branch of liferay-portal? The code you are referring to is not in any release yet.

Can you indicate which exact version you are working with?

It may just be that you need to update from master because the class that is in your error is not initialized until one of the very latest commits last night on master.
Hitoshi Ozawa
RE: "Socket accept failed" with PACL and Spring filter
2013/03/23 20:36
答え

Hitoshi Ozawa

ランク: Liferay Legend

投稿: 7952

参加年月日: 2010/03/23

最近の投稿

As Ray mentioned, things in github master may not work correctly - it sometimes does may not even build. Should be using the GA or at least a milestone release.

I'm not even sure if Marketplace is accepting portlets based on a master.
Matt Fulford
Automatic reply: [Liferay Forums][2. Marketplace Developers] RE: "Socket ac
2013/03/23 20:37
答え

Matt Fulford

ランク: New Member

投稿: 17

参加年月日: 2009/04/06

最近の投稿

Thanks for your email. I'm currently out of the office until Tuesday 2nd April. Please contact David Schuiteman (david.schuiteman@pfiks.com) with any urgent queries.

Regards,
Matt
Hitoshi Ozawa
RE: Automatic reply: [Liferay Forums][2. Marketplace Developers] RE: "Socke
2013/03/23 20:54
答え

Hitoshi Ozawa

ランク: Liferay Legend

投稿: 7952

参加年月日: 2010/03/23

最近の投稿

Wow! This is the first time I've seem an automatic message post in this forum. :-)
Ray Augé
Re: [Liferay Forums][2. Marketplace Developers] RE: Automatic reply: [Lifer
2013/03/24 1:45
答え

Ray Augé

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1171

参加年月日: 2005/02/07

最近の投稿

If this gets through, someone enabled email replies!
On Mar 23, 2013 11:54 PM, "Hitoshi Ozawa from liferay.com" <
forums@liferay.com> wrote:

> Wow! This is the first time I've seem an automatic message post in this
> forum. :-)
>
>
> To view the thread, follow the link below:
>
> http://www.liferay.com/community/forums/-/message_boards/view_message/22944127
> --
> Thanks, Liferay.com Forums <http://http://www.liferay.com>
Ray Augé
Re: [Liferay Forums][2. Marketplace Developers] Re: [Liferay Forums][2. Mar
2013/03/24 2:13
答え

Ray Augé

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1171

参加年月日: 2005/02/07

最近の投稿

Nice!

BTW, less a few pull requests pending review PACLv2 is complete in master.

For anyone wanting try it out, follow these steps to auto generate the pack
policy for your plugin:

- add security-manager-enabled=generate to your
liferay-plugin-package.properties
- deploy plugin
- do usability testing of app (test all operations)
- as you test, policy is auto generated into
${lifers.home}/pacl-policy/${plugin-context-name}-pacl.policy
- when completed testing, paste generated policy into app's own lpp.props

Note you may want to optimize the resulting policy for thing like fs paths,
etc (all generated rules use literal vales)
Philippe Tran
RE: Re: [Liferay Forums][2. Marketplace Developers] Re: [Liferay Forums][2.
2013/03/29 6:31
答え

Philippe Tran

ランク: Junior Member

投稿: 34

参加年月日: 2009/01/22

最近の投稿

Hi Ray and Hitoshi,

First, I would like to thank you for your quick answers. Yes, I am using a master version (about 2 week old) because the M4 has a small annoying problem : it calls spring portlet controllers in 'edit' mode twice, in render as well as action phase. In master, everything is ok again.

Being away, I was not able to test further.

Ray Augé:
For anyone wanting try it out, follow these steps to auto generate the pack
policy for your plugin:

- add security-manager-enabled=generate to your
liferay-plugin-package.properties
- deploy plugin
- do usability testing of app (test all operations)
- as you test, policy is auto generated into
${lifers.home}/pacl-policy/${plugin-context-name}-pacl.policy
- when completed testing, paste generated policy into app's own lpp.props


Now that I am back to work, I just activated the "generate" security mode with the last master, using a sample portlet with just the Spring requestContextFilter.

As a result, I just got : security-manager-environment-variables=\\*

Having tested this setting with true, everything seems ok. Anyway, the value "\*" seems strange to me, as a security setting.

What do you think about ?

Thanks again,
Philippe (no typo here, Ray ;-)
James Falkner
Reply-by-email on forums
2013/03/24 12:46
答え

James Falkner

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1324

参加年月日: 2010/09/17

最近の投稿

Split this off. The new thread can be found at http://www.liferay.com/community/forums/-/message_boards/view_message/22949380.
匿名
RE&#x3a;&#x20;Automatic&#x20;reply&#x3a;&#x20;&#x5b;Liferay&#x20;Forums&#x5
2015/04/27 7:09
答え

匿名

状態: 拒否
あなたのメッセージはスパムと設定されました。管理者があなたが編集したメッセージを速やかに審査します。
Thanks&#x20;for&#x20;your&#x20;email&#x2e;&#x20;I&#x27;m&#x20;currently&#x20;out&#x20;of&#x20;the&#x20;office&#x20;until&#x20;Tuesday&#x20;2nd&#x20;April&#x2e;&#x20;Please&#x20;contact&#x20;David&#x20;Schuiteman&#x20;&#x28;david&#x2e;schuiteman&#x40;pfiks&#x2e;com&#x29;&#x20;with&#x20;any&#x20;urgent&#x20;queries&#x2e;&#x0a;&#x0a;Regards&#x2c;&#x0a;Matt