From 442d8fb117c9086ec2ec468f661af082becafbb8 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Tue, 3 Jul 2018 16:28:26 -0500 Subject: Fix testing results for Authn Issue-ID: AAF-361 Change-Id: I8f78b41580368610e126aa4cc7cadf8ef204d03a Signed-off-by: Instrumental --- cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java | 8 ++++++++ .../src/main/java/org/onap/aaf/cadi/taf/basic/BasicHttpTaf.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'cadi/core') diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java b/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java index dfcf7e3d..b4e31f2f 100644 --- a/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java +++ b/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java @@ -474,6 +474,14 @@ public class Config { } } + // Add BasicAuth, if any, to x509Taf + if(x509TAF!=null) { + for( HttpTaf ht : htlist) { + if(ht instanceof BasicHttpTaf) { + x509TAF.add((BasicHttpTaf)ht); + } + } + } ///////////////////////////////////////////////////// // Create EpiTaf from configured TAFs ///////////////////////////////////////////////////// diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/taf/basic/BasicHttpTaf.java b/cadi/core/src/main/java/org/onap/aaf/cadi/taf/basic/BasicHttpTaf.java index ac824d0a..8fc985cf 100644 --- a/cadi/core/src/main/java/org/onap/aaf/cadi/taf/basic/BasicHttpTaf.java +++ b/cadi/core/src/main/java/org/onap/aaf/cadi/taf/basic/BasicHttpTaf.java @@ -130,7 +130,7 @@ public class BasicHttpTaf implements HttpTaf { // ONLY FOR Last Ditch DEBUGGING... // access.log(Level.WARN,ba.getName() + ":" + new String(ba.getCred())); - if(cv.validate(ba.getShortName(), Type.PASSWORD, ba.getCred(), req)) { + if(cv.validate(ba.getName(), Type.PASSWORD, ba.getCred(), req)) { return new BasicHttpTafResp(access,ba, ba.getName()+" authenticated by BasicAuth password",RESP.IS_AUTHENTICATED,resp,realm,false); } else { //TODO may need timed retries in a given time period -- cgit 1.2.3-korg