We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug]: cloudfront_distributions_https_enabled false positive
### Steps to Reproduce

Prowler reports cloudfront_distributions_https_enabled as failed when the cloudfront distribution has "Redirect HTTP to HTTPS"  set in viewer protocol policy on behavior.

### Expected behavior

For the example attached, it should "PASS".

### Actual Result with Screenshots or Logs

```
{
    "ETag": "XXXXXXXX",
    "DistributionConfig": {
        "CallerReference": "1561029664879",
        "Aliases": {
            "Quantity": 1,
            "Items": [
                xxxxxxxxx"
            ]
        },
        "DefaultRootObject": "",
        "Origins": {
            "Quantity": 1,
            "Items": [
                {
                    "Id": "xxxxxxxx",
                    "DomainName": "xxxxxxxx",
                    "OriginPath": "",
                    "CustomHeaders": {
                        "Quantity": 0
                    },
                    "S3OriginConfig": {
                        "OriginAccessIdentity": ""
                    },
                    "ConnectionAttempts": 3,
                    "ConnectionTimeout": 10,
                    "OriginShield": {
                        "Enabled": false
                    },
                    "OriginAccessControlId": ""
                }
            ]
        },
        "OriginGroups": {
            "Quantity": 0
        },
        "DefaultCacheBehavior": {
            "TargetOriginId": "xxxxxxxx",
            "TrustedSigners": {
                "Enabled": false,
                "Quantity": 0
            },
            "TrustedKeyGroups": {
                "Enabled": false,
                "Quantity": 0
            },
            "ViewerProtocolPolicy": "redirect-to-https",
            "AllowedMethods": {
                "Quantity": 2,
                "Items": [
                    "HEAD",
                    "GET"
                ],
                "CachedMethods": {
                    "Quantity": 2,
                    "Items": [
                        "HEAD",
                        "GET"
                    ]
                }
            },
            "SmoothStreaming": false,
            "Compress": true,
            "LambdaFunctionAssociations": {
                "Quantity": 0
            },
            "FunctionAssociations": {
                "Quantity": 0
            },
            "FieldLevelEncryptionId": "",
            "ResponseHeadersPolicyId": "4dde66c4-bea6-48eb-9d5c-520b29617292",
            "ForwardedValues": {
                "QueryString": true,
                "Cookies": {
                    "Forward": "none"
                },
                "Headers": {
                    "Quantity": 2,
                    "Items": [
                        "Origin",
                        "Referer"
                    ]
                },
                "QueryStringCacheKeys": {
                    "Quantity": 0
                }
            },
            "MinTTL": 0,
            "DefaultTTL": 86400,
            "MaxTTL": 31536000
        },
        "CacheBehaviors": {
            "Quantity": 0
        },
        "CustomErrorResponses": {
            "Quantity": 0
        },
        "Comment": "xxxxxxx",
        "Logging": {
            "Enabled": true,
            "IncludeCookies": false,
            "Bucket": "xxxxxxx",
            "Prefix": "xxxxxxx"
        },
        "PriceClass": "PriceClass_100",
        "Enabled": true,
        "ViewerCertificate": {
            "CloudFrontDefaultCertificate": false,
            "ACMCertificateArn": "xxxxxxxx",
            "SSLSupportMethod": "sni-only",
            "MinimumProtocolVersion": "TLSv1.2_2021",
            "Certificate": "xxxxxxxxxxxxx",
            "CertificateSource": "acm"
        },
        "Restrictions": {
            "GeoRestriction": {
                "RestrictionType": "none",
                "Quantity": 0
            }
        },
        "WebACLId": "",
        "HttpVersion": "http2and3",
        "IsIPV6Enabled": true,
        "ContinuousDeploymentPolicyId": "",
        "Staging": false
    }
}
```

### How did you install Prowler?

Docker (docker pull toniblyx/prowler)

### Environment Resource

7. Workstation

### OS used

5. Docker

### Prowler version

3.5.3

### Pip version

From official docker image

### Context

_No response_

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `prowler/providers/aws/services/cloudfront/cloudfront_service.py`
Content:
```
1 from dataclasses import dataclass
2 from enum import Enum
3 from typing import Optional
4 
5 from pydantic import BaseModel
6 
7 from prowler.lib.logger import logger
8 from prowler.lib.scan_filters.scan_filters import is_resource_filtered
9 from prowler.providers.aws.aws_provider import generate_regional_clients
10 
11 
12 ################## CloudFront
13 class CloudFront:
14     def __init__(self, audit_info):
15         self.service = "cloudfront"
16         self.session = audit_info.audit_session
17         self.audited_account = audit_info.audited_account
18         self.audit_resources = audit_info.audit_resources
19         global_client = generate_regional_clients(
20             self.service, audit_info, global_service=True
21         )
22         self.distributions = {}
23         if global_client:
24             self.client = list(global_client.values())[0]
25             self.region = self.client.region
26             self.__list_distributions__(self.client, self.region)
27             self.__get_distribution_config__(
28                 self.client, self.distributions, self.region
29             )
30             self.__list_tags_for_resource__(
31                 self.client, self.distributions, self.region
32             )
33 
34     def __get_session__(self):
35         return self.session
36 
37     def __list_distributions__(self, client, region) -> dict:
38         logger.info("CloudFront - Listing Distributions...")
39         try:
40             list_ditributions_paginator = client.get_paginator("list_distributions")
41             for page in list_ditributions_paginator.paginate():
42                 if "Items" in page["DistributionList"]:
43                     for item in page["DistributionList"]["Items"]:
44                         if not self.audit_resources or (
45                             is_resource_filtered(item["ARN"], self.audit_resources)
46                         ):
47                             distribution_id = item["Id"]
48                             distribution_arn = item["ARN"]
49                             origins = item["Origins"]["Items"]
50                             distribution = Distribution(
51                                 arn=distribution_arn,
52                                 id=distribution_id,
53                                 origins=origins,
54                                 region=region,
55                             )
56                             self.distributions[distribution_id] = distribution
57 
58         except Exception as error:
59             logger.error(
60                 f"{region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
61             )
62 
63     def __get_distribution_config__(self, client, distributions, region) -> dict:
64         logger.info("CloudFront - Getting Distributions...")
65         try:
66             for distribution_id in distributions.keys():
67                 distribution_config = client.get_distribution_config(Id=distribution_id)
68                 # Global Config
69                 distributions[distribution_id].logging_enabled = distribution_config[
70                     "DistributionConfig"
71                 ]["Logging"]["Enabled"]
72                 distributions[
73                     distribution_id
74                 ].geo_restriction_type = distribution_config["DistributionConfig"][
75                     "Restrictions"
76                 ][
77                     "GeoRestriction"
78                 ][
79                     "RestrictionType"
80                 ]
81                 distributions[distribution_id].web_acl_id = distribution_config[
82                     "DistributionConfig"
83                 ]["WebACLId"]
84 
85                 # Default Cache Config
86                 default_cache_config = DefaultCacheConfigBehaviour(
87                     realtime_log_config_arn=distribution_config["DistributionConfig"][
88                         "DefaultCacheBehavior"
89                     ].get("RealtimeLogConfigArn"),
90                     viewer_protocol_policy=distribution_config["DistributionConfig"][
91                         "DefaultCacheBehavior"
92                     ].get("ViewerProtocolPolicy"),
93                     field_level_encryption_id=distribution_config["DistributionConfig"][
94                         "DefaultCacheBehavior"
95                     ].get("FieldLevelEncryptionId"),
96                 )
97                 distributions[
98                     distribution_id
99                 ].default_cache_config = default_cache_config
100 
101         except Exception as error:
102             logger.error(
103                 f"{region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
104             )
105 
106     def __list_tags_for_resource__(self, client, distributions, region):
107         logger.info("CloudFront - List Tags...")
108         try:
109             for distribution in distributions.values():
110                 response = client.list_tags_for_resource(Resource=distribution.arn)[
111                     "Tags"
112                 ]
113                 distribution.tags = response.get("Items")
114         except Exception as error:
115             logger.error(
116                 f"{region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
117             )
118 
119 
120 class OriginsSSLProtocols(Enum):
121     SSLv3 = "SSLv3"
122     TLSv1 = "TLSv1"
123     TLSv1_1 = "TLSv1.1"
124     TLSv1_2 = "TLSv1.2"
125 
126 
127 class ViewerProtocolPolicy(Enum):
128     """The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern"""
129 
130     allow_all = "allow-all"
131     redirect_to_https = "redirect-to-https"
132     https_only = "https-only"
133 
134 
135 class GeoRestrictionType(Enum):
136     """Method types that you want to use to restrict distribution of your content by country"""
137 
138     none = "none"
139     blacklist = "blacklist"
140     whitelist = "whitelist"
141 
142 
143 @dataclass
144 class DefaultCacheConfigBehaviour:
145     realtime_log_config_arn: str
146     viewer_protocol_policy: ViewerProtocolPolicy
147     field_level_encryption_id: str
148 
149 
150 class Distribution(BaseModel):
151     """Distribution holds a CloudFront Distribution with the required information to run the rela"""
152 
153     arn: str
154     id: str
155     region: str
156     logging_enabled: bool = False
157     default_cache_config: Optional[DefaultCacheConfigBehaviour]
158     geo_restriction_type: Optional[GeoRestrictionType]
159     origins: list
160     web_acl_id: str = ""
161     tags: Optional[list] = []
162
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/prowler/providers/aws/services/cloudfront/cloudfront_service.py b/prowler/providers/aws/services/cloudfront/cloudfront_service.py
--- a/prowler/providers/aws/services/cloudfront/cloudfront_service.py
+++ b/prowler/providers/aws/services/cloudfront/cloudfront_service.py
@@ -1,4 +1,3 @@
-from dataclasses import dataclass
 from enum import Enum
 from typing import Optional
 
@@ -140,9 +139,8 @@
     whitelist = "whitelist"
 
 
-@dataclass
-class DefaultCacheConfigBehaviour:
-    realtime_log_config_arn: str
+class DefaultCacheConfigBehaviour(BaseModel):
+    realtime_log_config_arn: Optional[str]
     viewer_protocol_policy: ViewerProtocolPolicy
     field_level_encryption_id: str

{"golden_diff": "diff --git a/prowler/providers/aws/services/cloudfront/cloudfront_service.py b/prowler/providers/aws/services/cloudfront/cloudfront_service.py\n--- a/prowler/providers/aws/services/cloudfront/cloudfront_service.py\n+++ b/prowler/providers/aws/services/cloudfront/cloudfront_service.py\n@@ -1,4 +1,3 @@\n-from dataclasses import dataclass\n from enum import Enum\n from typing import Optional\n \n@@ -140,9 +139,8 @@\n     whitelist = \"whitelist\"\n \n \n-@dataclass\n-class DefaultCacheConfigBehaviour:\n-    realtime_log_config_arn: str\n+class DefaultCacheConfigBehaviour(BaseModel):\n+    realtime_log_config_arn: Optional[str]\n     viewer_protocol_policy: ViewerProtocolPolicy\n     field_level_encryption_id: str\n", "issue": "[Bug]: cloudfront_distributions_https_enabled false positive\n### Steps to Reproduce\n\nProwler reports cloudfront_distributions_https_enabled as failed when the cloudfront distribution has \"Redirect HTTP to HTTPS\"  set in viewer protocol policy on behavior.\n\n### Expected behavior\n\nFor the example attached, it should \"PASS\".\n\n### Actual Result with Screenshots or Logs\n\n```\r\n{\r\n    \"ETag\": \"XXXXXXXX\",\r\n    \"DistributionConfig\": {\r\n        \"CallerReference\": \"1561029664879\",\r\n        \"Aliases\": {\r\n            \"Quantity\": 1,\r\n            \"Items\": [\r\n                xxxxxxxxx\"\r\n            ]\r\n        },\r\n        \"DefaultRootObject\": \"\",\r\n        \"Origins\": {\r\n            \"Quantity\": 1,\r\n            \"Items\": [\r\n                {\r\n                    \"Id\": \"xxxxxxxx\",\r\n                    \"DomainName\": \"xxxxxxxx\",\r\n                    \"OriginPath\": \"\",\r\n                    \"CustomHeaders\": {\r\n                        \"Quantity\": 0\r\n                    },\r\n                    \"S3OriginConfig\": {\r\n                        \"OriginAccessIdentity\": \"\"\r\n                    },\r\n                    \"ConnectionAttempts\": 3,\r\n                    \"ConnectionTimeout\": 10,\r\n                    \"OriginShield\": {\r\n                        \"Enabled\": false\r\n                    },\r\n                    \"OriginAccessControlId\": \"\"\r\n                }\r\n            ]\r\n        },\r\n        \"OriginGroups\": {\r\n            \"Quantity\": 0\r\n        },\r\n        \"DefaultCacheBehavior\": {\r\n            \"TargetOriginId\": \"xxxxxxxx\",\r\n            \"TrustedSigners\": {\r\n                \"Enabled\": false,\r\n                \"Quantity\": 0\r\n            },\r\n            \"TrustedKeyGroups\": {\r\n                \"Enabled\": false,\r\n                \"Quantity\": 0\r\n            },\r\n            \"ViewerProtocolPolicy\": \"redirect-to-https\",\r\n            \"AllowedMethods\": {\r\n                \"Quantity\": 2,\r\n                \"Items\": [\r\n                    \"HEAD\",\r\n                    \"GET\"\r\n                ],\r\n                \"CachedMethods\": {\r\n                    \"Quantity\": 2,\r\n                    \"Items\": [\r\n                        \"HEAD\",\r\n                        \"GET\"\r\n                    ]\r\n                }\r\n            },\r\n            \"SmoothStreaming\": false,\r\n            \"Compress\": true,\r\n            \"LambdaFunctionAssociations\": {\r\n                \"Quantity\": 0\r\n            },\r\n            \"FunctionAssociations\": {\r\n                \"Quantity\": 0\r\n            },\r\n            \"FieldLevelEncryptionId\": \"\",\r\n            \"ResponseHeadersPolicyId\": \"4dde66c4-bea6-48eb-9d5c-520b29617292\",\r\n            \"ForwardedValues\": {\r\n                \"QueryString\": true,\r\n                \"Cookies\": {\r\n                    \"Forward\": \"none\"\r\n                },\r\n                \"Headers\": {\r\n                    \"Quantity\": 2,\r\n                    \"Items\": [\r\n                        \"Origin\",\r\n                        \"Referer\"\r\n                    ]\r\n                },\r\n                \"QueryStringCacheKeys\": {\r\n                    \"Quantity\": 0\r\n                }\r\n            },\r\n            \"MinTTL\": 0,\r\n            \"DefaultTTL\": 86400,\r\n            \"MaxTTL\": 31536000\r\n        },\r\n        \"CacheBehaviors\": {\r\n            \"Quantity\": 0\r\n        },\r\n        \"CustomErrorResponses\": {\r\n            \"Quantity\": 0\r\n        },\r\n        \"Comment\": \"xxxxxxx\",\r\n        \"Logging\": {\r\n            \"Enabled\": true,\r\n            \"IncludeCookies\": false,\r\n            \"Bucket\": \"xxxxxxx\",\r\n            \"Prefix\": \"xxxxxxx\"\r\n        },\r\n        \"PriceClass\": \"PriceClass_100\",\r\n        \"Enabled\": true,\r\n        \"ViewerCertificate\": {\r\n            \"CloudFrontDefaultCertificate\": false,\r\n            \"ACMCertificateArn\": \"xxxxxxxx\",\r\n            \"SSLSupportMethod\": \"sni-only\",\r\n            \"MinimumProtocolVersion\": \"TLSv1.2_2021\",\r\n            \"Certificate\": \"xxxxxxxxxxxxx\",\r\n            \"CertificateSource\": \"acm\"\r\n        },\r\n        \"Restrictions\": {\r\n            \"GeoRestriction\": {\r\n                \"RestrictionType\": \"none\",\r\n                \"Quantity\": 0\r\n            }\r\n        },\r\n        \"WebACLId\": \"\",\r\n        \"HttpVersion\": \"http2and3\",\r\n        \"IsIPV6Enabled\": true,\r\n        \"ContinuousDeploymentPolicyId\": \"\",\r\n        \"Staging\": false\r\n    }\r\n}\r\n```\n\n### How did you install Prowler?\n\nDocker (docker pull toniblyx/prowler)\n\n### Environment Resource\n\n7. Workstation\n\n### OS used\n\n5. Docker\n\n### Prowler version\n\n3.5.3\n\n### Pip version\n\nFrom official docker image\n\n### Context\n\n_No response_\n", "before_files": [{"content": "from dataclasses import dataclass\nfrom enum import Enum\nfrom typing import Optional\n\nfrom pydantic import BaseModel\n\nfrom prowler.lib.logger import logger\nfrom prowler.lib.scan_filters.scan_filters import is_resource_filtered\nfrom prowler.providers.aws.aws_provider import generate_regional_clients\n\n\n################## CloudFront\nclass CloudFront:\n    def __init__(self, audit_info):\n        self.service = \"cloudfront\"\n        self.session = audit_info.audit_session\n        self.audited_account = audit_info.audited_account\n        self.audit_resources = audit_info.audit_resources\n        global_client = generate_regional_clients(\n            self.service, audit_info, global_service=True\n        )\n        self.distributions = {}\n        if global_client:\n            self.client = list(global_client.values())[0]\n            self.region = self.client.region\n            self.__list_distributions__(self.client, self.region)\n            self.__get_distribution_config__(\n                self.client, self.distributions, self.region\n            )\n            self.__list_tags_for_resource__(\n                self.client, self.distributions, self.region\n            )\n\n    def __get_session__(self):\n        return self.session\n\n    def __list_distributions__(self, client, region) -> dict:\n        logger.info(\"CloudFront - Listing Distributions...\")\n        try:\n            list_ditributions_paginator = client.get_paginator(\"list_distributions\")\n            for page in list_ditributions_paginator.paginate():\n                if \"Items\" in page[\"DistributionList\"]:\n                    for item in page[\"DistributionList\"][\"Items\"]:\n                        if not self.audit_resources or (\n                            is_resource_filtered(item[\"ARN\"], self.audit_resources)\n                        ):\n                            distribution_id = item[\"Id\"]\n                            distribution_arn = item[\"ARN\"]\n                            origins = item[\"Origins\"][\"Items\"]\n                            distribution = Distribution(\n                                arn=distribution_arn,\n                                id=distribution_id,\n                                origins=origins,\n                                region=region,\n                            )\n                            self.distributions[distribution_id] = distribution\n\n        except Exception as error:\n            logger.error(\n                f\"{region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}\"\n            )\n\n    def __get_distribution_config__(self, client, distributions, region) -> dict:\n        logger.info(\"CloudFront - Getting Distributions...\")\n        try:\n            for distribution_id in distributions.keys():\n                distribution_config = client.get_distribution_config(Id=distribution_id)\n                # Global Config\n                distributions[distribution_id].logging_enabled = distribution_config[\n                    \"DistributionConfig\"\n                ][\"Logging\"][\"Enabled\"]\n                distributions[\n                    distribution_id\n                ].geo_restriction_type = distribution_config[\"DistributionConfig\"][\n                    \"Restrictions\"\n                ][\n                    \"GeoRestriction\"\n                ][\n                    \"RestrictionType\"\n                ]\n                distributions[distribution_id].web_acl_id = distribution_config[\n                    \"DistributionConfig\"\n                ][\"WebACLId\"]\n\n                # Default Cache Config\n                default_cache_config = DefaultCacheConfigBehaviour(\n                    realtime_log_config_arn=distribution_config[\"DistributionConfig\"][\n                        \"DefaultCacheBehavior\"\n                    ].get(\"RealtimeLogConfigArn\"),\n                    viewer_protocol_policy=distribution_config[\"DistributionConfig\"][\n                        \"DefaultCacheBehavior\"\n                    ].get(\"ViewerProtocolPolicy\"),\n                    field_level_encryption_id=distribution_config[\"DistributionConfig\"][\n                        \"DefaultCacheBehavior\"\n                    ].get(\"FieldLevelEncryptionId\"),\n                )\n                distributions[\n                    distribution_id\n                ].default_cache_config = default_cache_config\n\n        except Exception as error:\n            logger.error(\n                f\"{region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}\"\n            )\n\n    def __list_tags_for_resource__(self, client, distributions, region):\n        logger.info(\"CloudFront - List Tags...\")\n        try:\n            for distribution in distributions.values():\n                response = client.list_tags_for_resource(Resource=distribution.arn)[\n                    \"Tags\"\n                ]\n                distribution.tags = response.get(\"Items\")\n        except Exception as error:\n            logger.error(\n                f\"{region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}\"\n            )\n\n\nclass OriginsSSLProtocols(Enum):\n    SSLv3 = \"SSLv3\"\n    TLSv1 = \"TLSv1\"\n    TLSv1_1 = \"TLSv1.1\"\n    TLSv1_2 = \"TLSv1.2\"\n\n\nclass ViewerProtocolPolicy(Enum):\n    \"\"\"The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern\"\"\"\n\n    allow_all = \"allow-all\"\n    redirect_to_https = \"redirect-to-https\"\n    https_only = \"https-only\"\n\n\nclass GeoRestrictionType(Enum):\n    \"\"\"Method types that you want to use to restrict distribution of your content by country\"\"\"\n\n    none = \"none\"\n    blacklist = \"blacklist\"\n    whitelist = \"whitelist\"\n\n\n@dataclass\nclass DefaultCacheConfigBehaviour:\n    realtime_log_config_arn: str\n    viewer_protocol_policy: ViewerProtocolPolicy\n    field_level_encryption_id: str\n\n\nclass Distribution(BaseModel):\n    \"\"\"Distribution holds a CloudFront Distribution with the required information to run the rela\"\"\"\n\n    arn: str\n    id: str\n    region: str\n    logging_enabled: bool = False\n    default_cache_config: Optional[DefaultCacheConfigBehaviour]\n    geo_restriction_type: Optional[GeoRestrictionType]\n    origins: list\n    web_acl_id: str = \"\"\n    tags: Optional[list] = []\n", "path": "prowler/providers/aws/services/cloudfront/cloudfront_service.py"}], "after_files": [{"content": "from enum import Enum\nfrom typing import Optional\n\nfrom pydantic import BaseModel\n\nfrom prowler.lib.logger import logger\nfrom prowler.lib.scan_filters.scan_filters import is_resource_filtered\nfrom prowler.providers.aws.aws_provider import generate_regional_clients\n\n\n################## CloudFront\nclass CloudFront:\n    def __init__(self, audit_info):\n        self.service = \"cloudfront\"\n        self.session = audit_info.audit_session\n        self.audited_account = audit_info.audited_account\n        self.audit_resources = audit_info.audit_resources\n        global_client = generate_regional_clients(\n            self.service, audit_info, global_service=True\n        )\n        self.distributions = {}\n        if global_client:\n            self.client = list(global_client.values())[0]\n            self.region = self.client.region\n            self.__list_distributions__(self.client, self.region)\n            self.__get_distribution_config__(\n                self.client, self.distributions, self.region\n            )\n            self.__list_tags_for_resource__(\n                self.client, self.distributions, self.region\n            )\n\n    def __get_session__(self):\n        return self.session\n\n    def __list_distributions__(self, client, region) -> dict:\n        logger.info(\"CloudFront - Listing Distributions...\")\n        try:\n            list_ditributions_paginator = client.get_paginator(\"list_distributions\")\n            for page in list_ditributions_paginator.paginate():\n                if \"Items\" in page[\"DistributionList\"]:\n                    for item in page[\"DistributionList\"][\"Items\"]:\n                        if not self.audit_resources or (\n                            is_resource_filtered(item[\"ARN\"], self.audit_resources)\n                        ):\n                            distribution_id = item[\"Id\"]\n                            distribution_arn = item[\"ARN\"]\n                            origins = item[\"Origins\"][\"Items\"]\n                            distribution = Distribution(\n                                arn=distribution_arn,\n                                id=distribution_id,\n                                origins=origins,\n                                region=region,\n                            )\n                            self.distributions[distribution_id] = distribution\n\n        except Exception as error:\n            logger.error(\n                f\"{region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}\"\n            )\n\n    def __get_distribution_config__(self, client, distributions, region) -> dict:\n        logger.info(\"CloudFront - Getting Distributions...\")\n        try:\n            for distribution_id in distributions.keys():\n                distribution_config = client.get_distribution_config(Id=distribution_id)\n                # Global Config\n                distributions[distribution_id].logging_enabled = distribution_config[\n                    \"DistributionConfig\"\n                ][\"Logging\"][\"Enabled\"]\n                distributions[\n                    distribution_id\n                ].geo_restriction_type = distribution_config[\"DistributionConfig\"][\n                    \"Restrictions\"\n                ][\n                    \"GeoRestriction\"\n                ][\n                    \"RestrictionType\"\n                ]\n                distributions[distribution_id].web_acl_id = distribution_config[\n                    \"DistributionConfig\"\n                ][\"WebACLId\"]\n\n                # Default Cache Config\n                default_cache_config = DefaultCacheConfigBehaviour(\n                    realtime_log_config_arn=distribution_config[\"DistributionConfig\"][\n                        \"DefaultCacheBehavior\"\n                    ].get(\"RealtimeLogConfigArn\"),\n                    viewer_protocol_policy=distribution_config[\"DistributionConfig\"][\n                        \"DefaultCacheBehavior\"\n                    ].get(\"ViewerProtocolPolicy\"),\n                    field_level_encryption_id=distribution_config[\"DistributionConfig\"][\n                        \"DefaultCacheBehavior\"\n                    ].get(\"FieldLevelEncryptionId\"),\n                )\n                distributions[\n                    distribution_id\n                ].default_cache_config = default_cache_config\n\n        except Exception as error:\n            logger.error(\n                f\"{region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}\"\n            )\n\n    def __list_tags_for_resource__(self, client, distributions, region):\n        logger.info(\"CloudFront - List Tags...\")\n        try:\n            for distribution in distributions.values():\n                response = client.list_tags_for_resource(Resource=distribution.arn)[\n                    \"Tags\"\n                ]\n                distribution.tags = response.get(\"Items\")\n        except Exception as error:\n            logger.error(\n                f\"{region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}\"\n            )\n\n\nclass OriginsSSLProtocols(Enum):\n    SSLv3 = \"SSLv3\"\n    TLSv1 = \"TLSv1\"\n    TLSv1_1 = \"TLSv1.1\"\n    TLSv1_2 = \"TLSv1.2\"\n\n\nclass ViewerProtocolPolicy(Enum):\n    \"\"\"The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern\"\"\"\n\n    allow_all = \"allow-all\"\n    redirect_to_https = \"redirect-to-https\"\n    https_only = \"https-only\"\n\n\nclass GeoRestrictionType(Enum):\n    \"\"\"Method types that you want to use to restrict distribution of your content by country\"\"\"\n\n    none = \"none\"\n    blacklist = \"blacklist\"\n    whitelist = \"whitelist\"\n\n\nclass DefaultCacheConfigBehaviour(BaseModel):\n    realtime_log_config_arn: Optional[str]\n    viewer_protocol_policy: ViewerProtocolPolicy\n    field_level_encryption_id: str\n\n\nclass Distribution(BaseModel):\n    \"\"\"Distribution holds a CloudFront Distribution with the required information to run the rela\"\"\"\n\n    arn: str\n    id: str\n    region: str\n    logging_enabled: bool = False\n    default_cache_config: Optional[DefaultCacheConfigBehaviour]\n    geo_restriction_type: Optional[GeoRestrictionType]\n    origins: list\n    web_acl_id: str = \"\"\n    tags: Optional[list] = []\n", "path": "prowler/providers/aws/services/cloudfront/cloudfront_service.py"}]}