summaryrefslogtreecommitdiffstats
path: root/cadi/cass
diff options
context:
space:
mode:
authorInstrumental <jcgmisc@stl.gathman.org>2018-03-29 16:54:19 -0500
committerInstrumental <jcgmisc@stl.gathman.org>2018-03-29 17:09:52 -0500
commit17ca744723bd652f15d59d6c8555824f6e49018d (patch)
tree11366a9f7f8de574b424f7c98abb01924614fd2b /cadi/cass
parent21904502c37e277b2bc3f61b4033e9b9a4cbf8dd (diff)
Change groupID to match Garrit Project
Issue-ID: AAF-206 Change-Id: I2f9f83c210a6741b6c25c8045466d0c7a8e31811 Signed-off-by: Instrumental <jcgmisc@stl.gathman.org>
Diffstat (limited to 'cadi/cass')
-rw-r--r--cadi/cass/pom.xml6
-rw-r--r--cadi/cass/src/main/java/com/att/aaf/cadi/cass/AAFBase.java2
-rw-r--r--cadi/cass/src/test/java/org/onap/aaf/cadi/cass/JU_AAFAuthorizerTest.java109
3 files changed, 4 insertions, 113 deletions
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 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>org.onap.aaf.cadi</groupId>
+ <groupId>org.onap.aaf.authz.cadi</groupId>
<artifactId>parent</artifactId>
<version>1.5.0-SNAPSHOT</version>
<relativePath>..</relativePath>
@@ -88,12 +88,12 @@
<dependencies>
<dependency>
- <groupId>org.onap.aaf.cadi</groupId>
+ <groupId>org.onap.aaf.authz.cadi</groupId>
<artifactId>aaf-cadi-core</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.aaf.cadi</groupId>
+ <groupId>org.onap.aaf.authz.cadi</groupId>
<artifactId>aaf-cadi-aaf</artifactId>
</dependency>
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<String, String> cred = new HashMap<String,String>();
- 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<String, String> cred = new HashMap<String,String>();
- 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<String, String> cred = new HashMap<String,String>();
- 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);
- }
-
-
-
-}