新人到JOSSO。我已经用tomcat设置了JOSSO,而partnerapp似乎运行正常。我有一个“示例”with应用程序,我正在尝试配置JOSSO。当我尝试访问webapp时,JOSSO登录页面将正确显示,但是,成功登录后,我得到以下异常
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)我在josso config.xml中添加了partner条目。
<agent:partner-app id="MySampleApp" context="/sample"/>我的web.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>
...在sample.xml中创建了一个c:\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论坛上
发布于 2015-02-09 13:22:22
您应该在tomcat初始化时通过在VM参数上添加以下参数来指示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管理的Tomcat,所以我在Server Configuration (View )//View/ VM参数中包含了前面提到的配置。但是,如果您正在配置一个独立的tomcat安装,请按% tomcat _HOME$/bin/ script e冲浪,检查jaas.conf tomcat使用的是哪个,并使用上面所示的内容对其进行更新。我希望它对你有用!
https://stackoverflow.com/questions/8937828
复制相似问题