Skip to content

Commit

Permalink
tese
Browse files Browse the repository at this point in the history
  • Loading branch information
abuabraham-ttd committed Jan 18, 2025
1 parent 51f77f7 commit 8975de3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/confidential_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def validate_operator_key():
expected_env = "I" if debug_mode or env == "integ" else "P"
if operator_key.split("-")[2] != expected_env:
raise InvalidOperatorKey(self.__class__.__name__)
print("Validated operator key matches environment")
print("Validated operator key matches environment ",operator_key)
else:
print("Skipping operator key validation")

Expand Down
4 changes: 2 additions & 2 deletions scripts/gcp-oidc/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def _get_secret(self, secret_identifier=None) -> ConfidentialComputeConfig:
except NotFound:
raise ConfigNotFound(self.__class__.__name__, f"Secret Manager {os.getenv("API_TOKEN_SECRET_NAME")}")
config["api_token"] = secret_value
os.environ["gcp_secret_version_name"] = os.getenv("API_TOKEN_SECRET_NAME") # ideally add to config?
return config

def __populate_operator_config(self, destination):
Expand All @@ -51,8 +52,6 @@ def __populate_operator_config(self, destination):
config = file.read()
config = config.replace("https://core.uidapi.com", self.configs.get("core_base_url"))
config = config.replace("https://optout.uidapi.com", self.configs.get("optout_base_url"))
print(config)
print("writing yo ", destination)
with open(destination, 'w') as file:
file.write(config)

Expand All @@ -70,6 +69,7 @@ def run_compute(self) -> None:
if not self.configs.get("skip_validations"):
self.validate_configuration()
config_locaton = "/tmp/final-config.json"
gcp_secret_version_name
self.__populate_operator_config(config_locaton)
java_command = [
"java",
Expand Down

0 comments on commit 8975de3

Please sign in to comment.