Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Commit

Permalink
read client secret from protected settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jeenalshah committed Mar 18, 2016
1 parent 8b1ebb0 commit 489ee51
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions install_steps/configure_security_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 489ee51

Please sign in to comment.