一、What is JOSSO ?
JOSSO, or Java Open Single Sign-On,是一个开源J2EE和Spring-based SSO为基础设施的,目的是提供一个集中,平台中立,用户认证和授权的解决方案。
Main Features主要特点
1) J2EE和SpringTransparent跨网域/跨组织的单点登录。
2) 可插拔的框架,以便执行自定义用Spring或内置的IoC容器的身份元件。
3) 通过自定义“加强”控制台,“ 5分钟”即时启动和部署,
4) Runs in Apache Tomcat.
5) Runs in JBoss application server.
6) Runs in BEA WebLogic 9 and WebLogic 10 application server
7) Runs in Apache Geronimo application server
8) Native Apache Httpd 2.x support thus enabling transparent SSO with Ruby, PHP, Python,Perl, etc. applications
9) Integrates with Spring Security for enabling fine-grained authorization.
10) Provides Identity information to Web applications and EJBs through the standard Servletand EJB Security API respectively.
11) Supports Strong Authentication using X.509 client certificates.
12) Windows认证
13) 支持ldap存储用户信息和证书。
14) 支持数据库存储用户信息和证书
15) 支持"Remember Me"
16) 支持找回密码
17) Client API for PHP. This allows to build SSO-enabled PHP applications.
18) Client API for Microsoft ASP. This allows to build SSO-enabled ASP applications.
19) Out-of-the-box branding support
20) Compatibility with Apache Pluto Portlet Container
21) Standard Based: JAAS, Web Services/SOAP, EJB, Struts, Servlet/JSP,J2EE.
22) 100% Java
二、josso + jboss 4.2.X(windows)
先决条件
我们需要:
· JDK 1.5
· jboss-4.2.3.GA
· JOSSO 1.8 Binaries
1、josso 部署控制台
D:/Tools/josso-1.8.0/bin> josso-gsh
__ _____ _____ _____ _____
__| | | __| __| |
| | | | |__ |__ | | |
|_____|_____|_____|_____|_____|
JOSSO (1.8.0)
Type 'help' for more information.
--------------------------------------
josso>
2、安装 the Gateway (IdP)
运行命令如下:
josso> gateway install - -target c:/jboss-4.2.3.GA - -jboss-instance default - -platform jb42
您应该会看到像这样:
josso> gateway install --target c:/jboss-4.2.3.GA --jboss-instance default --platform jb42
Deploying JBoss AS 4.2.x JOSSO Gateway v.1.8.0
Verify Target JBoss AS 4.2.x
JBoss AS 4.2.x [OK ] Directory Layout
JBossHome [OK ]
Install JOSSO Gateway Configuration
Generating ['Remember Me' AES key] [OK ] Created file:///tmp/josso-auth.properties
Installing [josso-auth.properties] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-auth.properties
Using ['memory' default configuration] [OK ] Installing josso-gateway-memory-stores.xml as josso-gateway-stores.xml
Installing [josso-gateway-memory-stores.xml] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-gateway-stores.xml
Installing [josso-gateway-memory-stores.xml] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-gateway-memory-stores.xml
Installing [josso-gateway-ldap-stores.xml] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-gateway-ldap-stores.xml
Installing [josso-gateway-web.xml] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-gateway-web.xml
Installing [josso-gateway-selfservices.xml] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-gateway-selfservices.xml
Installing [josso-gateway-jmx.xml] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-gateway-jmx.xml
Installing [josso-gateway-auth.xml] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-gateway-auth.xml
Installing [josso-users.xml] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-users.xml
Installing [josso-credentials.xml] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-credentials.xml
Installing [josso-gateway-db-stores.xml] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-gateway-db-stores.xml
Installing [josso-gateway-config.xml] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-gateway-config.xml
Deploy JOSSO Gateway Application
Installing [] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/deploy/josso.war
Unjar [josso-gateway-web-1.8.0.war] [OK ]
file:/// c:/jboss-4.2.3.GA/server/default/deploy
JBoss AS 4.2.x JOSSO Gateway v.1.8.0
Overall Installation [OK ] Successfull!
Congratulations! You successfully installed the gateway.
Now Follow the JOSSO Gateway Configuration guide and setup JOSSO for your needs!
josso>
3、安装 the Gateway (IdP)
运行命令如下:
josso> agent install - -target c:/jboss-4.2.3.GA - -jboss-instance default - -platform jb42
您应该会看到像这样:
josso> agent install -–target c:/jboss-4.2.3.GA --jboss-instance default --platform jb42
Installing JBoss AS 4.2.x JOSSO Agent v.1.8.0
Verify Target JBoss AS 4.2.x
JBoss AS 4.2.x [OK ] Directory Layout
JBossHome [OK ]
Installing JOSSO 3rd party JARs
Installing [spring-aop-2.5.5.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/spring-aop-2.5.5.jar
Installing [commons-beanutils-1.6.1.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/commons-beanutils-1.6.1.jar
Installing [commons-discovery-0.2.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/commons-discovery-0.2.jar
Installing [commons-lang-2.0.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/commons-lang-2.0.jar
Installing [commons-digester-1.5.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/commons-digester-1.5.jar
Installing [spring-beans-2.5.5.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/spring-beans-2.5.5.jar
Installing [activation-1.1.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/activation-1.1.jar
Installing [aopalliance-1.0.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/aopalliance-1.0.jar
Installing [xbean-spring-3.4.3.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/xbean-spring-3.4.3.jar
Installing [commons-collections-3.0.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/commons-collections-3.0.jar
Installing [commons-modeler-1.1.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/commons-modeler-1.1.jar
Installing [axis-saaj-1.4.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/axis-saaj-1.4.jar
Installing [commons-httpclient-3.1.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/commons-httpclient-3.1.jar
Installing [commons-logging-api-1.0.4.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/commons-logging-api-1.0.4.jar
Installing [axis-jaxrpc-1.4.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/axis-jaxrpc-1.4.jar
Installing [commons-codec-1.3.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/commons-codec-1.3.jar
Installing [axis-1.4.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/axis-1.4.jar
Installing [spring-core-2.5.5.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/spring-core-2.5.5.jar
Installing [spring-context-2.5.5.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/spring-context-2.5.5.jar
Installing [axis-ant-1.4.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/axis-ant-1.4.jar
Installing [commons-logging-1.0.4.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/commons-logging-1.0.4.jar
Installing JOSSO Agent JARs
Installing [josso-tomcat55-agent-1.8.0.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/josso-tomcat55-agent-1.8.0.jar
Installing [josso-agents-bin-1.8.0.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/josso-agents-bin-1.8.0.jar
Installing [josso-agent-shared-1.8.0.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/josso-agent-shared-1.8.0.jar
Installing [josso-jboss42-agent-1.8.0.jar] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/lib/josso-jboss42-agent-1.8.0.jar
Installing JOSSO Agent JARs from Source
Configuring Container
Removed [Tomcat default Realm ] [OK ] org.jboss.web.tomcat.security.JBossSecurityMgrRealm
Configured [JOSSO JAAS Realm ] [OK ] org.josso.jb42.agent.JBossCatalinaRealm
Configured [JOSSO Agent Valve ] [OK ]
org.josso.tc55.agent.SSOAgentValve
Backup [server.xml] [OK ]
file:/// c:/jboss-4.2.3.GA/server/default/deploy/jboss-web.deployer/server.xml.bkp.1
Save [server.xml] [OK ]
file:/// c:/jboss-4.2.3.GA/server/default/deploy/jboss-web.deployer/server.xml
Configured [JOSSO JAAS Login Module ] [OK ] org.josso.jb42.agent.JBossSSOGatewayLoginModule
Backup [login-config.xml] [OK ]
file:/// c:/jboss-4.2.3.GA/server/default/conf/login-config.xml.bkp.1
Save [login-config.xml] [OK ]
file:/// c:/jboss-4.2.3.GA/server/default/conf/login-config.xml
Installing JOSSO Agent Configuration files
Installing [josso-agent-config.xml] [OK ] Created
file:/// c:/jboss-4.2.3.GA/server/default/conf/josso-agent-config.xml
JBoss AS 4.2.x JOSSO Agent v.1.8.0
Overall Installation [OK ] Successfull!
Congratulations! You successfully installed the agent.
Now Follow the JOSSO Agent Configuration guide and setup your SSO Partner applications !
4、安装Samples
运行Samples安装命令如下:
josso> samples install --target c:/jboss-4.2.3.GA --jboss-instance default --platform jb42
5、运行测试
好了,启动jboss
现在可以访问这个简单的应用程序 http://localhost:8080/partnerapp/ ,按照介绍,你应该可以到这个登录页面