From c3aa7ebbb6f17c93958103077614f5bdac9837b0 Mon Sep 17 00:00:00 2001 From: Dileep Ranganathan Date: Fri, 12 Oct 2018 02:29:49 -0700 Subject: Enable SMS in OSDF Load secrets from SMS in OSDF. Removed secrets from osdf_config.yaml. Unit tests to use the test/config/osdf_config.yaml. Helm charts uses a Job to load secrets. CSIT needs to load it using the preload tool provided by SMS. Change-Id: I0f832033476c02958f6392abba74e4d5a36cc902 Issue-ID: OPTFRA-343 Signed-off-by: Dileep Ranganathan --- osdf/webapp/appcontroller.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'osdf/webapp/appcontroller.py') 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(): -- cgit 1.2.3-korg