mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 06:45:08 +00:00
fix(cloudfront): fix DefaultCacheConfigBehaviour enum type(#2430)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
This commit is contained in:
committed by
GitHub
parent
f8299d7f40
commit
2955975793
@@ -1,4 +1,3 @@
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
from typing import Optional
|
||||
|
||||
@@ -140,9 +139,8 @@ class GeoRestrictionType(Enum):
|
||||
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
|
||||
|
||||
|
||||
@@ -6,7 +6,10 @@ from moto import mock_cloudfront
|
||||
from moto.core import DEFAULT_ACCOUNT_ID
|
||||
|
||||
from prowler.providers.aws.lib.audit_info.models import AWS_Audit_Info
|
||||
from prowler.providers.aws.services.cloudfront.cloudfront_service import CloudFront
|
||||
from prowler.providers.aws.services.cloudfront.cloudfront_service import (
|
||||
CloudFront,
|
||||
ViewerProtocolPolicy,
|
||||
)
|
||||
|
||||
# Mock Test Region
|
||||
AWS_REGION = "eu-west-1"
|
||||
@@ -247,7 +250,7 @@ class Test_CloudFront_Service:
|
||||
cloudfront.distributions[
|
||||
cloudfront_distribution_id
|
||||
].default_cache_config.viewer_protocol_policy
|
||||
== "https-only"
|
||||
== ViewerProtocolPolicy.https_only
|
||||
)
|
||||
assert (
|
||||
cloudfront.distributions[
|
||||
|
||||
Reference in New Issue
Block a user