JOSSO在JBOSS中安装与配置
1、JOSSO单点登录网关
1.1进入josso/bin目录,执行josso-gsh命令
1.2 安装JOSSO的核心Gateway,执行命令
gateway install --target <JBOSS_HOME> --jboss-instance default - platform jb42
此命令实际上执行了如下操作:
1.2.1 Copy <JOSSO_HOME> \dist\gateway\config目录下文件至<JBOSS_HOME>\ server\default\conf目录下
1.2.2 Copy <JOSSO_HOME> \dist\gateway\apps目录下josso-gateway-web-1.8.0.war包至<JBOSS_HOME>\ server\default\deploy目录下,并重命名为josso.war
2、参与单点登录的Web
2.1进入josso/bin目录,执行josso-gsh命令
2.2安装JOSSO的agent,执行命令
agent install --target <JBOSS_HOME> --jboss-instance default --platform jb42
此命令实际上执行了如下操作:
2.2.1修改JBOSS JAAS(Java Authentication Authorization Service)验证
注释默认验证: <Realm className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm"
修改%JAVA_HOME%\server\default\deploy\jboss-web.deployer目录下的server.xml的JAAS验证,用SSO验证,添加
<Realm className="org.josso.jb42.agent.JBossCatalinaRealm" appName="josso"
userClassNames="org.josso.gateway.identity.service.BaseUserImpl"
roleClassNames="org.josso.gateway.identity.service.BaseRoleImpl" debug="1" />
2.2.2修改%JBOSS_HOME%\server\default\conf目录下的login-config.xml文件
添加Josso的login模型。
<application-policy name = "josso">
<authentication>
<login-module code ="org.josso.jb4.agent.JBossSSOGatewayLoginModule" flag= "required">
<module-option name="debug">true</module-option>
</login-module>
</authentication>
</application-policy>
2.2.3修改%JAVA_HOME%\server\default\deploy\jboss-web.deployer目录下的server.xml大约在87行,在下面的代码后面添加SSO代理,在Host节点中添加SSO代理
<Valve className="org.josso.tc55.agent.SSOAgentValve" debug="1"/>
2.2.4在<JBOSS_HOME>\ server\default\conf目录下新建josso-agent-config.xml文件,此文件可在下载的JOSSO包中找到,服务器版本不同,此文件都不同,主要配置修改2个地方
<!-- Gateway LOGIN and LOGOUT URLs -->
<gatewayLoginUrl>http://localhost:8080/josso/signon/login.do</gatewayLoginUrl>
<gatewayLogoutUrl>http://localhost:8080/josso/signon/logout.do</gatewayLogoutUrl>
这里是配置josso服务器的login和logout的url
需要加入认证的app
<agent:partner-apps>
<!-- Simple definition of a partner application -->
<agent:partner-app id="MySimplePartnerApp" context="/simple-partnerapp"/>
<agent:partner-app id="MyPartnerApp1" context="/partnerapp" >
</agent:partner-apps>
2.2.5 从<JOSSO_HOME>\lib目录COPY相关jar包到<JBOSS_HOME>\server\default\lib目录
2.3对Web应用进行改造
2.3.1 修改web.xml 安全策略
修改Web应用的web.xml文件,在其最后添加<security-constraint>、<security- role>等配置,设置相应Web应用中哪些角色对应用哪些资源具有访问权限,即在这里可以根据需要配置不同的角色,对应于不同的资源访问权限。如:
<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>public-resources</web-resource-name>
<url-pattern>/resources/*</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>
<!--
No roles required, it means that this are public resources !
Usefull to tell JOSSO that resources matching this security constraint
should not be subject to SSO protection.
-->
</security-constraint>
<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>
<!-- We only need tomcat to redirect the user -->
<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>
<security-role >
<description>Role 1</description>
<role-name>role1</role-name>
</security-role>
在项目根目录下新增login-redirect.jsp页面,代码如下:
<%@page contentType="text/html; charset=UTF-8" language="java" session="true" %>
<!--
Redirects the user to the proper login page. Configured as the login url the web.xml for this application.
-->
<%response.sendRedirect(request.getContextPath() + "/josso_login/");%>
2.3.2 修改jboss-web.xml
设置<security-domain>,必须与login-config.xml中的josso login模型名称一致,我这里名称为josso,故配置为java:/jaas/josso,如:
相关推荐
josso+tomcat配置之josso服务器配置(一)[参考].pdf
单点登录JOSSO中间件~~~~~实现多web系统单点登录问题
简单的翻译 关于josso2.3 版本第9--12章节的翻译
JOSSO(Java Open Single Sign-On)是一个开源的J2EE-based的SSO(单点登录)基础结构.它的目的是提供一种用来解决在统一平台上进行用户集中认证的方案.
上一篇的补充,这篇比较详细。而且补充了MD5加密算法的数据库录入实验法,所以本片更为完善,如果初次接触,建议先看上篇。
josso2 第二代JOSSO(Java开放式单点登录)。 请访问以获得文档。
本文只做交流,请各位江湖大侠指点。谢谢各位! 使用MySql5数据库和GlassfishV3服务器 加Josso1.8制作的单点登录范例。
资源来自pypi官网。 资源全名:python-josso-auth-0.1.3.tar.gz
NULL 博文链接:https://lindows.iteye.com/blog/300564
Atricore的JOSSO是一种开源且受商业支持的Internet单点登录(FSSO)解决方案,用于点击和基于标准(SAML2)的Internet规模SSO实施。 欲了解更多信息,请通过以下网址与我们联系:http://www.josso.org
一个开源的J2EE-based的SSO(SSO:单一登录技术是一种认证和授权机制,它允许注册用户只需要在任一成员网站上登录一次,而后授权访问其他连接的分支...它的目的是提供一种用来解决在统一平台上进行用户集中认证的方案.
决赛
结果在 target/dm2e-gui-deploy.zip 安装 unzip dm2e-gui-deploy.zip cd dm2e-gui-deploy bash bin/verify-install # fix all files mentioned here bash bin/start-fuseki.sh # to start fuseki, otherwise, ...
与大多数忽略或赋予大部分空白字符意义不大的编程语言不同,空白解释器忽略任何非空白字符。 只有空格、制表符和换行符才有意义。 这是用 PHP 编写的 Whitespace 解释器。 用法 $ git clone ...
这个项目是从 Shopizer 复制过来的( ) 该项目的目标是扩展通用商业 Commerce 站点... 店主目录经理的 CMS : Hippo( ) 关于产品的博客:Apache Roller ( ) 单点登录所有系统:JOSSO ( ) --> OPENAM( ) <已更改>