643ed4de02760976b4a3be8a5e0fb6ea8ce6f6e5
[sdnc/oam.git] / installation / sdnc / src / main / resources / oauth-aaa-app-config.xml
1 <?xml version="1.0" ?>
2 <!--
3   ~ ============LICENSE_START=======================================================
4   ~ ONAP : ccsdk features
5   ~ ================================================================================
6   ~ Copyright (C) 2021 highstreet technologies GmbH Intellectual Property.
7   ~ All rights reserved.
8   ~ ================================================================================
9   ~ Licensed under the Apache License, Version 2.0 (the "License");
10   ~ you may not use this file except in compliance with the License.
11   ~ You may obtain a copy of the License at
12   ~
13   ~     http://www.apache.org/licenses/LICENSE-2.0
14   ~
15   ~ Unless required by applicable law or agreed to in writing, software
16   ~ distributed under the License is distributed on an "AS IS" BASIS,
17   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   ~ See the License for the specific language governing permissions and
19   ~ limitations under the License.
20   ~ ============LICENSE_END=======================================================
21   ~
22   -->
23
24 <shiro-configuration xmlns="urn:opendaylight:aaa:app:config">
25
26
27     <main>
28         <pair-key>tokenAuthRealm</pair-key>
29         <pair-value>org.onap.ccsdk.features.sdnr.wt.oauthprovider.OAuth2Realm</pair-value>
30     </main>
31
32     <main>
33         <pair-key>securityManager.realms</pair-key>
34         <pair-value>$tokenAuthRealm</pair-value>
35     </main>
36     <!-- Used to support OAuth2 use case. -->
37     <main>
38         <pair-key>authcBasic</pair-key>
39         <pair-value>org.opendaylight.aaa.shiro.filters.ODLHttpAuthenticationFilter</pair-value>
40     </main>
41     <main>
42         <pair-key>anyroles</pair-key>
43         <pair-value>org.opendaylight.aaa.shiro.filters.AnyRoleHttpAuthenticationFilter</pair-value>
44     </main>
45     <main>
46         <pair-key>authcBearer</pair-key>
47         <pair-value>org.opendaylight.aaa.shiro.filters.ODLHttpAuthenticationFilter2</pair-value>
48     </main>
49
50     <!-- in order to track AAA challenge attempts -->
51     <main>
52         <pair-key>accountingListener</pair-key>
53         <pair-value>org.opendaylight.aaa.shiro.filters.AuthenticationListener</pair-value>
54     </main>
55     <main>
56         <pair-key>securityManager.authenticator.authenticationListeners</pair-key>
57         <pair-value>$accountingListener</pair-value>
58     </main>
59
60     <!-- Model based authorization scheme supporting RBAC for REST endpoints -->
61     <main>
62         <pair-key>dynamicAuthorization</pair-key>
63         <pair-value>org.opendaylight.aaa.shiro.realm.MDSALDynamicAuthorizationFilter</pair-value>
64     </main>
65
66
67     <urls>
68         <pair-key>/**/operations/cluster-admin**</pair-key>
69         <pair-value>authcBearer, roles[admin]</pair-value>
70     </urls>
71     <urls>
72         <pair-key>/**/v1/**</pair-key>
73         <pair-value>authcBearer, roles[admin]</pair-value>
74     </urls>
75     <urls>
76         <pair-key>/**/config/aaa*/**</pair-key>
77         <pair-value>authcBearer, roles[admin]</pair-value>
78     </urls>
79      <urls>
80         <pair-key>/oauth/**</pair-key>
81         <pair-value>anon</pair-value>
82     </urls>
83     <urls>
84         <pair-key>/odlux/**</pair-key>
85         <pair-value>anon</pair-value>
86     </urls>
87     <urls>
88         <pair-key>/apidoc/**</pair-key>
89         <pair-value>authcBasic</pair-value>
90     </urls>
91     <urls>
92         <pair-key>/rests/**</pair-key>
93         <pair-value>authcBearer, anyroles["admin,provision"]</pair-value>
94     </urls>
95     <urls>
96         <pair-key>/**</pair-key>
97         <pair-value>authcBearer, anyroles["admin,provision"]</pair-value>
98     </urls>
99 </shiro-configuration>
100