Do not use blueprint-cm
[aaa.git] / aaa-shiro / impl / src / main / resources / OSGI-INF / blueprint / impl-blueprint.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=4 tabstop=4: -->
3 <!--
4 Copyright © 2017 Brocade Communications Systems and others. All rights reserved.
5
6 This program and the accompanying materials are made available under the
7 terms of the Eclipse Public License v1.0 which accompanies this distribution,
8 and is available at http://www.eclipse.org/legal/epl-v10.html
9 -->
10 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
11   xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
12   odl:use-default-for-reference-types="true">
13
14   <odl:clustered-app-config
15           binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.aaa.app.config.rev170619.ShiroConfiguration"
16           id="shiroConfiguration" default-config-file-name="aaa-app-config.xml" />
17
18   <odl:clustered-app-config id="datastoreConfig"
19         default-config-file-name="aaa-datastore-config.xml"
20         binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.aaa.app.config.rev170619.DatastoreConfig" />
21
22   <reference id="authService" interface="org.opendaylight.aaa.api.AuthenticationService"/>
23   <reference id="passwordService" interface="org.opendaylight.aaa.api.password.service.PasswordHashService"/>
24   <reference id="idmStore" interface ="org.opendaylight.aaa.api.IIDMStore"/>
25
26   <reference id="passwordCredentialAuth" interface="org.opendaylight.aaa.api.PasswordCredentialAuth"/>
27   <reference id="claimCache" interface="org.opendaylight.aaa.api.ClaimCache"/>
28
29   <reference id="dataBroker"
30     interface="org.opendaylight.mdsal.binding.api.DataBroker"
31     odl:type="default" />
32
33   <reference id="certManager"
34     interface="org.opendaylight.aaa.cert.api.ICertificateManager"
35     odl:type="default-certificate-manager" />
36
37   <reference id="httpService"
38              interface="org.osgi.service.http.HttpService"/>
39
40   <bean id="provider"
41         class="org.opendaylight.aaa.AAAShiroProvider"
42         init-method="init" destroy-method="close">
43     <argument ref="dataBroker" />
44     <argument ref="certManager" />
45     <argument ref="passwordCredentialAuth" />
46     <argument ref="shiroConfiguration" />
47     <argument ref="httpService" />
48     <argument value="/moon" />
49     <argument value="/oauth2" />
50     <argument ref="datastoreConfig" />
51     <argument ref="idmStore" />
52     <argument ref="authService" />
53     <argument ref="passwordService" />
54   </bean>
55
56   <bean id="shiroWebEnvLoader" class="org.opendaylight.aaa.shiro.web.env.ShiroWebEnvironmentLoaderListener">
57     <argument ref="shiroConfiguration"/>
58     <argument ref="dataBroker"/>
59     <argument ref="certManager"/>
60     <argument ref="authService" />
61     <argument>
62       <bean factory-ref="provider" factory-method="getTokenAuthenticators"/>
63     </argument>
64     <argument>
65       <bean factory-ref="provider" factory-method="getTokenStore"/>
66     </argument>
67     <argument ref="passwordService" />
68   </bean>
69
70   <reference id="customFilterAdapterConfig"
71       interface="org.opendaylight.aaa.filterchain.configuration.CustomFilterAdapterConfiguration"/>
72
73   <bean id="webContextSecurer" class="org.opendaylight.aaa.shiro.web.env.ShiroWebContextSecurer">
74     <argument ref="shiroWebEnvLoader"/>
75   </bean>
76   <service ref="webContextSecurer" interface="org.opendaylight.aaa.web.WebContextSecurer" />
77
78   <reference id="webServer" interface="org.opendaylight.aaa.web.WebServer" />
79
80   <reference id="servletSupport" interface="org.opendaylight.aaa.web.servlet.ServletSupport" />
81
82   <bean id="webInitializer" class="org.opendaylight.aaa.shiro.web.env.WebInitializer" destroy-method="close">
83     <argument ref="webServer"/>
84     <argument ref="claimCache"/>
85     <argument ref="idmStore"/>
86     <argument ref="webContextSecurer"/>
87     <argument ref="servletSupport"/>
88     <argument ref="customFilterAdapterConfig"/>
89   </bean>
90 </blueprint>