<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.aaf.cadi</groupId>
<artifactId>parent</artifactId>
- <version>2.1.17-SNAPSHOT</version>
+ <version>2.1.18-SNAPSHOT</version>
<name>CADI Plugins Parent</name>
<packaging>pom</packaging>
<properties>
<!-- This version needs to be RELEASED version. Fails on SNAPSHOT -->
- <cadi.version>2.7.1</cadi.version>
+ <cadi.version>2.7.2</cadi.version>
<!-- <sonar.skip>true</sonar.skip> -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- project.jettyVersion>9.4.12.v20180830</project.jettyVersion -->
<parent>
<groupId>org.onap.aaf.cadi</groupId>
<artifactId>parent</artifactId>
- <version>2.1.17-SNAPSHOT</version>
+ <version>2.1.18-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<parent>
<groupId>org.onap.aaf.cadi</groupId>
<artifactId>parent</artifactId>
- <version>2.1.17-SNAPSHOT</version>
+ <version>2.1.18-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
private Access access;
private Principal bait;
+ private List<org.onap.aaf.cadi.Permission> pond;
// Use these to save conversions
private List<org.onap.aaf.cadi.Permission> cPerms;
private List<Permission> oPerms;
cPerms=null;
oPerms=null;
sPerms=null;
+ pond=null;
+ }
+
+ public AAFAuthorizationInfo(Access access, Principal bait, List<org.onap.aaf.cadi.Permission> pond) {
+ this.access = access;
+ this.bait = bait;
+ this.pond = pond;
+ oPerms=null;
+ sPerms=null;
+ cPerms=null;
}
public Principal principal() {
access.log(Level.DEBUG, "AAFAuthorizationInfo.getObjectPermissions");
synchronized(bait) {
if(oPerms == null) {
- oPerms = new ArrayList<>();
- if(cPerms==null) {
- cPerms = new ArrayList<>();
- AAFRealm.singleton.authz.fishAll(bait, cPerms);
- }
- for(final org.onap.aaf.cadi.Permission p : cPerms) {
- oPerms.add(new AAFShiroPermission(p));
+ if (pond != null) {
+ oPerms = new ArrayList<Permission>();
+ for(final org.onap.aaf.cadi.Permission p : pond) {
+ oPerms.add(new AAFShiroPermission(p));
+ }
+ } else {
+ oPerms = new ArrayList<>();
+ if (cPerms == null) {
+ cPerms = new ArrayList<>();
+ AAFRealm.singleton.authz.fishAll(bait, cPerms);
+ }
+ for (final org.onap.aaf.cadi.Permission p : cPerms) {
+ oPerms.add(new AAFShiroPermission(p));
+ }
}
}
}
access.log(Level.DEBUG,"AAFAuthorizationInfo.getStringPermissions");
synchronized(bait) {
if(sPerms == null) {
- sPerms = new ArrayList<>();
- if(cPerms==null) {
- cPerms = new ArrayList<>();
- AAFRealm.singleton.authz.fishAll(bait,cPerms);
- }
- for(final org.onap.aaf.cadi.Permission p : cPerms) {
- sPerms.add(p.getKey());
+ if (pond != null) {
+ sPerms = new ArrayList<String>();
+ for(org.onap.aaf.cadi.Permission p : pond) {
+ sPerms.add(p.getKey().replace("|", ":"));
+ access.printf(Level.INFO, "%s has %s", bait.getName(), p.getKey());
+ }
+ } else {
+ sPerms = new ArrayList<>();
+ if (cPerms == null) {
+ cPerms = new ArrayList<>();
+ AAFRealm.singleton.authz.fishAll(bait, cPerms);
+ }
+ for (final org.onap.aaf.cadi.Permission p : cPerms) {
+ sPerms.add(p.getKey());
+ }
}
}
}
import java.io.IOException;
import java.security.Principal;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.onap.aaf.cadi.Access.Level;
import org.onap.aaf.cadi.CadiException;
import org.onap.aaf.cadi.LocatorException;
+import org.onap.aaf.cadi.Permission;
import org.onap.aaf.cadi.PropAccess;
import org.onap.aaf.cadi.Symm;
import org.onap.aaf.cadi.aaf.AAFPermission;
}
} catch (IOException e) {
singleton.access.log(e);
- }
+ }
}
String err;
try {
};
}
}
- return new AAFAuthorizationInfo(singleton.access,newBait);
+ List<Permission> pond = new ArrayList<>();
+ singleton.authz.fishAll(newBait,pond);
+ return new AAFAuthorizationInfo(singleton.access,bait,pond);
}
@Override
return null;
}
}
-
+/*
@Override
public boolean isPermitted(PrincipalCollection principals, String permission) {
logger.debug("AAFRealm.isPermitted(principals,permission<String>)");
}
return super.isPermitted(permissions, info);
}
-
+*/
}
<parent>
<groupId>org.onap.aaf.cadi.sidecar</groupId>
<artifactId>sidecar</artifactId>
- <version>2.1.17-SNAPSHOT</version>
+ <version>2.1.18-SNAPSHOT</version>
</parent>
<properties>
<parent>
<groupId>org.onap.aaf.cadi</groupId>
<artifactId>parent</artifactId>
- <version>2.1.17-SNAPSHOT</version>
+ <version>2.1.18-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.aaf.cadi.sidecar</groupId>
<artifactId>sidecar</artifactId>
- <version>2.1.17-SNAPSHOT</version>
+ <version>2.1.18-SNAPSHOT</version>
</parent>
<properties>
<parent>
<groupId>org.onap.aaf.cadi.sidecar</groupId>
<artifactId>sidecar</artifactId>
- <version>2.1.17-SNAPSHOT</version>
+ <version>2.1.18-SNAPSHOT</version>
</parent>
<artifactId>tproxy-config</artifactId>
# This TAG <version>2.1.13</version> is here to help remember to change this file. Keep it up to date with the following "real" entries:
major=2
minor=1
-patch=17
+patch=18
base_version=${major}.${minor}.${patch}