From 80b4e029bd477dfec72ad5d0523b6b568d041c05 Mon Sep 17 00:00:00 2001 From: Ellen Batbouta Date: Mon, 4 Jun 2018 14:18:12 -0400 Subject: [PATCH] Method, decrypt_data, uses internal Barbican endpoint The yaql function, decrypt_data, in the file, yaql_functions.py, sets the config option, barbican_endpoint_type, to internal. This allows Murano to work when TLS is enabled. Change-Id: Id9d82d7bbedcef87bdc9865ec55511d4e1f65507 Closes-Bug: #1775035 --- murano/engine/system/yaql_functions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/murano/engine/system/yaql_functions.py b/murano/engine/system/yaql_functions.py index 568413b48..41367fd06 100644 --- a/murano/engine/system/yaql_functions.py +++ b/murano/engine/system/yaql_functions.py @@ -21,6 +21,7 @@ import time import jsonpatch import jsonpointer +from oslo_config import cfg as oslo_cfg from oslo_log import log as logging from oslo_serialization import base64 import six @@ -37,6 +38,7 @@ from murano.dsl import yaql_integration from castellan.common import exception as castellan_exception from castellan.common import utils as castellan_utils from castellan import key_manager +from castellan import options LOG = logging.getLogger(__name__) @@ -212,6 +214,8 @@ def logger(context, logger_name): @specs.parameter('value', yaqltypes.String()) @specs.extension_method def decrypt_data(value): + options.set_defaults(oslo_cfg.CONF, + barbican_endpoint_type='internal') manager = key_manager.API() try: context = castellan_utils.credential_factory(conf=cfg.CONF)