XSRF攻撃のGWTPアプリから保護しようとしています。JSESSIONのように直面している問題は、parozテストツールに簡単にアクセスできます。ユーザーがすでにログインしていて、同時にparozによって同じサーバー要求を行った場合は、そのツールを使用します。更新された値で同じトランザクションを実行しますが、これはセキュリティ上の問題です。
これを停止するには、リクエストごとに新しいCookieを作成し、クライアントからサーバーに送信する必要があります。
@SecurityCookie
public static final String securityCookieName = getRandomString(); //Not work
ClientModuleの場合
public class ClientModule extends AbstractPresenterModule {
@Override
protected void configure() {
bindConstant().annotatedWith(SecurityCookie.class).to(
NameTokens.securityCookieName);
そしてDispatchServletModuleで
public class DispatchServletModule extends ServletModule {
@Override
public void configureServlets() {
bindConstant().annotatedWith(SecurityCookie.class).to(NameTokens.securityCookieName);
'JSESSIONID'の代わりにランダムにCookieを生成したい。どのように/どこで行うのですか?そして、GWTPでリクエストごとにCookieを再生成する適切な方法は何ですか?