mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 14:55:00 +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 enum import Enum
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
@@ -140,9 +139,8 @@ class GeoRestrictionType(Enum):
|
|||||||
whitelist = "whitelist"
|
whitelist = "whitelist"
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
class DefaultCacheConfigBehaviour(BaseModel):
|
||||||
class DefaultCacheConfigBehaviour:
|
realtime_log_config_arn: Optional[str]
|
||||||
realtime_log_config_arn: str
|
|
||||||
viewer_protocol_policy: ViewerProtocolPolicy
|
viewer_protocol_policy: ViewerProtocolPolicy
|
||||||
field_level_encryption_id: str
|
field_level_encryption_id: str
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ from moto import mock_cloudfront
|
|||||||
from moto.core import DEFAULT_ACCOUNT_ID
|
from moto.core import DEFAULT_ACCOUNT_ID
|
||||||
|
|
||||||
from prowler.providers.aws.lib.audit_info.models import AWS_Audit_Info
|
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
|
# Mock Test Region
|
||||||
AWS_REGION = "eu-west-1"
|
AWS_REGION = "eu-west-1"
|
||||||
@@ -247,7 +250,7 @@ class Test_CloudFront_Service:
|
|||||||
cloudfront.distributions[
|
cloudfront.distributions[
|
||||||
cloudfront_distribution_id
|
cloudfront_distribution_id
|
||||||
].default_cache_config.viewer_protocol_policy
|
].default_cache_config.viewer_protocol_policy
|
||||||
== "https-only"
|
== ViewerProtocolPolicy.https_only
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
cloudfront.distributions[
|
cloudfront.distributions[
|
||||||
|
|||||||
Reference in New Issue
Block a user