1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=4 tabstop=4: -->
4 Copyright © 2017 Brocade Communications Systems and others. All rights reserved.
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
10 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
11 xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
12 xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
13 odl:use-default-for-reference-types="true">
15 <odl:clustered-app-config
16 binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.aaa.app.config.rev170619.ShiroConfiguration"
17 id="shiroConfiguration" default-config-file-name="aaa-app-config.xml" />
19 <odl:clustered-app-config id="datastoreConfig"
20 default-config-file-name="aaa-datastore-config.xml"
21 binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.aaa.app.config.rev170619.DatastoreConfig" />
23 <reference id="passwordService" interface="org.opendaylight.aaa.api.password.service.PasswordHashService"
26 <bean id="idmStore" class="org.opendaylight.aaa.datastore.h2.H2Store">
27 <argument value="${dbUsername}" />
28 <argument value="${dbPassword}" />
29 <argument ref="passwordService" />
32 <bean id="idmLightProxy" class="org.opendaylight.aaa.shiro.idm.IdmLightProxy">
33 <argument ref="idmStore" />
34 <argument ref="passwordService" />
37 <bean id="authService" class="org.opendaylight.aaa.shiro.tokenauthrealm.auth.AuthenticationManager"/>
39 <service ref="idmStore" interface="org.opendaylight.aaa.api.IIDMStore" odl:type="default"/>
41 <service ref="idmLightProxy" odl:type="default">
43 <value>org.opendaylight.aaa.api.IdMService</value>
44 <value>org.opendaylight.aaa.api.CredentialAuth</value>
45 <value>org.opendaylight.aaa.api.ClaimCache</value>
49 <reference id="dataBroker"
50 interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
53 <reference id="certManager"
54 interface="org.opendaylight.aaa.cert.api.ICertificateManager"
55 odl:type="default-certificate-manager" />
57 <reference id="httpService"
58 interface="org.osgi.service.http.HttpService"/>
60 <!-- TODO: when we migrate off h2 towards the MD-SAL DS, get rid of this. -->
61 <cm:property-placeholder persistent-id="org.opendaylight.aaa.h2">
62 <cm:default-properties>
63 <cm:property name="dbUsername" value="foo" />
64 <cm:property name="dbPassword" value="bar" />
65 </cm:default-properties>
66 </cm:property-placeholder>
69 class="org.opendaylight.aaa.AAAShiroProvider"
70 init-method="init" destroy-method="close">
71 <argument ref="dataBroker" />
72 <argument ref="certManager" />
73 <argument ref="idmLightProxy" />
74 <argument ref="shiroConfiguration" />
75 <argument ref="httpService" />
76 <argument value="/moon" />
77 <argument value="/oauth2" />
78 <argument ref="datastoreConfig" />
79 <argument ref="idmStore" />
80 <argument ref="authService" />
81 <argument ref="passwordService" />
84 <bean id="authenticator" class="org.opendaylight.aaa.authenticator.ODLAuthenticator" />
85 <service ref="authenticator" interface="org.jolokia.osgi.security.Authenticator" />
87 <bean id="shiroWebEnvLoader" class="org.opendaylight.aaa.shiro.web.env.ShiroWebEnvironmentLoaderListener">
88 <argument ref="shiroConfiguration"/>
89 <argument ref="dataBroker"/>
90 <argument ref="certManager"/>
91 <argument ref="authService" />
93 <bean factory-ref="provider" factory-method="getTokenAuthenticators"/>
96 <bean factory-ref="provider" factory-method="getTokenStore"/>
98 <argument ref="passwordService" />
101 <reference id="customFilterAdapterConfig"
102 interface="org.opendaylight.aaa.filterchain.configuration.CustomFilterAdapterConfiguration"/>
104 <bean id="webContextSecurer" class="org.opendaylight.aaa.shiro.web.env.ShiroWebContextSecurer">
105 <argument ref="shiroWebEnvLoader"/>
107 <service ref="webContextSecurer" interface="org.opendaylight.aaa.web.WebContextSecurer" />
109 <reference id="webServer" interface="org.opendaylight.aaa.web.WebServer" />
111 <reference id="servletSupport" interface="org.opendaylight.aaa.web.servlet.ServletSupport" />
113 <bean id="webInitializer" class="org.opendaylight.aaa.shiro.web.env.WebInitializer" destroy-method="close">
114 <argument ref="webServer"/>
115 <argument ref="idmLightProxy"/>
116 <argument ref="idmStore"/>
117 <argument ref="webContextSecurer"/>
118 <argument ref="servletSupport"/>
119 <argument ref="customFilterAdapterConfig"/>