2009-06-15 18 views
1

私は私のアプリのセキュリティ制約ました:Google App Engineで使用する領域を定義するにはどうすればよいですか?

2009-06-15 10:25:実行時に

<security-constraint> 
    <display-name>users</display-name> 
    <web-resource-collection> 
     <web-resource-name>all</web-resource-name> 
     <description/> 
     <url-pattern>/secured</url-pattern> 
     <http-method>GET</http-method> 
     <http-method>POST</http-method> 
     <http-method>HEAD</http-method> 
     <http-method>PUT</http-method> 
     <http-method>OPTIONS</http-method> 
     <http-method>TRACE</http-method> 
     <http-method>DELETE</http-method> 
    </web-resource-collection> 
    <auth-constraint> 
     <description>Have to be a USER</description> 
     <role-name>USERS</role-name> 
    </auth-constraint> 
</security-constraint> 
<login-config> 
    <auth-method>BASIC</auth-method> 
</login-config> 
<security-role> 
    <description/> 
    <role-name>USERS</role-name> 
</security-role> 

がどんなに領域 "USERS" がない42.536は:: WARN:要求/セキュアに失敗しました - 領域がありません

  • Googleアプリケーションエンジンで領域を定義する方法はありますか?
  • jetty.xmlを使用していますか?それはGAEによって運営されていますか?

答えて

1

私は、WEB-INF/web.xmlの桟橋-を追加しました:

<?xml version="1.0" encoding="utf-8"?> 
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.1//EN"  
"http://jetty.mortbay.org/configure_1_2.dtd"> 
<Configure class="org.mortbay.jetty.webapp.WebAppContext"> 
    <Get name="securityHandler"> 
    <Set name="userRealm"> 
     <New class="org.mortbay.jetty.security.HashUserRealm"> 
     <Set name="name">MyRealm</Set> 
     <Call name="addUserToRole"> 
      <Arg>dfa</Arg> 
      <Arg>*</Arg> <!-- * is a "builtin" realm for GAE --> 
     </Call> 
     <Call name="put"> 
      <Arg>dfa</Arg> 
      <Arg>secret</Arg> 
     </Call> 
     </New> 
    </Set> 
    </Get> 
</Configure> 

これが正しくGAEにデプロイされます。しかし、私が入手しようとすると/ http:平文フォームが表示されますが、 "dfa/secret"は認識されません。

バグですか?

関連する問題