schema_version=schema_version,
salt=final_content["_id"],
)
+ if edit_content.get("config", {}).get("credentials"):
+ cloud_credentials = edit_content["config"]["credentials"]
+ if cloud_credentials.get("clientSecret"):
+ edit_content["config"]["credentials"][
+ "clientSecret"
+ ] = self.db.encrypt(
+ edit_content["config"]["credentials"]["clientSecret"],
+ schema_version=schema_version,
+ salt=edit_content["_id"],
+ )
+ elif cloud_credentials.get("SecretAccessKey"):
+ edit_content["config"]["credentials"][
+ "SecretAccessKey"
+ ] = self.db.encrypt(
+ edit_content["config"]["credentials"]["SecretAccessKey"],
+ schema_version=schema_version,
+ salt=edit_content["_id"],
+ )
# create edit operation
final_content["_admin"]["operations"].append(self._create_operation("edit"))
schema_version=schema_version,
salt=content["_id"],
)
+ if content.get("config", {}).get("credentials"):
+ cloud_credentials = content["config"]["credentials"]
+ if cloud_credentials.get("clientSecret"):
+ content["config"]["credentials"]["clientSecret"] = self.db.encrypt(
+ content["config"]["credentials"]["clientSecret"],
+ schema_version=schema_version,
+ salt=content["_id"],
+ )
+ elif cloud_credentials.get("SecretAccessKey"):
+ content["config"]["credentials"]["SecretAccessKey"] = self.db.encrypt(
+ content["config"]["credentials"]["SecretAccessKey"],
+ schema_version=schema_version,
+ salt=content["_id"],
+ )
content["_admin"]["operationalState"] = "PROCESSING"