diff --git a/src/confcom/README.md b/src/confcom/README.md
index ec9fca2a49a..fa5e8d19f87 100644
--- a/src/confcom/README.md
+++ b/src/confcom/README.md
@@ -55,6 +55,7 @@ The `confcom` extension does not currently support:
- [ARM Template functions](https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions) other than `variables` and `parameters`.
- Variables and Parameters with non-primitive data types e.g. objects and arrays
+- Nested and Linked ARM Templates
## Trademarks
diff --git a/src/confcom/azext_confcom/README.md b/src/confcom/azext_confcom/README.md
index c4ee55482d5..af5bb3fdeb2 100644
--- a/src/confcom/azext_confcom/README.md
+++ b/src/confcom/azext_confcom/README.md
@@ -60,15 +60,15 @@ Example 2: This command injects a CCE policy into [ARM-template](arm.template.md
az confcom acipolicygen -a .\arm-template.json -p .\template.parameters.json
-This is mainly for decoupling purposes so that an ARM template can remain the same and evolving variables can go into a different file.
+This is mainly for decoupling purposes so that an ARM template can remain the same and evolving variables can go into a different file. When a security policy gets injected into the ARM Template, the corresponding sha256 hash of the decoded security policy gets printed to the command line. This sha256 hash can be used for verifying the hostdata field of the SEV-SNP Attestation Report and/or used for key release policies using MAA (Microsoft Azure Attestation) or mHSM (managed Hardware Security Module)
Example 3: This command takes the input of an ARM template to create a human-readable CCE policy in pretty print JSON format and output the result to the console.
NOTE: Generating JSON policy is for use by the customer only, and is not used by ACI In most cases. The default REGO format security policy is required.
- az confcom acipolicygen -a ".\arm_template" --outraw-pretty-print --json
+ az confcom acipolicygen -a ".\arm_template" --outraw-pretty-print
The default output of `acipolicygen` command is base64 encoded REGO format.
-This example uses the `--json` argument to generate output in JSON format, use `--outraw-pretty-print` to indicate decoding policy in clear text and in pretty print format and print result to console.
+This example uses `--outraw-pretty-print` to indicate decoding policy in clear text and in pretty print format and print result to console.
Example 4: The following command takes the input of an ARM template to create a human-readable CCE policy in clear text and print to console:
diff --git a/src/confcom/azext_confcom/_help.py b/src/confcom/azext_confcom/_help.py
index c195a985727..144dbf32ebb 100644
--- a/src/confcom/azext_confcom/_help.py
+++ b/src/confcom/azext_confcom/_help.py
@@ -65,10 +65,6 @@
type: boolean
short-summary: 'When combined with an input ARM Template, verifies the policy present in the ARM Template under "ccePolicy" and the containers within the ARM Template are compatible. If they are incompatible, a list of reasons is given and the exit status code will be 2.'
- - name: --json -j
- type: string
- short-summary: 'Outputs in JSON format instead of Rego'
-
- name: --outraw
type: boolean
short-summary: 'Output policy in clear text compact JSON instead of default base64 format'
diff --git a/src/confcom/azext_confcom/_params.py b/src/confcom/azext_confcom/_params.py
index db08cf5e228..ae70721e8b0 100644
--- a/src/confcom/azext_confcom/_params.py
+++ b/src/confcom/azext_confcom/_params.py
@@ -76,12 +76,6 @@ def load_arguments(self, _):
required=False,
help="Disabling container stdio will disable the ability to see the output of the container in the terminal for Confidential ACI",
)
- c.argument(
- "use_json",
- options_list=("--json", "-j"),
- required=False,
- help="Output in JSON format",
- )
c.argument(
"diff",
options_list=("--diff", "-d"),
diff --git a/src/confcom/azext_confcom/custom.py b/src/confcom/azext_confcom/custom.py
index b7016452baa..aa15771846e 100644
--- a/src/confcom/azext_confcom/custom.py
+++ b/src/confcom/azext_confcom/custom.py
@@ -10,10 +10,11 @@
from knack.log import get_logger
from azext_confcom.config import DEFAULT_REGO_FRAGMENTS
from azext_confcom import os_util
-from azext_confcom.template_util import pretty_print_func, print_func
+from azext_confcom.template_util import pretty_print_func, print_func, str_to_sha256
from azext_confcom.init_checks import run_initial_docker_checks
from azext_confcom.template_util import inject_policy_into_template, print_existing_policy_from_arm_template
from azext_confcom import security_policy
+from azext_confcom.security_policy import OutputType
logger = get_logger(__name__)
@@ -27,7 +28,6 @@ def acipolicygen_confcom(
infrastructure_svn: str,
tar_mapping_location: str,
approve_wildcards: str = False,
- use_json: bool = False,
outraw: bool = False,
outraw_pretty_print: bool = False,
diff: bool = False,
@@ -124,15 +124,17 @@ def acipolicygen_confcom(
exit_code = get_diff_outputs(policy, output_type == security_policy.OutputType.PRETTY_PRINT)
elif arm_template and (not print_policy_to_terminal and not outraw and not outraw_pretty_print):
result = inject_policy_into_template(arm_template, arm_template_parameters,
- policy.get_serialized_output(output_type, use_json), count)
+ policy.get_serialized_output(), count)
if result:
- print("CCE Policy successfully injected into ARM Template")
+ # this is always going to be the unencoded policy
+ print(str_to_sha256(policy.get_serialized_output(OutputType.RAW)))
+ logger.info("CCE Policy successfully injected into ARM Template")
else:
# output to terminal
- print(f"{policy.get_serialized_output(output_type, use_json)}\n\n")
+ print(f"{policy.get_serialized_output(output_type)}\n\n")
# output to file
if save_to_file:
- policy.save_to_file(save_to_file, output_type, use_json)
+ policy.save_to_file(save_to_file, output_type)
sys.exit(exit_code)
diff --git a/src/confcom/azext_confcom/data/internal_config.json b/src/confcom/azext_confcom/data/internal_config.json
index 2e2366a7778..78c8413c071 100644
--- a/src/confcom/azext_confcom/data/internal_config.json
+++ b/src/confcom/azext_confcom/data/internal_config.json
@@ -176,7 +176,8 @@
"feed": "mcr.microsoft.com/aci/aci-cc-infra-fragment",
"minimum_svn": "1",
"includes": [
- "containers"
+ "containers",
+ "fragments"
]
}
],
diff --git a/src/confcom/azext_confcom/security_policy.py b/src/confcom/azext_confcom/security_policy.py
index fab820c3c59..ce5327c96ff 100644
--- a/src/confcom/azext_confcom/security_policy.py
+++ b/src/confcom/azext_confcom/security_policy.py
@@ -150,7 +150,6 @@ def close(self) -> None:
def get_serialized_output(
self,
output_type: OutputType = OutputType.DEFAULT,
- use_json=False,
rego_boilerplate=True,
) -> str:
# error check the output type
@@ -158,13 +157,11 @@ def get_serialized_output(
eprint("Unknown output type for serialization.")
policy_str = self._policy_serialization(
- use_json, output_type == OutputType.PRETTY_PRINT
+ output_type == OutputType.PRETTY_PRINT
)
- if not use_json and rego_boilerplate:
+ if rego_boilerplate:
policy_str = self._add_rego_boilerplate(policy_str)
- elif use_json and output_type == OutputType.PRETTY_PRINT:
- policy_str = json.dumps(json.loads(policy_str), indent=2, sort_keys=True)
# if we're not outputting base64
if output_type in (OutputType.RAW, OutputType.PRETTY_PRINT):
@@ -217,19 +214,6 @@ def _add_elements(self, dictionary) -> Dict:
return dictionary
- def _convert_to_json(self, dictionary) -> Dict:
- # need to make a deep copy so we can change the underlying config data
- # dicts
- editable = copy.deepcopy(dictionary)
- out = {"length": len(editable), "elements": {}}
-
- for i, container in enumerate(editable):
- out["elements"][str(i)] = container
-
- self._add_elements(out)
-
- return {config.POLICY_FIELD_CONTAINERS: out}
-
def validate_cce_policy(self) -> Tuple[bool, Dict]:
"""Utility method: check to see if the existing policy
that instantiates this function would allow the policy created by the input ARM Template"""
@@ -361,12 +345,11 @@ def save_to_file(
self,
file_path: str,
output_type: OutputType = OutputType.DEFAULT,
- use_json=False,
) -> None:
- output = self.get_serialized_output(output_type, use_json=use_json)
+ output = self.get_serialized_output(output_type)
os_util.write_str_to_file(file_path, output)
- def _policy_serialization(self, use_json, pretty_print=False) -> str:
+ def _policy_serialization(self, pretty_print=False) -> str:
policy = []
regular_container_images = self.get_images()
@@ -383,9 +366,6 @@ def _policy_serialization(self, use_json, pretty_print=False) -> str:
for container in policy:
container[config.POLICY_FIELD_CONTAINERS_ALLOW_STDIO_ACCESS] = False
- # default output is rego policy
- if use_json:
- policy = self._convert_to_json(policy)
if pretty_print:
return pretty_print_func(policy)
return print_func(policy)
diff --git a/src/confcom/azext_confcom/template_util.py b/src/confcom/azext_confcom/template_util.py
index 665953812bf..5db3902d7b3 100644
--- a/src/confcom/azext_confcom/template_util.py
+++ b/src/confcom/azext_confcom/template_util.py
@@ -8,6 +8,7 @@
import copy
import tarfile
from typing import Any, Tuple, Dict, List
+from hashlib import sha256
import deepdiff
import yaml
import docker
@@ -570,6 +571,10 @@ def pretty_print_func(x: dict) -> str:
return json.dumps(x, indent=2, sort_keys=True)
+def str_to_sha256(x: str) -> str:
+ return sha256(x.encode('utf-8')).hexdigest()
+
+
def is_sidecar(image_name: str) -> bool:
return image_name.split(":")[0] in config.BASELINE_SIDECAR_CONTAINERS
diff --git a/src/confcom/azext_confcom/tests/latest/test_confcom_arm.py b/src/confcom/azext_confcom/tests/latest/test_confcom_arm.py
index 8cae3eaaeb6..d7e2f44c805 100644
--- a/src/confcom/azext_confcom/tests/latest/test_confcom_arm.py
+++ b/src/confcom/azext_confcom/tests/latest/test_confcom_arm.py
@@ -244,21 +244,17 @@ def setUpClass(cls):
def test_arm_template_policy(self):
# deep diff the output policies from the regular policy.json and the ARM template
normalized_aci_policy = json.loads(
- self.aci_policy.get_serialized_output(output_type=OutputType.RAW, use_json=True)
+ self.aci_policy.get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False)
)
normalized_aci_arm_policy = json.loads(
self.aci_arm_policy.get_serialized_output(
- output_type=OutputType.RAW, use_json=True
+ output_type=OutputType.RAW, rego_boilerplate=False
)
)
- normalized_aci_policy[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"].pop(config.POLICY_FIELD_CONTAINERS_ID)
- normalized_aci_arm_policy[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ normalized_aci_policy[0].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ normalized_aci_arm_policy[0].pop(config.POLICY_FIELD_CONTAINERS_ID)
self.assertEqual(
deepdiff.DeepDiff(
@@ -1050,16 +1046,12 @@ def test_arm_template_with_parameter_file_injected_env_vars(self):
)
output[0].populate_policy_content_for_all_images()
output_json = json.loads(
- output[0].get_serialized_output(output_type=OutputType.RAW, use_json=True)
+ output[0].get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False)
)
# see if we have environment variables specific to the python image in the parameter file
python_flag = False
- for _, value in output_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"][config.POLICY_FIELD_CONTAINERS_ELEMENTS_ENVS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ].items():
+ for value in output_json[0][config.POLICY_FIELD_CONTAINERS_ELEMENTS_ENVS]:
if "PYTHON" in value[config.POLICY_FIELD_CONTAINERS_ELEMENTS_ENVS_RULE]:
python_flag = True
self.assertTrue(python_flag)
@@ -1237,15 +1229,9 @@ def test_arm_template_with_parameter_file_arm_config(self):
)
output[0].populate_policy_content_for_all_images()
# see if we have environment variables that are in the template
- output_json = json.loads(
- output[0].get_serialized_output(output_type=OutputType.RAW, use_json=True)
- )
+ output_json = json.loads(output[0].get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False))
- for _, value in output_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"][config.POLICY_FIELD_CONTAINERS_ELEMENTS_ENVS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ].items():
+ for value in output_json[0][config.POLICY_FIELD_CONTAINERS_ELEMENTS_ENVS]:
if case_insensitive_dict_get(
value, config.POLICY_FIELD_CONTAINERS_ELEMENTS_ENVS_RULE
).startswith("PORT"):
@@ -1261,11 +1247,7 @@ def test_arm_template_with_parameter_file_arm_config(self):
"-c",
"while sleep 5; do cat /mnt/input/access.log; done",
]
- for _, value in output_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"][config.POLICY_FIELD_CONTAINERS_ELEMENTS_COMMANDS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ].items():
+ for value in output_json[0][config.POLICY_FIELD_CONTAINERS_ELEMENTS_COMMANDS]:
self.assertTrue(value in expected)
@@ -1440,19 +1422,15 @@ def test_arm_template_with_parameter_file_clean_room(self):
clean_room[0].populate_policy_content_for_all_images()
regular_image_json = json.loads(
- regular_image[0].get_serialized_output(output_type=OutputType.RAW, use_json=True)
+ regular_image[0].get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False)
)
clean_room_json = json.loads(
- clean_room[0].get_serialized_output(output_type=OutputType.RAW, use_json=True)
+ clean_room[0].get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False)
)
- regular_image_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"].pop(config.POLICY_FIELD_CONTAINERS_ID)
- clean_room_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ regular_image_json[0].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ clean_room_json[0].pop(config.POLICY_FIELD_CONTAINERS_ID)
# see if the remote image and the local one produce the same output
self.assertEqual(
@@ -1821,7 +1799,7 @@ def setUpClass(cls):
cls.aci_arm_policy.populate_policy_content_for_all_images()
def test_update_infrastructure_svn(self):
- expected_policy = "cGFja2FnZSBwb2xpY3kKCmltcG9ydCBmdXR1cmUua2V5d29yZHMuZXZlcnkKaW1wb3J0IGZ1dHVyZS5rZXl3b3Jkcy5pbgoKYXBpX3ZlcnNpb24gOj0gIjAuMTAuMCIKZnJhbWV3b3JrX3ZlcnNpb24gOj0gIjAuMi4zIgoKZnJhZ21lbnRzIDo9IFsKICB7CiAgICAiZmVlZCI6ICJtY3IubWljcm9zb2Z0LmNvbS9hY2kvYWNpLWNjLWluZnJhLWZyYWdtZW50IiwKICAgICJpbmNsdWRlcyI6IFsKICAgICAgImNvbnRhaW5lcnMiCiAgICBdLAogICAgImlzc3VlciI6ICJkaWQ6eDUwOTowOnNoYTI1NjpJX19pdUwyNW9YRVZGZFRQX2FCTHhfZVQxUlBIYkNRX0VDQlFmWVpwdDlzOjpla3U6MS4zLjYuMS40LjEuMzExLjc2LjU5LjEuMyIsCiAgICAibWluaW11bV9zdm4iOiAiMiIKICB9Cl0KCmNvbnRhaW5lcnMgOj0gW3siYWxsb3dfZWxldmF0ZWQiOnRydWUsImFsbG93X3N0ZGlvX2FjY2VzcyI6dHJ1ZSwiY29tbWFuZCI6WyJweXRob24zIl0sImVudl9ydWxlcyI6W3sicGF0dGVybiI6IlBBVEg9L3Vzci9sb2N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ay5tb3VudF9vdmVybGF5CnVubW91bnRfb3ZlcmxheSA6PSBkYXRhLmZyYW1ld29yay51bm1vdW50X292ZXJsYXkKY3JlYXRlX2NvbnRhaW5lciA6PSBkYXRhLmZyYW1ld29yay5jcmVhdGVfY29udGFpbmVyCmV4ZWNfaW5fY29udGFpbmVyIDo9IGRhdGEuZnJhbWV3b3JrLmV4ZWNfaW5fY29udGFpbmVyCmV4ZWNfZXh0ZXJuYWwgOj0gZGF0YS5mcmFtZXdvcmsuZXhlY19leHRlcm5hbApzaHV0ZG93bl9jb250YWluZXIgOj0gZGF0YS5mcmFtZXdvcmsuc2h1dGRvd25fY29udGFpbmVyCnNpZ25hbF9jb250YWluZXJfcHJvY2VzcyA6PSBkYXRhLmZyYW1ld29yay5zaWduYWxfY29udGFpbmVyX3Byb2Nlc3MKcGxhbjlfbW91bnQgOj0gZGF0YS5mcmFtZXdvcmsucGxhbjlfbW91bnQKcGxhbjlfdW5tb3VudCA6PSBkYXRhLmZyYW1ld29yay5wbGFuOV91bm1vdW50CmdldF9wcm9wZXJ0aWVzIDo9IGRhdGEuZnJhbWV3b3JrLmdldF9wcm9wZXJ0aWVzCmR1bXBfc3RhY2tzIDo9IGRhdGEuZnJhbWV3b3JrLmR1bXBfc3RhY2tzCnJ1bnRpbWVfbG9nZ2luZyA6PSBkYXRhLmZyYW1ld29yay5ydW50aW1lX2xvZ2dpbmcKbG9hZF9mcmFnbWVudCA6PSBkYXRhLmZyYW1ld29yay5sb2FkX2ZyYWdtZW50CnNjcmF0Y2hfbW91bnQgOj0gZGF0YS5mcmFtZXdvcmsuc2NyYXRjaF9tb3VudApzY3JhdGNoX3VubW91bnQgOj0gZGF0YS5mcmFtZXdvcmsuc2NyYXRjaF91bm1vdW50CgpyZWFzb24gOj0geyJlcnJvcnMiOiBkYXRhLmZyYW1ld29yay5lcnJvcnN9"
self.assertEqual(expected_policy, self.aci_arm_policy.get_serialized_output())
@@ -2006,8 +1984,8 @@ def test_multiple_policies(self):
output2 = self.aci_policy2.get_serialized_output()
self.assertTrue(output1 != output2)
- expected_output1 = "cGFja2FnZSBwb2xpY3kKCmltcG9ydCBmdXR1cmUua2V5d29yZHMuZXZlcnkKaW1wb3J0IGZ1dHVyZS5rZXl3b3Jkcy5pbgoKYXBpX3ZlcnNpb24gOj0gIjAuMTAuMCIKZnJhbWV3b3JrX3ZlcnNpb24gOj0gIjAuMi4zIgoKZnJhZ21lbnRzIDo9IFsKICB7CiAgICAiZmVlZCI6ICJtY3IubWljcm9zb2Z0LmNvbS9hY2kvYWNpLWNjLWluZnJhLWZyYWdtZW50IiwKICAgICJpbmNsdWRlcyI6IFsKICAgICAgImNvbnRhaW5lcnMiCiAgICBdLAogICAgImlzc3VlciI6ICJkaWQ6eDUwOTowOnNoYTI1NjpJX19pdUwyNW9YRVZGZFRQX2FCTHhfZVQxUlBIYkNRX0VDQlFmWVpwdDlzOjpla3U6MS4zLjYuMS40LjEuMzExLjc2LjU5LjEuMyIsCiAgICAibWluaW11bV9zdm4iOiAiMSIKICB9Cl0KCmNvbnRhaW5lcnMgOj0gW3siYWxsb3dfZWxldmF0ZWQiOnRydWUsImFsbG93X3N0ZGlvX2FjY2VzcyI6dHJ1ZSwiY29tbWFuZCI6WyJiYXNoIl0sImVudl9ydWxlcyI6W3sicGF0dGVybiI6IlBBVEg9L2N1c3RvbWl6ZWQvcGF0aC92YWx1ZSIsInJlcXVpcmVkIjpmYWxzZSwic3RyYXRlZ3kiOiJzdHJpbmcifSx7InBhdHRlcm4iOiJURVNUX1JFR0VYUF9FTlY9dGVzdF9yZWdleHBfZW52IiwicmVxdWlyZWQiOmZhbHNlLCJzdHJhdGVneSI6InN0cmluZyJ9LHsicGF0dGVybiI6IlJVU1RVUF9IT01FPS91c3IvbG9jYWwvcnVzdHVwIiwicmVxdWlyZWQiOmZhbHNlLCJzdHJhdGVneSI6InN0cmluZyJ9LHsicGF0dGVybiI6IkNBUkdPX0hPTUU9L3Vzci9sb2NhbC9jYXJnbyIsInJl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XIgOj0gZGF0YS5mcmFtZXdvcmsuZXhlY19pbl9jb250YWluZXIKZXhlY19leHRlcm5hbCA6PSBkYXRhLmZyYW1ld29yay5leGVjX2V4dGVybmFsCnNodXRkb3duX2NvbnRhaW5lciA6PSBkYXRhLmZyYW1ld29yay5zaHV0ZG93bl9jb250YWluZXIKc2lnbmFsX2NvbnRhaW5lcl9wcm9jZXNzIDo9IGRhdGEuZnJhbWV3b3JrLnNpZ25hbF9jb250YWluZXJfcHJvY2VzcwpwbGFuOV9tb3VudCA6PSBkYXRhLmZyYW1ld29yay5wbGFuOV9tb3VudApwbGFuOV91bm1vdW50IDo9IGRhdGEuZnJhbWV3b3JrLnBsYW45X3VubW91bnQKZ2V0X3Byb3BlcnRpZXMgOj0gZGF0YS5mcmFtZXdvcmsuZ2V0X3Byb3BlcnRpZXMKZHVtcF9zdGFja3MgOj0gZGF0YS5mcmFtZXdvcmsuZHVtcF9zdGFja3MKcnVudGltZV9sb2dnaW5nIDo9IGRhdGEuZnJhbWV3b3JrLnJ1bnRpbWVfbG9nZ2luZwpsb2FkX2ZyYWdtZW50IDo9IGRhdGEuZnJhbWV3b3JrLmxvYWRfZnJhZ21lbnQKc2NyYXRjaF9tb3VudCA6PSBkYXRhLmZyYW1ld29yay5zY3JhdGNoX21vdW50CnNjcmF0Y2hfdW5tb3VudCA6PSBkYXRhLmZyYW1ld29yay5zY3JhdGNoX3VubW91bnQKCnJlYXNvbiA6PSB7ImVycm9ycyI6IGRhdGEuZnJhbWV3b3JrLmVycm9yc30="
self.assertEqual(output1, expected_output1)
self.assertEqual(output2, expected_output2)
@@ -2190,13 +2168,11 @@ def setUpClass(cls):
def test_arm_template_with_init_container(self):
regular_image_json = json.loads(
self.aci_arm_policy.get_serialized_output(
- output_type=OutputType.RAW, use_json=True
+ output_type=OutputType.RAW, rego_boilerplate=False
)
)
- python_image_name = regular_image_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["1"].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ python_image_name = regular_image_json[1].pop(config.POLICY_FIELD_CONTAINERS_ID)
# see if the remote image and the local one produce the same output
self.assertTrue("python" in python_image_name)
diff --git a/src/confcom/azext_confcom/tests/latest/test_confcom_image.py b/src/confcom/azext_confcom/tests/latest/test_confcom_image.py
index 9fe463227d1..425923ef8dd 100644
--- a/src/confcom/azext_confcom/tests/latest/test_confcom_image.py
+++ b/src/confcom/azext_confcom/tests/latest/test_confcom_image.py
@@ -29,7 +29,7 @@ def setUpClass(cls):
cls.aci_policy = aci_policy
def test_image_policy(self):
- expected_policy = "cGFja2FnZSBwb2xpY3kKCmltcG9ydCBmdXR1cmUua2V5d29yZHMuZXZlcnkKaW1wb3J0IGZ1dHVyZS5rZXl3b3Jkcy5pbgoKYXBpX3ZlcnNpb24gOj0gIjAuMTAuMCIKZnJhbWV3b3JrX3ZlcnNpb24gOj0gIjAuMi4zIgoKZnJhZ21lbnRzIDo9IFsKICB7CiAgICAiZmVlZCI6ICJtY3IubWljcm9zb2Z0LmNvbS9hY2kvYWNpLWNjLWluZnJhLWZyYWdtZW50IiwKICAgICJpbmNsdWRlcyI6IFsKICAgICAgImNvbnRhaW5lcnMiCiAgICBdLAogICAgImlzc3VlciI6ICJkaWQ6eDUwOTowOnNoYTI1NjpJX19pdUwyNW9YRVZGZFRQX2FCTHhfZVQxUlBIYkNRX0VDQlFmWVpwdDlzOjpla3U6MS4zLjYuMS40LjEuMzExLjc2LjU5LjEuMyIsCiAgICAibWluaW11bV9zdm4iOiAiMSIKICB9Cl0KCmNvbnRhaW5lcnMgOj0gW3siYWxsb3dfZWxldmF0ZWQiOnRydWUsImFsbG93X3N0ZGlvX2FjY2VzcyI6dHJ1ZSwiY29tbWFuZCI6WyJweXRob24zIl0sImVudl9ydWxlcyI6W3sicGF0dGVybiI6IlBBVEg9L3Vzci9sb2NhbC9iaW46L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2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nJ1bnRpbWVfbG9nZ2luZwpsb2FkX2ZyYWdtZW50IDo9IGRhdGEuZnJhbWV3b3JrLmxvYWRfZnJhZ21lbnQKc2NyYXRjaF9tb3VudCA6PSBkYXRhLmZyYW1ld29yay5zY3JhdGNoX21vdW50CnNjcmF0Y2hfdW5tb3VudCA6PSBkYXRhLmZyYW1ld29yay5zY3JhdGNoX3VubW91bnQKCnJlYXNvbiA6PSB7ImVycm9ycyI6IGRhdGEuZnJhbWV3b3JrLmVycm9yc30="
# deep diff the output policies from the regular policy.json and the ARM template
aci_policy_str = self.aci_policy.get_serialized_output()
@@ -108,19 +108,15 @@ def test_clean_room_policy(self):
policy.populate_policy_content_for_all_images(individual_image=True)
regular_image_json = json.loads(
- regular_image.get_serialized_output(output_type=OutputType.RAW, use_json=True)
+ regular_image.get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False)
)
clean_room_json = json.loads(
- policy.get_serialized_output(output_type=OutputType.RAW, use_json=True)
+ policy.get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False)
)
- regular_image_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"].pop(config.POLICY_FIELD_CONTAINERS_ID)
- clean_room_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ regular_image_json[0].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ clean_room_json[0].pop(config.POLICY_FIELD_CONTAINERS_ID)
# see if the remote image and the local one produce the same output
self.assertEqual(
diff --git a/src/confcom/azext_confcom/tests/latest/test_confcom_scenario.py b/src/confcom/azext_confcom/tests/latest/test_confcom_scenario.py
index 9713cdfbcd2..26becc9b9a0 100644
--- a/src/confcom/azext_confcom/tests/latest/test_confcom_scenario.py
+++ b/src/confcom/azext_confcom/tests/latest/test_confcom_scenario.py
@@ -272,7 +272,7 @@ def setUpClass(cls):
cls.aci_policy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IubWljcm9zb2Z0LmNvbS9hY2kvbXNpLWF0bGFzLWFkYXB0ZXI6bWFzdGVyXzIwMjAxMjAzLjEiLCJsYXllcnMiOlsiNjA2ZmQ2YmFmNWViMWE3MWZkMjg2YWVhMjk2NzJhMDZiZmU1NWYwMDA3ZGVkOTJlZTczMTQyYTM3NTkwZWQxOSIsIjkwYWQyZjViMmM0MjVhN2M0NThmOWY1ZDIxY2YwNjRjMjE1ZjE0ZTQwNjgwMDk2OGY2NDRkMmFiMGI0ZDA0ZGYiLCIxYzRiNjM2NWE3YjkzODM4N2RmZDgyMjg2MmNhNDFhZTU0OTBiNTQ5MGU0YzI2ZWI0YjVkYTk2YzY0MDk2MGNmIl0sIm1vdW50cyI6W10sInNpZ25hbHMiOltdLCJ3b3JraW5nX2RpciI6Ii9yb290LyJ9XQ=="
image = self.aci_policy.get_images()[0]
self.assertEqual(image.base, "mcr.microsoft.com/aci/msi-atlas-adapter")
self.assertIsNotNone(image)
@@ -281,7 +281,7 @@ def test_injected_sidecar_container_msi(self):
expected_workingdir = "/root/"
self.assertEqual(image._workingDir, expected_workingdir)
self.assertEqual(
- self.aci_policy.get_serialized_output(use_json=True),
+ self.aci_policy.get_serialized_output(),
expected_sidecar_container_ser,
)
@@ -400,11 +400,9 @@ def test_sidecar_stdio_access_default(self):
self.assertTrue(
json.loads(
self.aci_policy.get_serialized_output(
- use_json=True, output_type=OutputType.RAW
+ output_type=OutputType.RAW, rego_boilerplate=False
)
- )[config.POLICY_FIELD_CONTAINERS][config.POLICY_FIELD_CONTAINERS_ELEMENTS][
- "0"
- ][
+ )[0][
config.POLICY_FIELD_CONTAINERS_ALLOW_STDIO_ACCESS
]
)
@@ -661,12 +659,8 @@ def test_stdio_access_default(self):
aci_policy.populate_policy_content_for_all_images()
self.assertTrue(
json.loads(
- aci_policy.get_serialized_output(use_json=True, output_type=OutputType.RAW)
- )[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ][
- "0"
- ][
+ aci_policy.get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False)
+ )[0][
config.POLICY_FIELD_CONTAINERS_ALLOW_STDIO_ACCESS
]
)
@@ -690,12 +684,8 @@ def test_stdio_access_updated(self):
self.assertFalse(
json.loads(
- aci_policy.get_serialized_output(use_json=True, output_type=OutputType.RAW)
- )[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ][
- "0"
- ][
+ aci_policy.get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False)
+ )[0][
config.POLICY_FIELD_CONTAINERS_ALLOW_STDIO_ACCESS
]
)
diff --git a/src/confcom/azext_confcom/tests/latest/test_confcom_tar.py b/src/confcom/azext_confcom/tests/latest/test_confcom_tar.py
index 263438c4171..4a525697c6a 100644
--- a/src/confcom/azext_confcom/tests/latest/test_confcom_tar.py
+++ b/src/confcom/azext_confcom/tests/latest/test_confcom_tar.py
@@ -191,19 +191,15 @@ def test_arm_template_with_parameter_file_clean_room_tar(self):
os.remove(self.image_path)
regular_image_json = json.loads(
- regular_image.get_serialized_output(output_type=OutputType.RAW, use_json=True)
+ regular_image.get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False)
)
clean_room_json = json.loads(
- clean_room_image.get_serialized_output(output_type=OutputType.RAW, use_json=True)
+ clean_room_image.get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False)
)
- regular_image_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"].pop(config.POLICY_FIELD_CONTAINERS_ID)
- clean_room_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ regular_image_json[0].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ clean_room_json[0].pop(config.POLICY_FIELD_CONTAINERS_ID)
# see if the remote image and the local one produce the same output
self.assertEqual(
@@ -408,25 +404,17 @@ def test_arm_template_mixed_mode_tar(self):
os.remove(image_path)
regular_image_json = json.loads(
- regular_image.get_serialized_output(output_type=OutputType.RAW, use_json=True)
+ regular_image.get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False)
)
clean_room_json = json.loads(
- clean_room_image.get_serialized_output(output_type=OutputType.RAW, use_json=True)
+ clean_room_image.get_serialized_output(output_type=OutputType.RAW, rego_boilerplate=False)
)
- regular_image_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"].pop(config.POLICY_FIELD_CONTAINERS_ID)
- clean_room_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["0"].pop(config.POLICY_FIELD_CONTAINERS_ID)
- regular_image_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["1"].pop(config.POLICY_FIELD_CONTAINERS_ID)
- clean_room_json[config.POLICY_FIELD_CONTAINERS][
- config.POLICY_FIELD_CONTAINERS_ELEMENTS
- ]["1"].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ regular_image_json[0].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ clean_room_json[0].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ regular_image_json[1].pop(config.POLICY_FIELD_CONTAINERS_ID)
+ clean_room_json[1].pop(config.POLICY_FIELD_CONTAINERS_ID)
# see if the remote image and the local one produce the same output
self.assertEqual(