From 9218d80e65bf3eaa01e7942730bac8c72dcb7862 Mon Sep 17 00:00:00 2001 From: Rob Daugherty Date: Wed, 18 Apr 2018 16:57:11 -0400 Subject: AAIRestClient support for Basic Auth Adding support for Basic Auth in the AAI Rest Clients because ONAP uses this (whereas ECOMP uses 2-way SSL). In general, each AAI client will allow the user to configure properties called "aai.auth" and "mso.msoKey". If these are set, then the client will add the Authorization header to every request. Change-Id: I7c81ec05d2ec4a7dca131f2e9e19d341ac89b09f Issue-ID: SO-576 Signed-off-by: Rob Daugherty --- .../tenantisolation/AaiClientPropertiesImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java/org') diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/AaiClientPropertiesImpl.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/AaiClientPropertiesImpl.java index 03af038574..92e74e8de2 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/AaiClientPropertiesImpl.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/AaiClientPropertiesImpl.java @@ -49,4 +49,14 @@ public class AaiClientPropertiesImpl implements AAIProperties { public AAIVersion getDefaultVersion() { return AAIVersion.LATEST; } + + @Override + public String getAuth() { + return props.getProperty("aai.auth", null); + } + + @Override + public String getKey() { + return props.getProperty("mso.msoKey", null); + } } -- cgit 1.2.3-korg