一、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/ ,按照介紹,你應該可以到這個登錄頁面