From f9486b50bbf6f92a4549203c1ede21ba912989c0 Mon Sep 17 00:00:00 2001 From: Michael DÜrre Date: Wed, 17 Feb 2021 08:48:52 +0100 Subject: add unit tests for oauth-provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add unit tests and some fixes for oauth provider Issue-ID: CCSDK-3169 Signed-off-by: Michael DÜrre Change-Id: I88c5b2123df7e0c6e49b087c3cc7d24130be5bff --- .../src/test/resources/aaa-app-config.test.xml | 351 +++++++++++++++++++++ 1 file changed, 351 insertions(+) create mode 100644 sdnr/wt/oauth-provider/provider-jar/src/test/resources/aaa-app-config.test.xml (limited to 'sdnr/wt/oauth-provider/provider-jar/src/test/resources/aaa-app-config.test.xml') diff --git a/sdnr/wt/oauth-provider/provider-jar/src/test/resources/aaa-app-config.test.xml b/sdnr/wt/oauth-provider/provider-jar/src/test/resources/aaa-app-config.test.xml new file mode 100644 index 000000000..017c7439d --- /dev/null +++ b/sdnr/wt/oauth-provider/provider-jar/src/test/resources/aaa-app-config.test.xml @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ tokenAuthRealm + org.onap.ccsdk.features.sdnr.wt.oauthprovider.OAuth2Realm +
+ + + + + + + + + + + +
+ securityManager.realms + $tokenAuthRealm +
+ +
+ authcBasic + org.opendaylight.aaa.shiro.filters.ODLHttpAuthenticationFilter +
+
+ anyroles + org.opendaylight.aaa.shiro.filters.AnyRoleHttpAuthenticationFilter +
+
+ authcBearer + org.opendaylight.aaa.shiro.filters.ODLHttpAuthenticationFilter2 +
+ + + + +
+ accountingListener + org.opendaylight.aaa.shiro.filters.AuthenticationListener +
+
+ securityManager.authenticator.authenticationListeners + $accountingListener +
+ + +
+ dynamicAuthorization + org.opendaylight.aaa.shiro.realm.MDSALDynamicAuthorizationFilter +
+ + + + + + + + + /**/operations/cluster-admin** + dynamicAuthorization + + + /**/v1/** + authcBearer, roles[admin] + + + /**/config/aaa*/** + authcBearer, roles[admin] + + + /oauth/** + anon + + + /odlux/** + anon + + + /apidoc/** + authcBasic, roles[admin] + + + /test123/** + authcBasic + + + /rests/** + authcBearer, anyroles["admin,provision"] + + + /** + authcBearer, anyroles["admin,provision"] + +
+ -- cgit 1.2.3-korg