diff options
author | Hassan, Sean (sh265m) <sean.hassan@att.com> | 2020-08-27 16:22:05 -0500 |
---|---|---|
committer | Hassan, Sean (sh265m) <sean.hassan@att.com> | 2020-08-27 16:22:17 -0500 |
commit | 55789c5859aff784f6b3cb45e17375c5be1c4cf3 (patch) | |
tree | d7e60aada4490e51ae3c50ac9a60dcb53c8fa9ea /cadi | |
parent | 61d58a9597f2640f52e6c274525b1712ee38c461 (diff) |
Create and prepare non-deploy release 2.7.1
Contains two minor functional changes. First is the replace of "osaaf"
with "onap.aaf" in pathing. Second is to have connection retries attempt
to exhaust all located services before expiring.
Issue-ID: AAF-1193
Signed-off-by: Hassan, Sean (sh265m) <sean.hassan@att.com>
Change-Id: Ie8d8ad76104ead18eb568d0c48882e7cbead041a
Diffstat (limited to 'cadi')
-rw-r--r-- | cadi/aaf/pom.xml | 2 | ||||
-rw-r--r-- | cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFAuthn.java | 11 | ||||
-rw-r--r-- | cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFLurPerm.java | 6 | ||||
-rw-r--r-- | cadi/client/pom.xml | 2 | ||||
-rw-r--r-- | cadi/core/pom.xml | 2 | ||||
-rw-r--r-- | cadi/oauth-enduser/pom.xml | 2 | ||||
-rw-r--r-- | cadi/pom.xml | 2 | ||||
-rw-r--r-- | cadi/servlet-sample/pom.xml | 2 |
8 files changed, 19 insertions, 10 deletions
diff --git a/cadi/aaf/pom.xml b/cadi/aaf/pom.xml index ebe5c0b3..8051ffa8 100644 --- a/cadi/aaf/pom.xml +++ b/cadi/aaf/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.onap.aaf.authz</groupId> <artifactId>cadiparent</artifactId> - <version>2.7.0-SNAPSHOT</version> + <version>2.7.1-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFAuthn.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFAuthn.java index bd94d0ad..dbb9d5c9 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFAuthn.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFAuthn.java @@ -27,6 +27,7 @@ import java.util.ArrayList; import java.util.List; import org.onap.aaf.cadi.AbsUserCache; +import org.onap.aaf.cadi.Access; import org.onap.aaf.cadi.CachedPrincipal; import org.onap.aaf.cadi.CadiException; import org.onap.aaf.cadi.User; @@ -141,6 +142,14 @@ public class AAFAuthn<CLIENT> extends AbsUserCache<AAFPermission> { } public Resp revalidate(Object state) { + int maxRetries = 15; + try { // these SHOULD be AAFConHttp and AAFLocator objects, but put in a try anyway to be safe + AAFConHttp forceCastCon = (AAFConHttp) con; + AAFLocator forceCastLoc = (AAFLocator) forceCastCon.hman().loc; + maxRetries = forceCastLoc.maxIters(); + } catch (Exception e) { + access.log(Access.Level.DEBUG, e); + } List<URI> attemptedUris = new ArrayList<>(); URI thisUri = null; for (int retries = 0;; retries++) { @@ -174,7 +183,7 @@ public class AAFAuthn<CLIENT> extends AbsUserCache<AAFPermission> { attemptedUris.add(thisUri); } con.access.log(e); - if (retries > 2) { + if (retries > maxRetries) { return Resp.INACCESSIBLE; } } diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFLurPerm.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFLurPerm.java index 8b91c74a..01a540b4 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFLurPerm.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFLurPerm.java @@ -61,7 +61,7 @@ import aaf.v2_0.Perms; * */ public class AAFLurPerm extends AbsAAFLur<AAFPermission> { - private static final String ORG_OSAAF_CADI_OAUTH_O_AUTH2_LUR = "org.osaaf.cadi.oauth.OAuth2Lur"; + private static final String ORG_ONAP_AAF_CADI_OAUTH_OAUTH_2_LUR = "org.onap.aaf.cadi.oauth.OAuth2Lur"; /** * Need to be able to transmutate a Principal into either Person or AppID, which are the only ones accepted at this @@ -87,14 +87,14 @@ public class AAFLurPerm extends AbsAAFLur<AAFPermission> { private void attachOAuth2(AAFCon<?> con) throws APIException { String oauth2_url; - Class<?> tmcls = Config.loadClass(access,"org.osaaf.cadi.oauth.TokenMgr"); + Class<?> tmcls = Config.loadClass(access,"org.onap.aaf.cadi.oauth.TokenMgr"); if (tmcls!=null) { if ((oauth2_url = con.access.getProperty(Config.CADI_OAUTH2_URL,null))!=null) { try { Constructor<?> tmconst = tmcls.getConstructor(AAFCon.class,String.class); Object tokMangr = tmconst.newInstance(con,oauth2_url); @SuppressWarnings("unchecked") - Class<Lur> oa2cls = (Class<Lur>)Config.loadClass(access,ORG_OSAAF_CADI_OAUTH_O_AUTH2_LUR); + Class<Lur> oa2cls = (Class<Lur>)Config.loadClass(access, ORG_ONAP_AAF_CADI_OAUTH_OAUTH_2_LUR); Constructor<Lur> oa2const = oa2cls.getConstructor(tmcls); Lur oa2 = oa2const.newInstance(tokMangr); setPreemptiveLur(oa2); diff --git a/cadi/client/pom.xml b/cadi/client/pom.xml index 4ff66d81..b0a4492b 100644 --- a/cadi/client/pom.xml +++ b/cadi/client/pom.xml @@ -22,7 +22,7 @@ <parent> <groupId>org.onap.aaf.authz</groupId> <artifactId>cadiparent</artifactId> - <version>2.7.0-SNAPSHOT</version> + <version>2.7.1-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/cadi/core/pom.xml b/cadi/core/pom.xml index 15bb7bbd..eda4a394 100644 --- a/cadi/core/pom.xml +++ b/cadi/core/pom.xml @@ -16,7 +16,7 @@ <groupId>org.onap.aaf.authz</groupId> <artifactId>cadiparent</artifactId> <relativePath>..</relativePath> - <version>2.7.0-SNAPSHOT</version> + <version>2.7.1-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> diff --git a/cadi/oauth-enduser/pom.xml b/cadi/oauth-enduser/pom.xml index 0a222249..0c4a7019 100644 --- a/cadi/oauth-enduser/pom.xml +++ b/cadi/oauth-enduser/pom.xml @@ -25,7 +25,7 @@ <parent> <groupId>org.onap.aaf.authz</groupId> <artifactId>cadiparent</artifactId> - <version>2.7.0-SNAPSHOT</version> + <version>2.7.1-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/cadi/pom.xml b/cadi/pom.xml index d9f0453d..ebfaf509 100644 --- a/cadi/pom.xml +++ b/cadi/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.onap.aaf.authz</groupId> <artifactId>parent</artifactId> - <version>2.7.0-SNAPSHOT</version> + <version>2.7.1-SNAPSHOT</version> </parent> <artifactId>cadiparent</artifactId> <name>AAF CADI Parent (Code, Access, Data, Identity)</name> diff --git a/cadi/servlet-sample/pom.xml b/cadi/servlet-sample/pom.xml index 6fc12696..0350df49 100644 --- a/cadi/servlet-sample/pom.xml +++ b/cadi/servlet-sample/pom.xml @@ -4,7 +4,7 @@ <groupId>org.onap.aaf.authz</groupId> <artifactId>cadiparent</artifactId> <relativePath>..</relativePath> - <version>2.7.0-SNAPSHOT</version> + <version>2.7.1-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <name>CADI Servlet Sample (Test Only)</name> |