From 489ee519c9994f510f256d8d496926ce153dd818 Mon Sep 17 00:00:00 2001 From: Jeenal Shah Date: Fri, 18 Mar 2016 15:35:25 -0700 Subject: [PATCH] read client secret from protected settings --- install_steps/configure_security_groups.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/install_steps/configure_security_groups.py b/install_steps/configure_security_groups.py index 3e9c725..4a53e6b 100644 --- a/install_steps/configure_security_groups.py +++ b/install_steps/configure_security_groups.py @@ -9,6 +9,18 @@ import yaml import os +import Utils.HandlerUtil as Util +from Utils.WAAgentUtil import waagent + +def get_protected_settings(): + hutil = Util.HandlerUtility( + waagent.Log, + waagent.Error, + "bosh-deploy-script") + hutil.do_parse_context("enable") + + return hutil.get_protected_settings() + def get_token_from_client_credentials(endpoint, client_id, client_secret): payload = { @@ -55,6 +67,11 @@ def do_step(context): client_token = settings['CLIENT-ID'] client_secret = settings['CLIENT-SECRET'] + protectedSettings = get_protected_settings() + + print "Client sercret from protectedSettings %s" %protectedSettings['CLIENT-SECRET'] + + ha_proxy_address = get_ha_proxy_address(context) token = get_token_from_client_credentials(endpoint, client_token, client_secret)