|
| 1 | +<components> |
| 2 | + |
| 3 | + <component id="controller" class="springpython.remoting.pyro.PyroProxyFactory"> |
| 4 | + <property name="serviceUrl">"PYROLOC://localhost:7766/Controller"</property> |
| 5 | + </component> |
| 6 | + |
| 7 | + <component id="view" class="view.PetClinicView"> |
| 8 | + <property name="controller" local="controller"/> |
| 9 | + </component> |
| 10 | + |
| 11 | + <component id="userDetailsService" class="springpython.remoting.pyro.PyroProxyFactory"> |
| 12 | + <property name="serviceUrl">"PYROLOC://localhost:7766/UserDetails"</property> |
| 13 | + </component> |
| 14 | + |
| 15 | + <component id="userDetailsService2" class="springpython.security.userdetails.InMemoryUserDetailsService"> |
| 16 | + <property name="userMap"> |
| 17 | + { |
| 18 | + "jcarter": ("password6", ["VET_ANY"], True), |
| 19 | + } |
| 20 | + </property> |
| 21 | + </component> |
| 22 | + |
| 23 | + <component id="userDetailsService3" class="springpython.security.userdetails.InMemoryUserDetailsService"> |
| 24 | + <property name="userMap"> |
| 25 | + { |
| 26 | + "jcoleman": ("password5", ["CUSTOMER_ANY"], True) |
| 27 | + } |
| 28 | + </property> |
| 29 | + </component> |
| 30 | + |
| 31 | + <component id="md5Encoder" class="springpython.security.providers.encoding.Md5PasswordEncoder"/> |
| 32 | + |
| 33 | + <component id="shaEncoder" class="springpython.security.providers.encoding.ShaPasswordEncoder"/> |
| 34 | + |
| 35 | + <component id="md5UserDetailsService" class="controller.PreencodingUserDetailsService"> |
| 36 | + <property name="wrappedUserDetailsService" local="userDetailsService2"/> |
| 37 | + <property name="encoder" local="md5Encoder"/> |
| 38 | + </component> |
| 39 | + |
| 40 | + <component id="shaUserDetailsService" class="controller.PreencodingUserDetailsService"> |
| 41 | + <property name="wrappedUserDetailsService" local="userDetailsService3"/> |
| 42 | + <property name="encoder" local="shaEncoder"/> |
| 43 | + </component> |
| 44 | + |
| 45 | + <component id="plainEncoder" class="springpython.security.providers.encoding.PlaintextPasswordEncoder"/> |
| 46 | + |
| 47 | + <component id="plainAuthenticationProvider" class="springpython.security.providers.dao.DaoAuthenticationProvider"> |
| 48 | + <property name="userDetailsService" local="userDetailsService"/> |
| 49 | + <property name="passwordEncoder" local="plainEncoder"/> |
| 50 | + </component> |
| 51 | + |
| 52 | + <component id="md5AuthenticationProvider" class="springpython.security.providers.dao.DaoAuthenticationProvider"> |
| 53 | + <property name="userDetailsService" local="md5UserDetailsService"/> |
| 54 | + <property name="passwordEncoder" local="md5Encoder"/> |
| 55 | + </component> |
| 56 | + |
| 57 | + <component id="shaAuthenticationProvider" class="springpython.security.providers.dao.DaoAuthenticationProvider"> |
| 58 | + <property name="userDetailsService" local="shaUserDetailsService"/> |
| 59 | + <property name="passwordEncoder" local="shaEncoder"/> |
| 60 | + </component> |
| 61 | + |
| 62 | + <component id="authenticationManager" class="springpython.security.providers.AuthenticationManager"> |
| 63 | + <property name="authenticationProviderList"> |
| 64 | + <list local="plainAuthenticationProvider"/> |
| 65 | + <list local="md5AuthenticationProvider"/> |
| 66 | + <list local="shaAuthenticationProvider"/> |
| 67 | + </property> |
| 68 | + </component> |
| 69 | + |
| 70 | + <component id="vetRoleVoter" class="springpython.security.vote.RoleVoter"> |
| 71 | + <property name="rolePrefix">"VET"</property> |
| 72 | + </component> |
| 73 | + |
| 74 | + <component id="customerRoleVoter" class="springpython.security.vote.RoleVoter"> |
| 75 | + <property name="rolePrefix">"CUSTOMER"</property> |
| 76 | + </component> |
| 77 | + |
| 78 | + <component id="ownerVoter" class="controller.OwnerVoter"> |
| 79 | + <property name="controller" local="controller"/> |
| 80 | + </component> |
| 81 | + |
| 82 | + <component id="accessDecisionManager" class="springpython.security.vote.AffirmativeBased"> |
| 83 | + <property name="allowIfAllAbstainDecisions">False</property> |
| 84 | + <property name="accessDecisionVoterList"> |
| 85 | + <list local="vetRoleVoter"/> |
| 86 | + <list local="customerRoleVoter"/> |
| 87 | + <list local="ownerVoter"/> |
| 88 | + </property> |
| 89 | + </component> |
| 90 | + |
| 91 | + <component id="cherrypySessionStrategy" class="springpython.security.web.CherryPySessionStrategy"/> |
| 92 | + |
| 93 | + <component id="redirectStrategy" class="springpython.security.web.RedirectStrategy"/> |
| 94 | + |
| 95 | + <component id="httpContextFilter" class="springpython.security.web.HttpSessionContextIntegrationFilter"> |
| 96 | + <property name="sessionStrategy" local="cherrypySessionStrategy"/> |
| 97 | + </component> |
| 98 | + |
| 99 | + <component id="authenticationProcessingFilter" class="springpython.security.web.AuthenticationProcessingFilter"> |
| 100 | + <property name="authenticationManager" local="authenticationManager"/> |
| 101 | + <property name="alwaysReauthenticate">False</property> |
| 102 | + </component> |
| 103 | + |
| 104 | + <component id="filterSecurityInterceptor" class="springpython.security.web.FilterSecurityInterceptor"> |
| 105 | + <property name="validateConfigAttributes">False</property> |
| 106 | + <property name="authenticationManager" local="authenticationManager"/> |
| 107 | + <property name="accessDecisionManager" local="accessDecisionManager"/> |
| 108 | + <property name="sessionStrategy" local="cherrypySessionStrategy"/> |
| 109 | + <property name="objectDefinitionSource"> |
| 110 | + [ |
| 111 | + ("/vets.*", ["VET_ANY"]), |
| 112 | + ("/editOwner.*", ["VET_ANY", "OWNER"]), |
| 113 | + ("/.*", ["VET_ANY", "CUSTOMER_ANY"]) |
| 114 | + ] |
| 115 | + </property> |
| 116 | + </component> |
| 117 | + |
| 118 | + <component id="exceptionFilter" class="springpython.security.web.MiddlewareFilter"> |
| 119 | + <property name="clazz">"paste.evalexception.middleware.EvalException"</property> |
| 120 | + <property name="appAttribute">"application"</property> |
| 121 | + </component> |
| 122 | + |
| 123 | + <component id="authenticationProcessingFilterEntryPoint" class="springpython.security.web.AuthenticationProcessingFilterEntryPoint"> |
| 124 | + <property name="loginFormUrl">"/login"</property> |
| 125 | + <property name="redirectStrategy" local="redirectStrategy"/> |
| 126 | + </component> |
| 127 | + |
| 128 | + <component id="accessDeniedHandler" class="springpython.security.web.SimpleAccessDeniedHandler"> |
| 129 | + <property name="errorPage">"/accessDenied"</property> |
| 130 | + <property name="redirectStrategy" local="redirectStrategy"/> |
| 131 | + </component> |
| 132 | + |
| 133 | + <component id="exceptionTranslationFilter" class="springpython.security.web.ExceptionTranslationFilter"> |
| 134 | + <property name="authenticationEntryPoint" local="authenticationProcessingFilterEntryPoint"/> |
| 135 | + <property name="accessDeniedHandler" local="accessDeniedHandler"/> |
| 136 | + </component> |
| 137 | + |
| 138 | + <component id="filterChainProxy" class="springpython.security.web.FilterChainProxy"> |
| 139 | + <property name="filterInvocationDefinitionSource"> |
| 140 | + [ |
| 141 | + ("/images.*", ["exceptionFilter", ]), |
| 142 | + ("/html.*", ["exceptionFilter", ]), |
| 143 | + ("/login.*", ["exceptionFilter", "httpContextFilter"]), |
| 144 | + ("/.*", ["exceptionFilter", "httpContextFilter", "exceptionTranslationFilter", "authenticationProcessingFilter", "filterSecurityInterceptor"]) |
| 145 | + ] |
| 146 | + </property> |
| 147 | + </component> |
| 148 | + |
| 149 | + <component id="loginForm" class="view.CherryPyAuthenticationForm"> |
| 150 | + <property name="filter" local="authenticationProcessingFilter"/> |
| 151 | + <property name="controller" local="controller"/> |
| 152 | + <property name="hashedUserDetailsServiceList"> |
| 153 | + <list local="md5UserDetailsService"/> |
| 154 | + <list local="shaUserDetailsService"/> |
| 155 | + </property> |
| 156 | + <property name="authenticationManager" local="authenticationManager"/> |
| 157 | + <property name="redirectStrategy" local="redirectStrategy"/> |
| 158 | + </component> |
| 159 | + |
| 160 | +</components> |