Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
narrieta@microsoft committed Oct 25, 2024
1 parent 2616790 commit f6c53ea
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions azurelinuxagent/ga/policy/policy_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def _parse_policy(policy):
@staticmethod
def _parse_policy_version(policy):
"""
Validate and return "policyVersion" attribute. If not a string in the format "x.y.z", raise InvalidPolicyError.
Validate and return "policyVersion" attribute. If not a string in the format "major[.minor[.patch]]", raise InvalidPolicyError.
If policy_version is greater than maximum supported version, raise InvalidPolicyError.
"""
version = _PolicyEngine._get_string(policy, attribute="policyVersion")
Expand Down Expand Up @@ -280,8 +280,6 @@ class ExtensionPolicyEngine(_PolicyEngine):
def should_allow_extension(self, extension_name):
"""
Return whether we should allow extension download based on policy.
extension_to_check is expected to be an Extension object.
If policy feature not enabled, return True.
If allowListedExtensionsOnly=true, return true only if extension present in "extensions" allowlist.
If allowListedExtensions=false, return true always.
Expand All @@ -298,7 +296,6 @@ def should_allow_extension(self, extension_name):
def should_enforce_signature_validation(self, extension_name):
"""
Return whether we should enforce signature based on policy.
If policy feature not enabled, return False.
Individual policy takes precedence over global.
"""
Expand Down

0 comments on commit f6c53ea

Please sign in to comment.