2012-01-20 13 views
0

初心者からJOSSO。私はtomcatを使ってJOSSOをセットアップしました。そして、partnerappは正しく動作しているようです。私はJOSSOで設定しようとしている 'サンプル' webappを持っています。私はWebアプリケーションにアクセスしようとすると、JOSSOのログインページが正しく、私が正常にログインした後、私はJOSSO + TOMCATでサンプルWebコンテキストを設定する

java.lang.RuntimeException: Outbound relaying failed. No Principal found. Verify your SSO Agent Configuration! 
    org.josso.tc60.agent.SSOAgentValve.invoke(SSOAgentValve.java:551) 
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) 
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) 
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) 
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) 
    java.lang.Thread.run(Thread.java:722) 

次の例外を取得しますが表示されます私はエージェント-config.xmlがJOSSOするために、パートナー・アプリケーションのエントリを追加しました。

<agent:partner-app id="MySampleApp" context="/sample"/> 

は私のweb.xmlがCでsample.xmlにファイルを作成し、この

... 
    <welcome-file-list id="WelcomeFileList"> 
     <welcome-file>index.html</welcome-file> 
    </welcome-file-list> 

    <security-constraint> 
     <!-- Sample Security Constraint --> 
     <web-resource-collection> 

      <!-- We're going to protect this resource and make it available only to users in "role1". --> 
      <web-resource-name>protected-resources</web-resource-name> 

      <url-pattern>/*</url-pattern> 

      <http-method>HEAD</http-method> 
      <http-method>GET</http-method> 
      <http-method>POST</http-method> 
      <http-method>PUT</http-method> 
      <http-method>DELETE</http-method> 

     </web-resource-collection> 

     <!-- NOTE: This role names will be retrieved by Josso using the proper identity store. --> 
     <auth-constraint> 
      <role-name>role1</role-name> 
     </auth-constraint> 

     <user-data-constraint> 
      <transport-guarantee>NONE</transport-guarantee> 
     </user-data-constraint> 

    </security-constraint> 

    <security-role > 
     <description>Role 1</description> 
     <role-name>role1</role-name> 
    </security-role> 

    <login-config> 

     <auth-method>FORM</auth-method> 

     <form-login-config> 
      <!-- 
      NOTE: This will redirect the user to the proper login page provided by JOSSO. 
      --> 
      <form-login-page>/login-redirect.jsp</form-login-page> 
      <form-error-page>/login-redirect.jsp</form-error-page> 


     </form-login-config> 

    </login-config> 
... 

次のようになります。\ TOMCAT_DIR \ confに\ Catlina \ localhostのこの

<Context docBase="${catalina.home}/webapps/sample" privileged="true" antiResourceLocking="true" antiJARLocking="true"> 
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> 
</Context> 

任意のように見えましたこの問題に関するフィードバックは高く評価されます。 JOSSO forum

+1

私は次の行をコメントアウトしましたが、うまくいくようです。 josso-usersのデフォルトユーザーを使用したいと思っていたのに、ユーザー認証のために他のデータベースを使用しようとしていたと思います。 xmlファイル。 –

答えて

0

にクロスポスト

あなたは(Eclipseを使用している場合)、VMの引数に次のパラメータを追加することで、Tomcatの初期化時にjaas.confファイルを示す必要があります:

-Djava.security.auth.login.config=D:\apache-tomcat-7.0.54-josso\conf\jaas.conf 

このファイルに、必要があります以下の内容を含んでいます:

josso { 
    org.josso.tc70.agent.jaas.SSOGatewayLoginModule required debug=true; 
}; 

私はEclipse IDEで管理されているTomcatを使用していますので、上記の設定をSeに含めましたrver設定(サーバの表示)/起動起動設定/引数/ VM引数。 しかし、スタンドアロンのTomcatインストールを設定している場合は、%TOMCAT_HOME $/bin/scripts eでサーフし、どのjaas.conf tomcatが使用しているかを確認し、上記の内容でアップデートしてください。 私はそれがあなたのために働くことを望む!

関連する問題