Central Authentication Service

 

国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html
内部邀请码:C8E245J (不写邀请码,没有现金送)
国内私募机构九鼎控股打造,九鼎投资是在全国股份转让系统挂牌的公众公司,股票代码为430719,为“中国PE第一股”,市值超1000亿元。 

 

 

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 

 

 

http://docs.jboss.com/jbportal/v2.7.1/referenceGuide/html/sso.html#d0e11667

21.3. CAS - Central Authentication Service

This Single Sign On plugin enables seamless integration between JBoss Portal and the CAS Single Sign On Framework. Details about CAS can be found here

21.3.1. Integration steps

Note

The steps below assume that CAS server and JBoss Portal will be deployed on the same JBoss Application Server instance. CAS will be configured to leverage identity services exposed by JBoss Portal to perform authentication. Procedure may be slightly different for other deployment scenarios. Both JBoss Portal and CAS will need to be configured to authenticate against same database or LDAP server. Please see CAS documentation to learn how to setup it up against proper identity store.

Note

Configuration below assumes that JBoss Application Server is HTTPS enabled and operates on standard ports: 80 (for HTTP) and 443 (for HTTPS).

  1. Install CAS server (v 3.0.7). This should be as simple as deploying single cas.war file.
  2. Copy portal-identity-lib.jar and portal-identity-sso-lib.jar files from$JBOSS_HOME/server/default/deploy/jboss-portal.sar/lib to$JBOSS_HOME/server/default/deploy/cas.war/WEB-INF/lib.
  3. Edit $JBOSS_HOME/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF/context.xml file and enable proper Apache Tomcat Valve by uncommenting following lines:
    <Valve className="org.jboss.portal.identity.sso.cas.CASAuthenticationValve"
       	casLogin="https://localhost/cas/login"
       	casValidate="https://localhost/cas/serviceValidate"
       	casServerName="localhost"
       	authType="FORM"
    />
    

    Update valve options as follow:

    • casLogin: URL of your CAS Authentication Server
    • casValidate: URL of your CAS Authentication Server validation service
    • casServerName: the hostname:port combination of your CAS Authentication Server

    Note

    CAS client requires to use SSL connection. To learn how to setup JBoss Application Server to use HTTPS see here

  4. Copy casclient.jar into $JBOSS_HOME/server/default/deploy/jboss-portal.sar/lib. You can download this file from CAS homepage or from JBoss repository underhttp://repository.jboss.com/cas/3.0.7/lib/

    Note

    The CAS engine does not accept self-signed SSL certificates. This requirement is fine for production use where a production level SSL certificate is available. However, for testing purposes, this can get a little annoying. Hence, if you are having this issue, you can usecasclient-lenient.jar instead.

  5. Edit $JBOSS_HOME/server/default/deploy/jboss-portal.sar/META-INF/jboss-service.xml file and uncomment following lines:
    <mbean
       code="org.jboss.portal.identity.sso.cas.CASAuthenticationService"
       name="portal:service=Module,type=CASAuthenticationService"
       xmbean-dd=""
       xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
       <xmbean/>
       <depends>portal:service=Module,type=IdentityServiceController</depends>
       <attribute name="HavingRole"></attribute>
    </mbean>
    

    This will expose special service in JBoss Portal that can be leveraged by CAS AuthenticationHandler if the server is deployed on the same application server instance. This AuthenticationHandler will be enabled in next 2 steps.

  6. Edit $JBOSS_HOME/server/default/deploy/cas.war/WEB-INF/deployerConfigContext.xml and add following line in the authenticationHandlers section:
    <bean class="org.jboss.portal.identity.sso.cas.CASAuthenticationHandler" />
    

    This can replace default SimpleTestUsernamePasswordAuthenticationHandler so whole part of this config file can look as follows:

                      <property name="authenticationHandlers">
      <list>
        <!--
         | This is the authentication handler that authenticates services by means of callback via SSL, thereby validating
         | a server side SSL certificate.
         +-->
        <bean
          class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler">
          <property
            name="httpClient"
            ref="httpClient" />
        </bean>
    
        <!--
         | This is the authentication handler declaration that every CAS deployer will need to change before deploying CAS
         | into production.  The default SimpleTestUsernamePasswordAuthenticationHandler authenticates UsernamePasswordCredentials
         | where the username equals the password.  You will need to replace this with an AuthenticationHandler that implements your
         | local authentication strategy.  You might accomplish this by coding a new such handler and declaring
         | edu.someschool.its.cas.MySpecialHandler here, or you might use one of the handlers provided in the adaptors modules.
         +-->
        <bean class="org.jboss.portal.identity.sso.cas.CASAuthenticationHandler" />
      </list>
    </property>
                   

To test the integration:

  • Go to your portal. Typically, http://localhost:8080/portal
  • Click on the "Login" link on the main portal page
  • This should bring up the CAS Authentication Server's login screen instead of the default JBoss Portal login screen
  • Input your portal username and password. For built-in portal login try user:user or admin:admin
  • If login is successful, you should be redirected back to the portal with the appropriate user logged in
时间: 2024-10-12 00:40:08

Central Authentication Service的相关文章

CAS(Central Authentication Service)——windows上简单搭建及测试

入手文章,大神绕行. 一,服务端搭建         我使用的服务端版本为:cas-server-3.4.11-release.zip.解压之后,将\cas-server-3.4.11-release\cas-server-3.4.11\modules\cas-server-webapp-3.4.11.war文件改名为cas.war,放置到tomcat的Tomcat\webapps目录下,之后启动tomcat.        之后进入*****\Tomcat\webapps\cas文件夹,修改两

在IBM Network Authentication Service for AIX中增强密码强度

了解如何使用 IBM Network Authentication Service (IBM Kerberos) for AIX 增强 Kerberos 用户的密码 引言 Kerberos主体密码是用来解锁密钥分发中心 (KDC)服务器应答的密钥,因此,如果该密码发生泄露, 就没有其他方法来核实主体的真实性.因而,管理员必须选择非常难于破解的密码,以免被他人破解而影 响系统的安全性. 您还可以建议最终用户提高密码的强度,并通知其密码策略相关内容.这是一种源自外部的保护,但 是,还需要通过内部机制

JEESZ分布式框架--单点登录集成方案

  JEESZ分布式框架单点登录集成方案第一节:单点登录简介 第一步:了解单点登录 SSO主要特点是: SSO应用之间使用Web协议(如HTTPS) ,并且只有一个登录入口. SSO的体系中有下面三种角色: 1) User(多个) 2) Web应用(多个) 3) SSO认证中心(一个) SSO实现包含以下三个原则: 1) 所有的登录都在 SSO 认证中心进行.   2) SSO认证中心通过一些方法来告诉Web应用当前访问用户究竟是不是通过认证的用户.   3) SSO认证中心和所有的 Web 应

Spring Security 4.0.0.RC2/3.2.6 发布

Spring Security 4.0.0.RC2 发布,此版本解决了大约 50 tickets. 主要改进: Support for enforcing Same Origin for WebSocket connections Refinements in WebSocket Configuration (SEC-2827 SEC-2833 SEC-2853 ) More intuitive HTTP Response Headers Configuration (SEC-2846) GA

前端需要了解的 SSO 与 CAS 知识

不管是什么公司,只要产品数量大于一个,那么单点登录势必是绕不过去的一个问题.作为前端程序员,我们对其虽然接触不多,但适当的了解还是必要的.本文就来谈谈单点登录相关的问题.  前置知识  了解 SSO,最好具备以下知识.当然,如果不是特别熟,也不影响阅读. cookie及session  浏览器同源策略及跨域  了解登录系统的构成  什么是 SSO 与 CAS? SSO SSO 是英文 Single Sign On 的缩写,翻译过来就是单点登录.顾名思义,它把两个及以上个产品中的用户登录逻辑抽离出

Spring Boot中集成Spring Security 专题

if语句中条件判断就是检查当前的url请求是否是logout-url的配置值,接下来,获取用户的authentication,并循环调用处理器链中各个处理器的logout()函数,前面在parse阶段说过,处理器链中有两个实例,处理会话的SecurityContextLogoutHandler及remember-me服务,我们来一一看看它们的logout函数实现: 2.1.0 SecurityContextLogoutHandler public void logout(HttpServletR

CAS实现SSO单点登录原理

一.不落俗套的开始 1.背景介绍 单点登录:Single Sign On,简称SSO,SSO使得在多个应用系统中,用户只需要登录一次就可以访问所有相互信任的应用系统. CAS框架:CAS(Central Authentication Service)是实现SSO单点登录的框架. 2.盗一张学习CAS绝大多都看过的图以及执行部分分析 注:已分不清原创,此处就不给出地址了. 从结构上看,CAS包含两个部分:CAS Server 和CAS Client需要独立部署,主要负责对用户的认证工作:CAS C

Web 单点登录系统 JA-SIG CAS

JA-SIG CAS(Central Authentication Service)为Web应用系统提供了单点登录服务.它的特性包括:一个开放和具有很好文档支持的协议:一个Java开源服务器组件:提供多种类型的客 户端包括Java..Net.PHP.Perl.Apache.uPortal等:能够与uPortal.BlueSocket.TikiWiki. Mule. Liferay.Moodle集成使用. -------------------------------------- 背景知识: 什

JEESZ-SSO解决方案

提醒:文档只是作为一个基础的参考,愿意了解的朋友可以随时咨询. 第一节:单点登录简介 第一步:了解单点登录 SSO主要特点是: SSO应用之间使用Web协议(如HTTPS),并且只有一个登录入口. SSO的体系中有下面三种角色: 1) User(多个) 2) Web应用(多个) 3) SSO认证中心(一个) SSO实现包含以下三个原则: 1)所有的登录都在SSO认证中心进行. 2) SSO认证中心通过一些方法来告诉Web应用当前访问用户究竟是不是通过认证的用户. 3) SSO认证中心和所有的We