aboutsummaryrefslogtreecommitdiffstats
path: root/osdf
diff options
context:
space:
mode:
Diffstat (limited to 'osdf')
-rw-r--r--osdf/adapters/aaf/sms.py4
-rw-r--r--osdf/webapp/appcontroller.py6
2 files changed, 8 insertions, 2 deletions
diff --git a/osdf/adapters/aaf/sms.py b/osdf/adapters/aaf/sms.py
index 9c7af51..25ae7f2 100644
--- a/osdf/adapters/aaf/sms.py
+++ b/osdf/adapters/aaf/sms.py
@@ -21,6 +21,8 @@
from onapsmsclient import Client
+import osdf.config.base as cfg_base
+import osdf.config.credentials as creds
import osdf.config.loader as config_loader
from osdf.config.base import osdf_config
from osdf.logging.osdf_logging import debug_log
@@ -98,6 +100,8 @@ def load_secrets():
config['pciHMSPassword'] = secret_dict['pciHMS']['Password']
config['osdfPCIOptUsername'] = secret_dict['osdfPCIOpt']['UserName']
config['osdfPCIOptPassword'] = secret_dict['osdfPCIOpt']['Password']
+ cfg_base.http_basic_auth_credentials = creds.load_credentials(osdf_config)
+ cfg_base.dmaap_creds = creds.dmaap_creds()
def delete_secrets():
diff --git a/osdf/webapp/appcontroller.py b/osdf/webapp/appcontroller.py
index 3a5385d..9714fb5 100644
--- a/osdf/webapp/appcontroller.py
+++ b/osdf/webapp/appcontroller.py
@@ -21,7 +21,8 @@ from flask_httpauth import HTTPBasicAuth
from flask import Response
import json
import osdf
-from osdf.config.base import http_basic_auth_credentials, osdf_config
+import osdf.config.base as cfg_base
+from osdf.config.base import osdf_config
from osdf.adapters.aaf import aaf_authentication as aaf_auth
auth_basic = HTTPBasicAuth()
@@ -38,7 +39,8 @@ unauthorized_message = json.dumps(error_body)
def get_pw(username):
end_point = request.url.split('/')[-1]
auth_group = osdf.end_point_auth_mapping.get(end_point)
- return http_basic_auth_credentials[auth_group].get(username) if auth_group else None
+ return cfg_base.http_basic_auth_credentials[auth_group].get(
+ username) if auth_group else None
@auth_basic.error_handler
def auth_error():