deployerConfigContext.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
  3. <!--
  4. | deployerConfigContext.xml centralizes into one file some of the declarative configuration that
  5. | all CAS deployers will need to modify.
  6. |
  7. | This file declares some of the Spring-managed JavaBeans that make up a CAS deployment.
  8. | The beans declared in this file are instantiated at context initialization time by the Spring
  9. | ContextLoaderListener declared in web.xml. It finds this file because this
  10. | file is among those declared in the context parameter "contextConfigLocation".
  11. |
  12. | By far the most common change you will need to make in this file is to change the last bean
  13. | declaration to replace the default SimpleTestUsernamePasswordAuthenticationHandler with
  14. | one implementing your approach for authenticating usernames and passwords.
  15. +-->
  16. <beans>
  17. <!--
  18. | This bean declares our AuthenticationManager. The CentralAuthenticationService service bean
  19. | declared in applicationContext.xml picks up this AuthenticationManager by reference to its id,
  20. | "authenticationManager". Most deployers will be able to use the default AuthenticationManager
  21. | implementation and so do not need to change the class of this bean. We include the whole
  22. | AuthenticationManager here in the userConfigContext.xml so that you can see the things you will
  23. | need to change in context.
  24. +-->
  25. <bean id="authenticationManager"
  26. class="org.jasig.cas.authentication.AuthenticationManagerImpl">
  27. <!--
  28. | This is the List of CredentialToPrincipalResolvers that identify what Principal is trying to authenticate.
  29. | The AuthenticationManagerImpl considers them in order, finding a CredentialToPrincipalResolver which
  30. | supports the presented credentials.
  31. |
  32. | AuthenticationManagerImpl uses these resolvers for two purposes. First, it uses them to identify the Principal
  33. | attempting to authenticate to CAS /login . In the default configuration, it is the DefaultCredentialsToPrincipalResolver
  34. | that fills this role. If you are using some other kind of credentials than UsernamePasswordCredentials, you will need to replace
  35. | DefaultCredentialsToPrincipalResolver with a CredentialsToPrincipalResolver that supports the credentials you are
  36. | using.
  37. |
  38. | Second, AuthenticationManagerImpl uses these resolvers to identify a service requesting a proxy granting ticket.
  39. | In the default configuration, it is the HttpBasedServiceCredentialsToPrincipalResolver that serves this purpose.
  40. | You will need to change this list if you are identifying services by something more or other than their callback URL.
  41. +-->
  42. <property name="credentialsToPrincipalResolvers">
  43. <list>
  44. <!--
  45. | UsernamePasswordCredentialsToPrincipalResolver supports the UsernamePasswordCredentials that we use for /login
  46. | by default and produces SimplePrincipal instances conveying the username from the credentials.
  47. |
  48. | If you've changed your LoginFormAction to use credentials other than UsernamePasswordCredentials then you will also
  49. | need to change this bean declaration (or add additional declarations) to declare a CredentialsToPrincipalResolver that supports the
  50. | Credentials you are using.
  51. +-->
  52. <!--<bean
  53. class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />-->
  54. <!--
  55. | HttpBasedServiceCredentialsToPrincipalResolver supports HttpBasedCredentials. It supports the CAS 2.0 approach of
  56. | authenticating services by SSL callback, extracting the callback URL from the Credentials and representing it as a
  57. | SimpleService identified by that callback URL.
  58. |
  59. | If you are representing services by something more or other than an HTTPS URL whereat they are able to
  60. | receive a proxy callback, you will need to change this bean declaration (or add additional declarations).
  61. +-->
  62. <bean
  63. class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
  64. <bean
  65. class="com.kingdee.eas.cp.eip.sso.web.server.EASCredentialsToPrincipalResolver" />
  66. </list>
  67. </property>
  68. <!--
  69. | Whereas CredentialsToPrincipalResolvers identify who it is some Credentials might authenticate,
  70. | AuthenticationHandlers actually authenticate credentials. Here we declare the AuthenticationHandlers that
  71. | authenticate the Principals that the CredentialsToPrincipalResolvers identified. CAS will try these handlers in turn
  72. | until it finds one that both supports the Credentials presented and succeeds in authenticating.
  73. +-->
  74. <property name="authenticationHandlers">
  75. <list>
  76. <!--
  77. | This is the authentication handler that authenticates services by means of callback via SSL, thereby validating
  78. | a server side SSL certificate.
  79. +-->
  80. <bean
  81. class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" />
  82. <!--
  83. | This is the authentication handler declaration that every CAS deployer will need to change before deploying CAS
  84. | into production. The default SimpleTestUsernamePasswordAuthenticationHandler authenticates UsernamePasswordCredentials
  85. | where the username equals the password. You will need to replace this with an AuthenticationHandler that implements your
  86. | local authentication strategy. You might accomplish this by coding a new such handler and declaring
  87. | edu.someschool.its.cas.MySpecialHandler here, or you might use one of the handlers provided in the adaptors modules.
  88. +-->
  89. <!--<bean
  90. class="org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler" />-->
  91. <bean
  92. class="com.kingdee.eas.cp.eip.sso.web.server.EASAuthHandlerForCas3" />
  93. </list>
  94. </property>
  95. </bean>
  96. </beans>