Chore: Add gerrit maven verify GHA workflow
[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.opendaylight.aaa.shiro.realm.TokenAuthRealm</pair-value>-->
30         <pair-value>org.onap.ccsdk.features.sdnr.wt.oauthprovider.OAuth2Realm</pair-value>
31     </main>
32
33     <main>
34         <pair-key>securityManager.realms</pair-key>
35         <pair-value>$tokenAuthRealm</pair-value>
36     </main>
37     <!-- Used to support OAuth2 use case. -->
38     <main>
39         <pair-key>anyroles</pair-key>
40         <pair-value>org.onap.ccsdk.features.sdnr.wt.oauthprovider.filters.AnyRoleHttpAuthenticationFilter</pair-value>
41     </main>
42     <main>
43         <pair-key>authcBearer</pair-key>
44 <!--        <pair-value>org.apache.shiro.web.filter.authc.BearerHttpAuthenticationFilter</pair-value>-->
45         <pair-value>org.onap.ccsdk.features.sdnr.wt.oauthprovider.filters.BearerAndBasicHttpAuthenticationFilter</pair-value>
46     </main>
47
48     <!-- in order to track AAA challenge attempts -->
49     <main>
50         <pair-key>accountingListener</pair-key>
51         <pair-value>org.opendaylight.aaa.shiro.filters.AuthenticationListener</pair-value>
52     </main>
53     <main>
54         <pair-key>securityManager.authenticator.authenticationListeners</pair-key>
55         <pair-value>$accountingListener</pair-value>
56     </main>
57
58     <!-- Model based authorization scheme supporting RBAC for REST endpoints -->
59     <main>
60         <pair-key>dynamicAuthorization</pair-key>
61         <pair-value>org.onap.ccsdk.features.sdnr.wt.oauthprovider.filters.CustomizedMDSALDynamicAuthorizationFilter</pair-value>
62     </main>
63
64
65     <urls>
66         <pair-key>/**/operations/cluster-admin**</pair-key>
67         <pair-value>authcBearer, roles[admin]</pair-value>
68     </urls>
69     <urls>
70         <pair-key>/**/v1/**</pair-key>
71         <pair-value>authcBasic, roles[admin]</pair-value>
72     </urls>
73     <urls>
74         <pair-key>/**/config/aaa*/**</pair-key>
75         <pair-value>authcBasic, roles[admin]</pair-value>
76     </urls>
77      <urls>
78         <pair-key>/oauth/**</pair-key>
79         <pair-value>anon</pair-value>
80     </urls>
81     <urls>
82         <pair-key>/odlux/**</pair-key>
83         <pair-value>anon</pair-value>
84     </urls>
85     <urls>
86         <pair-key>/apidoc/**</pair-key>
87         <pair-value>authcBasic</pair-value>
88     </urls>
89     <urls>
90         <pair-key>/rests/**</pair-key>
91         <pair-value>authcBearer, anyroles["admin,provision"]</pair-value>
92     </urls>
93     <urls>
94         <pair-key>/**</pair-key>
95         <pair-value>authcBearer, roles[admin]</pair-value>
96     </urls>
97 </shiro-configuration>