Skip to content

Commit

Permalink
fix: flex-linux-setup Dump Admin UI Client and Secret to screen and s…
Browse files Browse the repository at this point in the history
…etup.properties (#700)
  • Loading branch information
devrimyatar authored Jan 4, 2023
1 parent bdb0f06 commit 69af163
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions flex-linux-setup/flex_linux_setup/flex_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ def install_gluu_admin_ui(self):

client_tmp_fn = os.path.join(self.templates_dir, 'admin_ui_client.ldif')

print("\033[1mAdmin UI Client ID:\033[0m", Config.admin_ui_client_id)
print("\033[1mAdmin UI Client Secret:\033[0m", Config.admin_ui_client_pw)

with open(client_tmp_fn, 'wb') as w:
ldif_writer = LDIFWriter(w)
ldif_writer.unparse('inum=%(admin_ui_client_id)s,ou=clients,o=jans', ldif_parser.entries[0][1])
Expand Down Expand Up @@ -514,8 +517,8 @@ def install_casa(self):
if not Config.get('casa_client_encoded_pw'):
Config.casa_client_encoded_pw = jansAuthInstaller.obscure(Config.casa_client_pw)

print("Casa client id", Config.casa_client_id)
print("Casa client encoded password", Config.casa_client_encoded_pw)
print("\033[1mCasa Client ID:\033[0m", Config.casa_client_id)
print("\033[1mCasa Client Secret:\033[0m", Config.casa_client_pw)

print("Importing LDIF Files")

Expand Down Expand Up @@ -588,7 +591,7 @@ def save_properties(self):
p = Properties()
with open(fn, 'rb') as f:
p.load(f, 'utf-8')
for prop in ('casa_client_id', 'casa_client_pw', 'casa_client_encoded_pw'):
for prop in ('casa_client_id', 'casa_client_pw', 'casa_client_encoded_pw', 'admin_ui_client_id', 'admin_ui_client_pw'):
if Config.get(prop):
p[prop] = Config.get(prop)
with open(fn, 'wb') as f:
Expand Down

0 comments on commit 69af163

Please sign in to comment.