Skip to content

Commit

Permalink
feat(cloud-native): add support for configuration key file
Browse files Browse the repository at this point in the history
Signed-off-by: iromli <[email protected]>
  • Loading branch information
iromli committed Jan 6, 2025
1 parent 5f5adb4 commit 6bf583b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion jans-pycloudlib/jans/pycloudlib/config/file_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
class FileConfig(BaseConfig):
def __init__(self) -> None:
filepath = os.environ.get("CN_CONFIGURATOR_CONFIGURATION_FILE", "/etc/jans/conf/configuration.json")
key_file = os.environ.get("CN_CONFIGURATOR_CONFIGURATION_KEY_FILE", "/etc/jans/conf/configuration.key")

out, err, code = load_schema_from_file(filepath, exclude_secret=True)
out, err, code = load_schema_from_file(filepath, exclude_secret=True, key_file=key_file)
if code != 0:
logger.warning(f"Unable to load configmaps from file {filepath}; error={err}; local configmaps will be excluded")

Expand Down
3 changes: 2 additions & 1 deletion jans-pycloudlib/jans/pycloudlib/secret/file_secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
class FileSecret(BaseSecret):
def __init__(self) -> None:
filepath = os.environ.get("CN_CONFIGURATOR_CONFIGURATION_FILE", "/etc/jans/conf/configuration.json")
key_file = os.environ.get("CN_CONFIGURATOR_CONFIGURATION_KEY_FILE", "/etc/jans/conf/configuration.key")

out, err, code = load_schema_from_file(filepath, exclude_configmap=True)
out, err, code = load_schema_from_file(filepath, exclude_configmap=True, key_file=key_file)
if code != 0:
logger.warning(f"Unable to load secrets from file {filepath}; error={err}; local secrets will be excluded")

Expand Down

0 comments on commit 6bf583b

Please sign in to comment.