From 17ca744723bd652f15d59d6c8555824f6e49018d Mon Sep 17 00:00:00 2001 From: Instrumental Date: Thu, 29 Mar 2018 16:54:19 -0500 Subject: Change groupID to match Garrit Project Issue-ID: AAF-206 Change-Id: I2f9f83c210a6741b6c25c8045466d0c7a8e31811 Signed-off-by: Instrumental --- cadi/cass/pom.xml | 6 +- .../main/java/com/att/aaf/cadi/cass/AAFBase.java | 2 +- .../onap/aaf/cadi/cass/JU_AAFAuthorizerTest.java | 109 --------------------- 3 files changed, 4 insertions(+), 113 deletions(-) delete mode 100644 cadi/cass/src/test/java/org/onap/aaf/cadi/cass/JU_AAFAuthorizerTest.java (limited to 'cadi/cass') diff --git a/cadi/cass/pom.xml b/cadi/cass/pom.xml index aa60bd83..c821c2f0 100644 --- a/cadi/cass/pom.xml +++ b/cadi/cass/pom.xml @@ -22,7 +22,7 @@ - org.onap.aaf.cadi + org.onap.aaf.authz.cadi parent 1.5.0-SNAPSHOT .. @@ -88,12 +88,12 @@ - org.onap.aaf.cadi + org.onap.aaf.authz.cadi aaf-cadi-core - org.onap.aaf.cadi + org.onap.aaf.authz.cadi aaf-cadi-aaf diff --git a/cadi/cass/src/main/java/com/att/aaf/cadi/cass/AAFBase.java b/cadi/cass/src/main/java/com/att/aaf/cadi/cass/AAFBase.java index b091cc95..932feb93 100644 --- a/cadi/cass/src/main/java/com/att/aaf/cadi/cass/AAFBase.java +++ b/cadi/cass/src/main/java/com/att/aaf/cadi/cass/AAFBase.java @@ -35,9 +35,9 @@ import org.apache.cassandra.auth.IAuthenticator; import org.apache.cassandra.config.DatabaseDescriptor; import org.apache.cassandra.exceptions.ConfigurationException; import org.onap.aaf.cadi.Access; +import org.onap.aaf.cadi.Access.Level; import org.onap.aaf.cadi.Lur; import org.onap.aaf.cadi.PropAccess; -import org.onap.aaf.cadi.Access.Level; import org.onap.aaf.cadi.aaf.AAFPermission; import org.onap.aaf.cadi.aaf.v2_0.AAFAuthn; import org.onap.aaf.cadi.aaf.v2_0.AAFCon; diff --git a/cadi/cass/src/test/java/org/onap/aaf/cadi/cass/JU_AAFAuthorizerTest.java b/cadi/cass/src/test/java/org/onap/aaf/cadi/cass/JU_AAFAuthorizerTest.java deleted file mode 100644 index 6f2e9da8..00000000 --- a/cadi/cass/src/test/java/org/onap/aaf/cadi/cass/JU_AAFAuthorizerTest.java +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************* - * ============LICENSE_START==================================================== - * * org.onap.aaf - * * =========================================================================== - * * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * * =========================================================================== - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * http://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * * ============LICENSE_END==================================================== - * * - * * - ******************************************************************************/ -package org.onap.aaf.cadi.cass; - -import static org.junit.Assert.*; - -import java.util.HashMap; -import java.util.Map; - -import org.junit.Test; -import org.onap.aaf.cadi.Access; -import org.onap.aaf.cadi.PropAccess; -import org.onap.aaf.cadi.Access.Level; -import org.apache.cassandra.auth.AuthenticatedUser; -import org.apache.cassandra.exceptions.AuthenticationException; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import static org.junit.Assert.*; - -import com.att.aaf.cadi.cass.AAFAuthenticatedUser; -import com.att.aaf.cadi.cass.AAFAuthenticator; -import com.att.aaf.cadi.cass.AAFBase; - -import junit.framework.Assert; -//TODO:DELETE THIS OLD TEST -public class JU_AAFAuthorizerTest extends AAFBase -{ - - - @Before - public void setUp() - { - - } - - @After - public void tearDown() - { - - } - - @Test - public void checkRequiredAuth() { - AAFAuthenticator test = new AAFAuthenticator(); - Assert.assertTrue(test.requireAuthentication()); - } - - @Test - public void checkAuthenticate() throws AuthenticationException { - AuthenticatedUser user = new AuthenticatedUser("testUser"); - AAFAuthenticator test = new AAFAuthenticator(); - Map cred = new HashMap(); - cred.put("username", "testUser"); - cred.put("password", "testPass"); - String username = (String)cred.get("username"); - AAFAuthenticatedUser aau = new AAFAuthenticatedUser(access,username); - String fullName=aau.getFullName(); - //access.log(Level.DEBUG, "Authenticating", aau.getName(),"(", fullName,")"); - test.authenticate(cred); - //Assert.assert - - } - - @Test(expected = AuthenticationException.class) - public void checkThrowsUser() throws AuthenticationException { - AAFAuthenticator test = new AAFAuthenticator(); - Map cred = new HashMap(); - cred.put("username", null); - Assert.assertNull(cred.get("username")); - test.authenticate(cred); - } - - @Test(expected = AuthenticationException.class) - public void checkThrowsPass() throws AuthenticationException { - AAFAuthenticator test = new AAFAuthenticator(); - Map cred = new HashMap(); - cred.put("username", "testUser"); - cred.put("password", "bsf:"); - Assert.assertNotNull(cred.get("password")); - test.authenticate(cred); - - cred.put("password", null); - Assert.assertNull(cred.get("password")); - test.authenticate(cred); - } - - - -} -- cgit 1.2.3-korg