[Seasar-user:20800] Re: S2Flex2 を使用した場合のCSRF対策について

[E-MAIL ADDRESS DELETED] [E-MAIL ADDRESS DELETED]
2011年 6月 8日 (水) 18:11:41 JST


$B$*@$OC$K$J$j$^$9!#(B
$B>>K\$H?=$7$^$9!#(B

S2Flex$B$r;HMQ$7$?%W%m%@%/%H$G$N(BCSRF$BBP:v$K$D$$$F!"0JA0!"<ALd$r$5$;$FD:$-$^$7(B
$B$?$,!"(B
$BFbMF$,B?>/6qBNE*$K$J$j$^$7$?$N$G!":FEY!"<ALd$5$;$FD:$-$^$9!#(B
$B$4=u8@$rD:$1$^$7$?$i!"=u$+$j$^$9!#(B


$B!Z=$@5J}?K![(B

$B2<5-$N$h$&$J=$@5J}?K$rN)$F$^$7$?!#(B
$B-!%5!<%PB&$N3F%a%=%C%I$N%Q%i%a!<%?$KG'>ZMQ%H!<%/%s$rDI2C!J0lHV:G8e!K(B
$B-"%/%i%$%"%s%H$+$i$O!"G'>ZMQ%H!<%/%s$r%a%=%C%I%Q%i%a!<%?$H$7$FEO$9(B
$B-#%5!<%PB&$O!"(BAOP$B$N(BIntercepter$B$G%H!<%/%s%A%'%C%/=hM}$r9T$&!#(B


$B!Z%3!<%I%5%s%W%k![(B
"token"$B$H$$$&%Q%i%a!<%?$,G'>ZMQ$N%H!<%/%s$G$9!#(B

===== Action Script =====
$B!{!!(BXXX.as(Action Script)
private function onXXX(params:Array):void {
//$B%H!<%/%s$r<hF@$7$F!"%5!<%S%9%a%=%C%I$N%Q%i%a!<%?$KEO$9(B

        var token:String;
        token = getToken();

        $B!A!A!A>JN,!A!A!A(B

        S2FlexFactory.create(this, "XXXService", 
onYYY).service.setXXX(param1 ,token);


private function onYYY(params:Array):void {

        $B!A!A!A>JN,!A!A!A(B

}

===== Java =====
$B!{!!(BXXXServiceImpl.java
@Aspect("xxxInterceptor")
public RetBooleanDto setXXX(String param1, String token) {

        $B!A!A!A>JN,!A!A!A(B

}

$B!{!!(BXXXInterceptor.java
package aop;

        $B!A!A!A>JN,!A!A!A(B


import org.aopalliance.intercept.MethodInvocation;
import org.seasar.framework.aop.interceptors.AbstractInterceptor;
import org.seasar.framework.container.S2Container;
import org.seasar.framework.container.factory.SingletonS2ContainerFactory;

  
public class XXXInterceptor extends AbstractInterceptor  {

protected Log log = LogFactory.getLog(this.getClass());
public Object invoke(MethodInvocation invocation)throws Throwable {

        $B!A!A!A>JN,!A!A!A(B

        //$B%H!<%/%s$r%5!<%S%94X?t$N%Q%i%a!<%?$+$i<hF@$9$k(B
        String token = (String)args[args.length - 1];

        $B!A!A!A>JN,!A!A!A(B

        //$B%H!<%/%s$r%A%'%C%/$9$k(B
        }
}

===== daicon =====
$B!{(Bapp.dicon
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
        http://www.seasar.org/dtd/components24.dtd>
<components>
        $B!A!A!A>JN,!A!A!A(B
        <include path="tokenCherkAop.dicon"/>
        $B!A!A!A>JN,!A!A!A(B
</components>

$B!{!!(BtokenCherkAop.dicon
<?xml version="1.0" encoding="Shift_JIS"?> 
<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN" 
        http://www.seasar.org/dtd/components24.dtd>
<components> 
        <component name="XXXInterceptor" instance="request" 
class="aop.XXXInterceptor"/>
</components> 


$B!Z<ALdFbMF![(B

$B%5!<%PB&$O(BAOP$B$G0l2U=j$G$N%A%'%C%/=hM}$G<B8=$G$-$^$9$,!"(B
$B%/%i%$%"%s%H$+$i$NG'>ZMQ%H!<%/%s$NEO$7J}$H$7$F!"(B
$B3F%a%=%C%I$N%Q%i%a!<%?$H$7$F%5!<%PB&$GEO$9<BAuJ}K!$K$J$j$^$7$?!#(B

$B$b$C$[E-MAIL ADDRESS DELETED]$JJ}K!$,$J$$$+$H!"<+J,$J$j$KD4$Y$F$_$^$7$?$,!"$J$+$J$+NI$$J}K!$,(B
$B8+$D$+$j$^$;$s!#(B

$B$h$[E-MAIL ADDRESS D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%98F$S=P$7;~$K!"-!$GH/9T$5$l$?%o%s%?%$%`%H!<%/%s$r(B
$BEO$9(B 

$B2DG=$G$"$l$P!"%/%i%$%"%s%HB&!J(BFlex$B!K!"%5!<%PB&(B(Java)$B$G$=$l$>$l0l2U=j$N<BAu(B
$B$GBP1~$7$?$$$H;W$C$F$$$^$9!#(B 


$B!Z:$$C$F$$$k;v![(B 
$B%o%s%?%$%`%H!<%/%s$N<u$1EO$7$N$?$a!"(BS2Flex2Service$B$N%j%/%(%9%H$H%l%9%]%s%9(B
$B$NA42U=j$K(B 
$B$=$l$>$l<BAu$7$J$1$l$P$J$i$J$$$N$G$O$H;W$C$F$$$^$9!#(B 
$B$J$s$H$+%7%s%W%k$J<BAu$K:Q$^$;$?$$$G$9!#(B 

$B%5!<%PB&$O!"(Bfilter$B$rMxMQ$9$l$P2DG=$+$b$7$l$^$;$s$,!"6qBNE*$JBP1~:v$^$GF3$-(B
$B=P$;$^$;$s$G$7$?!#(B 


$B4pK\E*$J<ALd$+$b$7$l$^$;$s$N$G!"62=L$G$4$6$$$^$9$,!"$I$&$>$h$m$7$/$*4j$$CW(B
$B$7$^$9!#(B 


$B>>K\(B_______________________________________________
Seasar-user mailing list
[E-MAIL ADDRESS DELETED]
https://ml.seasar.org/mailman/listinfo/seasar-user

-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
URL: <http://ml.seasar.org/archives/seasar-user/attachments/20110608/5678e184/attachment.html>


Seasar-user メーリングリストの案内