ethyca-fides 2.63.1b4__py2.py3-none-any.whl → 2.63.2__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.2.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.2.dist-info}/RECORD +110 -113
  3. fides/_version.py +3 -3
  4. fides/api/models/attachment.py +23 -36
  5. fides/api/models/detection_discovery/monitor_task.py +1 -0
  6. fides/api/service/privacy_request/dsr_package/dsr_report_builder.py +46 -264
  7. fides/api/service/privacy_request/dsr_package/templates/collection_index.html +9 -34
  8. fides/api/service/privacy_request/dsr_package/templates/item.html +37 -0
  9. fides/api/service/privacy_request/dsr_package/templates/main.css +2 -45
  10. fides/api/service/privacy_request/dsr_package/templates/welcome.html +8 -12
  11. fides/api/service/privacy_request/request_runner_service.py +139 -258
  12. fides/api/service/storage/gcs.py +3 -15
  13. fides/api/service/storage/s3.py +14 -28
  14. fides/api/service/storage/util.py +7 -45
  15. fides/api/tasks/storage.py +91 -85
  16. fides/ui-build/static/admin/404.html +1 -1
  17. fides/ui-build/static/admin/_next/static/{X2nvWLg2_-vsCTkhSWpzw → IrQqz_6ngcumU4YlWY9nL}/_buildManifest.js +1 -1
  18. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-8cab04871908cfeb.js +1 -0
  19. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-150d40428245ee0c.js +1 -0
  20. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-20cdb2c8a03deae1.js +1 -0
  21. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  22. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  23. fides/ui-build/static/admin/add-systems.html +1 -1
  24. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  25. fides/ui-build/static/admin/consent/configure.html +1 -1
  26. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  27. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  28. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  29. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  30. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  31. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  32. fides/ui-build/static/admin/consent/properties.html +1 -1
  33. fides/ui-build/static/admin/consent/reporting.html +1 -1
  34. fides/ui-build/static/admin/consent.html +1 -1
  35. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  36. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  37. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  38. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  39. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  40. fides/ui-build/static/admin/data-catalog.html +1 -1
  41. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  42. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  43. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  44. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  45. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  46. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  47. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  48. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  49. fides/ui-build/static/admin/datamap.html +1 -1
  50. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  51. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  52. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  53. fides/ui-build/static/admin/dataset/new.html +1 -1
  54. fides/ui-build/static/admin/dataset.html +1 -1
  55. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  56. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  57. fides/ui-build/static/admin/datastore-connection.html +1 -1
  58. fides/ui-build/static/admin/index.html +1 -1
  59. fides/ui-build/static/admin/integrations/[id].html +1 -1
  60. fides/ui-build/static/admin/integrations.html +1 -1
  61. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  62. fides/ui-build/static/admin/lib/fides-headless.js +1 -1
  63. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  64. fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
  65. fides/ui-build/static/admin/lib/fides.js +2 -2
  66. fides/ui-build/static/admin/login/[provider].html +1 -1
  67. fides/ui-build/static/admin/login.html +1 -1
  68. fides/ui-build/static/admin/messaging/[id].html +1 -1
  69. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  70. fides/ui-build/static/admin/messaging.html +1 -1
  71. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  72. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  73. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  74. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  75. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  76. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  77. fides/ui-build/static/admin/poc/forms.html +1 -1
  78. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  79. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  80. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  81. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  82. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  83. fides/ui-build/static/admin/privacy-requests.html +1 -1
  84. fides/ui-build/static/admin/properties/[id].html +1 -1
  85. fides/ui-build/static/admin/properties/add-property.html +1 -1
  86. fides/ui-build/static/admin/properties.html +1 -1
  87. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  88. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  89. fides/ui-build/static/admin/settings/about.html +1 -1
  90. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  91. fides/ui-build/static/admin/settings/consent.html +1 -1
  92. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  93. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  94. fides/ui-build/static/admin/settings/domains.html +1 -1
  95. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  96. fides/ui-build/static/admin/settings/locations.html +1 -1
  97. fides/ui-build/static/admin/settings/organization.html +1 -1
  98. fides/ui-build/static/admin/settings/regulations.html +1 -1
  99. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  100. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  101. fides/ui-build/static/admin/systems.html +1 -1
  102. fides/ui-build/static/admin/taxonomy.html +1 -1
  103. fides/ui-build/static/admin/user-management/new.html +1 -1
  104. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  105. fides/ui-build/static/admin/user-management.html +1 -1
  106. fides/api/service/privacy_request/attachment_handling.py +0 -132
  107. fides/api/service/privacy_request/dsr_package/templates/attachments_index.html +0 -33
  108. fides/api/tasks/csv_utils.py +0 -170
  109. fides/api/tasks/encryption_utils.py +0 -42
  110. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-c583a61302f02add.js +0 -1
  111. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-20d20a8d1736f7c4.js +0 -1
  112. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-0e557d79e1e43c2b.js +0 -1
  113. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.2.dist-info}/WHEEL +0 -0
  114. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.2.dist-info}/entry_points.txt +0 -0
  115. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.2.dist-info}/licenses/LICENSE +0 -0
  116. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.2.dist-info}/top_level.txt +0 -0
  117. /fides/ui-build/static/admin/_next/static/{X2nvWLg2_-vsCTkhSWpzw → IrQqz_6ngcumU4YlWY9nL}/_ssgManifest.js +0 -0
@@ -1,7 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from io import BytesIO
4
- from typing import IO, Any, Dict, Optional, Tuple, Union
3
+ from typing import IO, Any, Dict, Tuple, Union
5
4
 
6
5
  from boto3.s3.transfer import TransferConfig
7
6
  from botocore.exceptions import ClientError, ParamValidationError
@@ -35,7 +34,7 @@ def maybe_get_s3_client(
35
34
 
36
35
 
37
36
  def create_presigned_url_for_s3(
38
- s3_client: Any, bucket_name: str, file_key: str, ttl_seconds: Optional[int] = None
37
+ s3_client: Any, bucket_name: str, file_key: str
39
38
  ) -> AnyHttpUrlString:
40
39
  """
41
40
  Generates a presigned URL to share an S3 object
@@ -46,16 +45,10 @@ def create_presigned_url_for_s3(
46
45
  :return: Presigned URL as string.
47
46
  """
48
47
  params = {"Bucket": bucket_name, "Key": file_key}
49
- if ttl_seconds:
50
- if ttl_seconds > 604800:
51
- raise ValueError("TTL must be less than 7 days")
52
- expires_in = ttl_seconds
53
- else:
54
- expires_in = CONFIG.security.subject_request_download_link_ttl_seconds
55
48
  response = s3_client.generate_presigned_url(
56
49
  "get_object",
57
50
  Params=params,
58
- ExpiresIn=expires_in,
51
+ ExpiresIn=CONFIG.security.subject_request_download_link_ttl_seconds,
59
52
  )
60
53
 
61
54
  # The response contains the presigned URL
@@ -75,7 +68,7 @@ def generic_upload_to_s3( # pylint: disable=R0913
75
68
  file_key: str,
76
69
  auth_method: str,
77
70
  document: IO[bytes],
78
- size_threshold: int = LARGE_FILE_THRESHOLD, # 25 MB threshold
71
+ size_threshold: int = LARGE_FILE_THRESHOLD, # 5 MB threshold
79
72
  ) -> Tuple[int, AnyHttpUrlString]:
80
73
  """
81
74
  Uploads file like objects to S3.
@@ -137,8 +130,7 @@ def generic_retrieve_from_s3(
137
130
  file_key: str,
138
131
  auth_method: str,
139
132
  get_content: bool = False,
140
- ttl_seconds: Optional[int] = None,
141
- ) -> Tuple[int, Union[str, IO[bytes]]]:
133
+ ) -> Tuple[int, Union[str, bytes]]:
142
134
  """
143
135
  Retrieves a file from S3 and returns its size and either a presigned URL or the actual content.
144
136
 
@@ -156,23 +148,17 @@ def generic_retrieve_from_s3(
156
148
  s3_client = get_s3_client(auth_method, storage_secrets)
157
149
 
158
150
  try:
159
- # Get file size using head_object
160
- size_response = s3_client.head_object(Bucket=bucket_name, Key=file_key)
161
- # If the file is less than 25MB, we can get the content otherwise return the presigned URL
162
- if get_content and size_response["ContentLength"] <= LARGE_FILE_THRESHOLD:
163
- # Get the actual content using download_fileobj
164
- file_obj = BytesIO()
165
- s3_client.download_fileobj(
166
- Bucket=bucket_name, Key=file_key, Fileobj=file_obj
167
- )
168
- file_obj.seek(0) # Reset file pointer to beginning
169
- return int(size_response["ContentLength"]), file_obj
151
+ if get_content:
152
+ # Get the actual content
153
+ response = s3_client.get_object(Bucket=bucket_name, Key=file_key)
154
+ content = response["Body"].read()
155
+ return response["ContentLength"], content
170
156
 
171
157
  # Get presigned URL
172
- presigned_url = create_presigned_url_for_s3(
173
- s3_client, bucket_name, file_key, ttl_seconds
174
- )
175
- return int(size_response["ContentLength"]), str(presigned_url)
158
+ presigned_url = create_presigned_url_for_s3(s3_client, bucket_name, file_key)
159
+ # Get file size
160
+ response = s3_client.head_object(Bucket=bucket_name, Key=file_key)
161
+ return int(response["ContentLength"]), str(presigned_url)
176
162
  except ClientError as e:
177
163
  logger.error(f"Error retrieving file from S3: {e}")
178
164
  raise e
@@ -3,10 +3,6 @@ from enum import Enum as EnumType
3
3
 
4
4
  from loguru import logger
5
5
 
6
- # This is the max file size for downloading the content of an attachment.
7
- # This is an industry standard used by companies like Google and Microsoft.
8
- LARGE_FILE_THRESHOLD = 25 * 1024 * 1024 # 25 MB
9
-
10
6
 
11
7
  class AllowedFileType(EnumType):
12
8
  """
@@ -28,49 +24,15 @@ class AllowedFileType(EnumType):
28
24
 
29
25
  LOCAL_FIDES_UPLOAD_DIRECTORY = "fides_uploads"
30
26
 
27
+ # Default to 10MB if not specified in environment
28
+ LARGE_FILE_THRESHOLD = 10 * 1024 * 1024 # 10 MB threshold
31
29
 
32
- def get_local_filename(file_key: str) -> str:
33
- """Verifies that the local storage directory exists and returns the local filepath.
34
-
35
- This extra security checks are to prevent directory traversal attacks and "complete business and technical destruction".
36
- Thanks Claude.
37
-
38
- Args:
39
- file_key: The key/path for the file
40
-
41
- Returns:
42
- The full local filepath
43
-
44
- Raises:
45
- ValueError: If the file_key is invalid or would result in a path outside the upload directory
46
- """
47
- # Basic validation
48
- if not file_key:
49
- raise ValueError("File key cannot be empty")
50
-
51
- # Security checks before normalization
52
- if file_key.startswith("/"):
53
- raise ValueError("Invalid file key: cannot start with '/'")
54
-
55
- # Normalize the path to handle any path separators consistently
56
- # First normalize using os.path.normpath to handle any redundant separators
57
- normalized_key = os.path.normpath(file_key)
58
- # Then convert all separators to forward slashes for consistency
59
- normalized_key = normalized_key.replace("\\", "/")
60
30
 
61
- # Additional security: ensure the final path is within the upload directory
62
- final_path = os.path.join(LOCAL_FIDES_UPLOAD_DIRECTORY, normalized_key)
63
- if not os.path.abspath(final_path).startswith(
64
- os.path.abspath(LOCAL_FIDES_UPLOAD_DIRECTORY)
65
- ):
66
- raise ValueError(
67
- "Invalid file key: would result in path outside upload directory"
68
- )
69
-
70
- # Create all necessary directories
71
- os.makedirs(os.path.dirname(final_path), exist_ok=True)
72
-
73
- return final_path
31
+ def get_local_filename(file_key: str) -> str:
32
+ """Verifies that the local storage directory exists and returns the local filepath"""
33
+ if not os.path.exists(LOCAL_FIDES_UPLOAD_DIRECTORY):
34
+ os.makedirs(LOCAL_FIDES_UPLOAD_DIRECTORY)
35
+ return f"{LOCAL_FIDES_UPLOAD_DIRECTORY}/{file_key}"
74
36
 
75
37
 
76
38
  def get_allowed_file_type_or_raise(file_key: str) -> str:
@@ -1,20 +1,23 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import json
4
+ import secrets
4
5
  import zipfile
5
6
  from io import BytesIO
6
- from typing import TYPE_CHECKING, Any, Optional
7
+ from typing import TYPE_CHECKING, Any, Dict, Optional, Union
7
8
 
9
+ import pandas as pd
8
10
  from botocore.exceptions import ClientError, ParamValidationError
9
11
  from fideslang.validation import AnyHttpUrlString
10
12
  from loguru import logger
11
13
 
12
14
  from fides.api.common_exceptions import StorageUploadError
15
+ from fides.api.cryptography.cryptographic_util import bytes_to_b64_str
13
16
  from fides.api.schemas.storage.storage import ResponseFormat, StorageSecrets
14
17
  from fides.api.service.privacy_request.dsr_package.dsr_report_builder import (
15
18
  DsrReportBuilder,
16
19
  )
17
- from fides.api.service.storage.gcs import get_gcs_blob
20
+ from fides.api.service.storage.gcs import get_gcs_client
18
21
  from fides.api.service.storage.s3 import (
19
22
  create_presigned_url_for_s3,
20
23
  generic_upload_to_s3,
@@ -23,9 +26,11 @@ from fides.api.service.storage.util import (
23
26
  LOCAL_FIDES_UPLOAD_DIRECTORY,
24
27
  get_local_filename,
25
28
  )
26
- from fides.api.tasks.csv_utils import write_csv_to_zip
27
- from fides.api.tasks.encryption_utils import encrypt_access_request_results
28
29
  from fides.api.util.aws_util import get_s3_client
30
+ from fides.api.util.cache import get_cache, get_encryption_cache_key
31
+ from fides.api.util.encryption.aes_gcm_encryption_scheme import (
32
+ encrypt_to_bytes_verify_secrets_length,
33
+ )
29
34
  from fides.api.util.storage_util import StorageJSONEncoder
30
35
  from fides.config import CONFIG
31
36
 
@@ -33,8 +38,33 @@ if TYPE_CHECKING:
33
38
  from fides.api.models.privacy_request import PrivacyRequest
34
39
 
35
40
 
41
+ def encrypt_access_request_results(data: Union[str, bytes], request_id: str) -> str:
42
+ """Encrypt data with encryption key if provided, otherwise return unencrypted data"""
43
+ cache = get_cache()
44
+ encryption_cache_key = get_encryption_cache_key(
45
+ privacy_request_id=request_id,
46
+ encryption_attr="key",
47
+ )
48
+ if isinstance(data, bytes):
49
+ data = data.decode(CONFIG.security.encoding)
50
+
51
+ encryption_key: str | None = cache.get(encryption_cache_key)
52
+ if not encryption_key:
53
+ return data
54
+
55
+ bytes_encryption_key: bytes = encryption_key.encode(
56
+ encoding=CONFIG.security.encoding
57
+ )
58
+ nonce: bytes = secrets.token_bytes(CONFIG.security.aes_gcm_nonce_length)
59
+ # b64encode the entire nonce and the encrypted message together
60
+ return bytes_to_b64_str(
61
+ nonce
62
+ + encrypt_to_bytes_verify_secrets_length(data, bytes_encryption_key, nonce)
63
+ )
64
+
65
+
36
66
  def write_to_in_memory_buffer(
37
- resp_format: str, data: dict[str, Any], privacy_request: PrivacyRequest
67
+ resp_format: str, data: Dict[str, Any], privacy_request: PrivacyRequest
38
68
  ) -> BytesIO:
39
69
  """Write JSON/CSV data to in-memory file-like object to be passed to S3 or GCS. Encrypt data if encryption key/nonce
40
70
  has been cached for the given privacy request id
@@ -43,62 +73,46 @@ def write_to_in_memory_buffer(
43
73
  :param data: Dict
44
74
  :param request_id: str, The privacy request id
45
75
  """
46
-
47
76
  logger.debug("Writing data to in-memory buffer")
48
- try:
49
- if resp_format == ResponseFormat.html.value:
50
- return DsrReportBuilder(
51
- privacy_request=privacy_request,
52
- dsr_data=data,
53
- ).generate()
54
-
55
- if resp_format == ResponseFormat.json.value:
56
- return convert_dict_to_encrypted_json(data, privacy_request.id)
57
-
58
- if resp_format == ResponseFormat.csv.value:
59
- zipped_csvs = BytesIO()
60
- with zipfile.ZipFile(zipped_csvs, "w") as f:
61
- write_csv_to_zip(f, data, privacy_request.id)
62
- zipped_csvs.seek(0)
63
- return zipped_csvs
64
- except Exception as e:
65
- logger.error(f"Error writing data to in-memory buffer: {str(e)}")
66
- raise e
67
-
68
- raise NotImplementedError(f"No handling for response format {resp_format}.")
69
-
70
-
71
- def convert_dict_to_encrypted_json(
72
- data: dict[str, Any], privacy_request_id: str
73
- ) -> BytesIO:
74
- """Convert data to JSON and encrypt it.
75
-
76
- Args:
77
- data: The data to convert and encrypt
78
- privacy_request_id: The ID of the privacy request for encryption
79
77
 
80
- Returns:
81
- BytesIO: A file-like object containing the encrypted JSON data
82
-
83
- Raises:
84
- Exception: If JSON conversion fails
85
- """
86
- try:
78
+ if resp_format == ResponseFormat.json.value:
87
79
  json_str = json.dumps(data, indent=2, default=StorageJSONEncoder().default)
88
80
  return BytesIO(
89
- encrypt_access_request_results(json_str, privacy_request_id).encode(
81
+ encrypt_access_request_results(json_str, privacy_request.id).encode(
90
82
  CONFIG.security.encoding
91
83
  )
92
84
  )
93
- except Exception as e:
94
- logger.error(f"Error converting data to JSON: {str(e)}")
95
- logger.error(f"Data that failed to convert: {data}")
96
- raise
85
+
86
+ if resp_format == ResponseFormat.csv.value:
87
+ zipped_csvs = BytesIO()
88
+ with zipfile.ZipFile(zipped_csvs, "w") as f:
89
+ for key in data:
90
+ df = pd.json_normalize(data[key])
91
+ buffer = BytesIO()
92
+ df.to_csv(buffer, index=False, encoding=CONFIG.security.encoding)
93
+ buffer.seek(0)
94
+ f.writestr(
95
+ f"{key}.csv",
96
+ encrypt_access_request_results(
97
+ buffer.getvalue(), privacy_request.id
98
+ ),
99
+ )
100
+
101
+ zipped_csvs.seek(0)
102
+ return zipped_csvs
103
+
104
+ if resp_format == ResponseFormat.html.value:
105
+ return DsrReportBuilder(
106
+ privacy_request=privacy_request,
107
+ dsr_data=data,
108
+ ).generate()
109
+
110
+ raise NotImplementedError(f"No handling for response format {resp_format}.")
97
111
 
98
112
 
99
113
  def upload_to_s3( # pylint: disable=R0913
100
- storage_secrets: dict[StorageSecrets, Any],
101
- data: dict,
114
+ storage_secrets: Dict[StorageSecrets, Any],
115
+ data: Dict,
102
116
  bucket_name: str,
103
117
  file_key: str,
104
118
  resp_format: str,
@@ -126,22 +140,18 @@ def upload_to_s3( # pylint: disable=R0913
126
140
  "storage", {}
127
141
  ).get("aws_s3_assume_role_arn"),
128
142
  )
129
- except (ClientError, ParamValidationError) as e:
130
- logger.error(f"Error getting s3 client: {str(e)}")
131
- raise StorageUploadError(f"Error getting s3 client: {str(e)}")
132
143
 
133
- # handles file chunking
134
- try:
135
- s3_client.upload_fileobj(
136
- Fileobj=write_to_in_memory_buffer(resp_format, data, privacy_request),
137
- Bucket=bucket_name,
138
- Key=file_key,
139
- )
140
- except ClientError as e:
141
- logger.error("Encountered error while uploading s3 object: {}", e)
142
- raise StorageUploadError(f"Error uploading to S3: {e}")
144
+ # handles file chunking
145
+ try:
146
+ s3_client.upload_fileobj(
147
+ Fileobj=write_to_in_memory_buffer(resp_format, data, privacy_request),
148
+ Bucket=bucket_name,
149
+ Key=file_key,
150
+ )
151
+ except Exception as e:
152
+ logger.error("Encountered error while uploading s3 object: {}", e)
153
+ raise e
143
154
 
144
- try:
145
155
  presigned_url: AnyHttpUrlString = create_presigned_url_for_s3(
146
156
  s3_client, bucket_name, file_key
147
157
  )
@@ -152,11 +162,13 @@ def upload_to_s3( # pylint: disable=R0913
152
162
  "Encountered error while uploading and generating link for s3 object: {}", e
153
163
  )
154
164
  raise StorageUploadError(f"Error uploading to S3: {e}")
165
+ except ParamValidationError as e:
166
+ raise StorageUploadError(f"The parameters you provided are incorrect: {e}")
155
167
 
156
168
 
157
169
  def upload_to_gcs(
158
- storage_secrets: dict,
159
- data: dict,
170
+ storage_secrets: Dict,
171
+ data: Dict,
160
172
  bucket_name: str,
161
173
  file_key: str,
162
174
  resp_format: str,
@@ -165,30 +177,24 @@ def upload_to_gcs(
165
177
  ) -> str:
166
178
  """Uploads access request data to a Google Cloud Storage bucket"""
167
179
  logger.info("Starting Google Cloud Storage upload of {}", file_key)
168
- content_type = {
169
- ResponseFormat.json.value: "application/json",
170
- ResponseFormat.csv.value: "application/zip",
171
- ResponseFormat.html.value: "application/zip",
172
- }
173
-
174
- blob = get_gcs_blob(auth_method, storage_secrets, bucket_name, file_key)
175
- in_memory_file = write_to_in_memory_buffer(resp_format, data, privacy_request)
176
180
 
177
181
  try:
182
+ storage_client = get_gcs_client(auth_method, storage_secrets)
183
+ bucket = storage_client.bucket(bucket_name)
184
+
185
+ blob = bucket.blob(file_key)
186
+ in_memory_file = write_to_in_memory_buffer(resp_format, data, privacy_request)
187
+ content_type = {
188
+ ResponseFormat.json.value: "application/json",
189
+ ResponseFormat.csv.value: "application/zip",
190
+ ResponseFormat.html.value: "application/zip",
191
+ }
178
192
  blob.upload_from_string(
179
193
  in_memory_file.getvalue(), content_type=content_type[resp_format]
180
194
  )
181
- except Exception as e:
182
- logger.error("Error uploading to GCS: {}", str(e))
183
- logger.error(
184
- "Encountered error while uploading and generating link for Google Cloud Storage object: {}",
185
- e,
186
- )
187
- raise
188
195
 
189
- logger.info("File {} uploaded to {}", file_key, blob.public_url)
196
+ logger.info("File {} uploaded to {}", file_key, blob.public_url)
190
197
 
191
- try:
192
198
  presigned_url = blob.generate_signed_url(
193
199
  version="v4",
194
200
  expiration=CONFIG.security.subject_request_download_link_ttl_seconds,
@@ -204,7 +210,7 @@ def upload_to_gcs(
204
210
 
205
211
 
206
212
  def upload_to_local(
207
- data: dict,
213
+ data: Dict,
208
214
  file_key: str,
209
215
  privacy_request: PrivacyRequest,
210
216
  resp_format: str = ResponseFormat.json.value,
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/1fdf5c593349dbc6.css" as="style"/><link rel="stylesheet" href="/_next/static/css/1fdf5c593349dbc6.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-8457bad7859c44f0.js" defer=""></script><script src="/_next/static/chunks/framework-c92fc3344e6fd165.js" defer=""></script><script src="/_next/static/chunks/main-090643377c8254e6.js" defer=""></script><script src="/_next/static/chunks/pages/_app-33bc23b79bffe07c.js" defer=""></script><script src="/_next/static/chunks/pages/404-ec04f826f3dd79ea.js" defer=""></script><script src="/_next/static/X2nvWLg2_-vsCTkhSWpzw/_buildManifest.js" defer=""></script><script src="/_next/static/X2nvWLg2_-vsCTkhSWpzw/_ssgManifest.js" defer=""></script><style>.data-ant-cssinjs-cache-path{content:"";}</style></head><body><div id="__next"><div style="height:100%;display:flex"></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"X2nvWLg2_-vsCTkhSWpzw","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/1fdf5c593349dbc6.css" as="style"/><link rel="stylesheet" href="/_next/static/css/1fdf5c593349dbc6.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-8457bad7859c44f0.js" defer=""></script><script src="/_next/static/chunks/framework-c92fc3344e6fd165.js" defer=""></script><script src="/_next/static/chunks/main-090643377c8254e6.js" defer=""></script><script src="/_next/static/chunks/pages/_app-33bc23b79bffe07c.js" defer=""></script><script src="/_next/static/chunks/pages/404-ec04f826f3dd79ea.js" defer=""></script><script src="/_next/static/IrQqz_6ngcumU4YlWY9nL/_buildManifest.js" defer=""></script><script src="/_next/static/IrQqz_6ngcumU4YlWY9nL/_ssgManifest.js" defer=""></script><style>.data-ant-cssinjs-cache-path{content:"";}</style></head><body><div id="__next"><div style="height:100%;display:flex"></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"IrQqz_6ngcumU4YlWY9nL","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- self.__BUILD_MANIFEST=function(s,e,t,c,a,n,i,d,o,r,p,u,g,f,b,m,j,k,h,y,l,v,I,F,x,_,U,w,q,N,A,S,B,C,z,D,E,L,M,T,P,G,H,J,K,O,Q,R,V,W,X,Y,Z){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[w,"static/chunks/pages/index-773182b5e35d0045.js"],"/404":["static/chunks/pages/404-ec04f826f3dd79ea.js"],"/_error":["static/chunks/pages/_error-bede3a8288930dcf.js"],"/add-systems":[e,w,"static/chunks/pages/add-systems-effde5cfe49de55f.js"],"/add-systems/manual":[s,t,a,n,i,j,e,c,r,u,k,h,I,q,N,"static/chunks/pages/add-systems/manual-1bec086d567aacff.js"],"/add-systems/multiple":[s,t,e,c,r,y,A,"static/chunks/pages/add-systems/multiple-f68bf100e4e60e88.js"],"/consent":["static/chunks/pages/consent-42d4d2d6e0253671.js"],"/consent/configure":[s,t,e,c,r,y,"static/chunks/pages/consent/configure-4cc195e15e0c3cc8.js"],"/consent/configure/add-vendors":[s,t,e,c,r,y,A,"static/chunks/pages/consent/configure/add-vendors-ec95ed8cb0712828.js"],"/consent/privacy-experience":[s,t,j,e,c,S,"static/chunks/pages/consent/privacy-experience-ccf96207de3b74ea.js"],"/consent/privacy-experience/new":[a,n,p,B,d,l,C,"static/chunks/pages/consent/privacy-experience/new-a0039f216fb3eb93.js"],"/consent/privacy-experience/[id]":[a,n,p,B,d,l,C,"static/chunks/pages/consent/privacy-experience/[id]-be8972c79fb39705.js"],"/consent/privacy-notices":[s,t,e,c,S,"static/chunks/pages/consent/privacy-notices-b9beeee1bde5ca79.js"],"/consent/privacy-notices/new":[a,n,p,z,d,l,D,"static/chunks/pages/consent/privacy-notices/new-373f5772ab41bc93.js"],"/consent/privacy-notices/[id]":[a,n,p,z,d,l,D,"static/chunks/pages/consent/privacy-notices/[id]-b9823cc008372cee.js"],"/consent/properties":[s,t,e,c,E,"static/chunks/pages/consent/properties-6ab3a5baafebd199.js"],"/consent/reporting":[s,t,a,e,c,"static/chunks/pages/consent/reporting-8562790ae07f17c9.js"],"/data-catalog":[s,t,a,n,i,e,c,"static/css/95ac327e5d70148d.css","static/chunks/pages/data-catalog-bb57eed84f59a932.js"],"/data-catalog/[systemId]/projects":[s,t,a,n,i,e,c,b,o,"static/chunks/pages/data-catalog/[systemId]/projects-7eb08af333baaa8e.js"],"/data-catalog/[systemId]/projects/[projectUrn]":[s,t,e,c,L,"static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-9d1df6d890671b0c.js"],"/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]":[s,t,a,n,i,e,c,g,b,M,o,"static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]-18e3faf7963962e4.js"],"/data-catalog/[systemId]/resources":[s,t,e,c,L,"static/chunks/pages/data-catalog/[systemId]/resources-51d99174c8006eb5.js"],"/data-catalog/[systemId]/resources/[resourceUrn]":[s,t,a,n,i,e,c,g,b,M,o,"static/chunks/pages/data-catalog/[systemId]/resources/[resourceUrn]-7320524a47104798.js"],"/data-discovery/action-center":[s,t,e,c,"static/chunks/pages/data-discovery/action-center-9d8e84a8b4bf568d.js"],"/data-discovery/action-center/[monitorId]":[s,t,a,n,i,e,c,T,F,"static/chunks/pages/data-discovery/action-center/[monitorId]-76cefefc53e84c7f.js"],"/data-discovery/action-center/[monitorId]/[systemId]":[s,t,a,n,i,e,c,r,I,T,"static/css/81642473e38c67a5.css","static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-47eb34aef3e31ac6.js"],"/data-discovery/activity":[s,t,e,c,"static/chunks/pages/data-discovery/activity-c3eaadd88a2e6caa.js"],"/data-discovery/detection":[s,t,e,c,g,v,P,"static/chunks/pages/data-discovery/detection-6f27dbb7c8edc69d.js"],"/data-discovery/detection/[resourceUrn]":[s,t,e,c,g,v,P,"static/chunks/pages/data-discovery/detection/[resourceUrn]-4c526db0c30c488a.js"],"/data-discovery/discovery":[s,t,a,n,i,e,c,g,b,v,G,o,"static/chunks/pages/data-discovery/discovery-fe7f51502eda57c9.js"],"/data-discovery/discovery/[resourceUrn]":[s,t,a,n,i,e,c,g,b,v,G,o,"static/chunks/pages/data-discovery/discovery/[resourceUrn]-562d2b8ae90dd1f0.js"],"/datamap":[s,t,"static/chunks/255-7db55b0e3a0f9dea.js",e,c,u,k,H,"static/chunks/pages/datamap-db45aa864e9dda8a.js"],"/dataset":[s,t,f,e,c,m,"static/chunks/pages/dataset-e3b2d8e3980ab093.js"],"/dataset/new":[f,m,"static/chunks/pages/dataset/new-c23d18a9b56c2e3c.js"],"/dataset/[datasetId]":[s,t,"static/chunks/9729-fcf6ff4e3534e4a8.js",e,c,x,"static/chunks/pages/dataset/[datasetId]-12fc86f15a4c764e.js"],"/dataset/[datasetId]/[collectionName]":[s,t,a,n,i,_,e,c,x,o,"static/chunks/pages/dataset/[datasetId]/[collectionName]-618b89228f83435e.js"],"/dataset/[datasetId]/[collectionName]/[...subfieldNames]":[s,t,a,n,i,_,e,c,x,o,"static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-d5cfdebc74654337.js"],"/datastore-connection":["static/css/5f393dea1c0d031c.css","static/chunks/pages/datastore-connection-84eb56f5a07bdf4f.js"],"/datastore-connection/new":[f,j,m,J,"static/chunks/pages/datastore-connection/new-bbac1f624424282d.js"],"/datastore-connection/[id]":[f,m,J,"static/chunks/pages/datastore-connection/[id]-6e27257eccf65f01.js"],"/fides-js-docs":["static/chunks/2fbcc6de-a6c61724c327e9fa.js","static/chunks/e3251fe7-5777b5d778e6fffa.js",a,n,i,f,_,K,"static/css/ab65b8cc3144bfc8.css","static/chunks/905-8ab919e7b274ed50.js","static/chunks/pages/fides-js-docs-80b241bf6cddb72e.js"],"/integrations":[s,t,a,n,i,p,O,e,c,h,Q,o,"static/chunks/pages/integrations-781808bca01f8048.js"],"/integrations/[id]":[s,t,a,n,i,p,O,e,c,h,Q,"static/css/e458b5f1afdbb7fc.css","static/chunks/pages/integrations/[id]-eb28c927da5bd653.js"],"/login":["static/chunks/pages/login-0cb0eb44bf2dd24c.js"],"/login/[provider]":["static/chunks/pages/login/[provider]-c58beef131c3a82d.js"],"/messaging":[s,t,a,n,i,e,c,"static/chunks/pages/messaging-7dc295b3ed3d2224.js"],"/messaging/add-template":[d,R,"static/chunks/pages/messaging/add-template-1de479533f733fbd.js"],"/messaging/[id]":[d,R,"static/chunks/pages/messaging/[id]-b51bee8680d66b20.js"],"/poc/ant-components":["static/chunks/pages/poc/ant-components-f64dac3392f5ded7.js"],"/poc/form-experiments/AntForm":["static/chunks/pages/poc/form-experiments/AntForm-eb020bfac4bee532.js"],"/poc/form-experiments/FormikAntFormItem":["static/chunks/pages/poc/form-experiments/FormikAntFormItem-0bd62e28b539e114.js"],"/poc/form-experiments/FormikControlled":["static/chunks/pages/poc/form-experiments/FormikControlled-936877004113c2a6.js"],"/poc/form-experiments/FormikField":["static/chunks/pages/poc/form-experiments/FormikField-6416f01524482af9.js"],"/poc/form-experiments/FormikSpreadField":[V,"static/chunks/pages/poc/form-experiments/FormikSpreadField-af097d661f6abcf4.js"],"/poc/forms":[V,"static/chunks/pages/poc/forms-3f4e1313d1f2969b.js"],"/poc/table-migration":[r,y,"static/chunks/pages/poc/table-migration-1db7a54437db7db0.js"],"/privacy-requests":[s,t,e,c,W,"static/chunks/pages/privacy-requests-0e557d79e1e43c2b.js"],"/privacy-requests/configure":["static/chunks/pages/privacy-requests/configure-b6c876dceb16ad1b.js"],"/privacy-requests/configure/messaging":["static/chunks/pages/privacy-requests/configure/messaging-c583a61302f02add.js"],"/privacy-requests/configure/storage":["static/chunks/pages/privacy-requests/configure/storage-20d20a8d1736f7c4.js"],"/privacy-requests/[id]":[W,"static/css/5ded47c57dae5baf.css","static/chunks/pages/privacy-requests/[id]-64236fd0141414fd.js"],"/properties":[s,t,e,c,E,"static/chunks/pages/properties-9a88220d03e7e02f.js"],"/properties/add-property":[d,X,"static/chunks/pages/properties/add-property-644dc669b508a79a.js"],"/properties/[id]":[d,X,"static/chunks/pages/properties/[id]-54bcc875592d1fb9.js"],"/reporting/datamap":[s,t,a,n,i,K,e,c,u,k,H,"static/chunks/pages/reporting/datamap-70dc1081df37ea69.js"],"/settings/about":["static/chunks/pages/settings/about-7cb16e0000dd16c9.js"],"/settings/about/alpha":["static/chunks/pages/settings/about/alpha-3c71b4dbcb6fd6c9.js"],"/settings/consent":["static/chunks/pages/settings/consent-dc220e116ad5c09e.js"],"/settings/consent/[configuration_id]/[purpose_id]":[s,t,e,c,"static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-a18d8f12ee8dcf5d.js"],"/settings/custom-fields":[s,t,e,c,u,"static/chunks/pages/settings/custom-fields-55ddc5f25b86f28e.js"],"/settings/domain-records":[s,t,e,c,"static/chunks/pages/settings/domain-records-5ca7decded228bc8.js"],"/settings/domains":["static/chunks/pages/settings/domains-a6fafa1be2834c40.js"],"/settings/email-templates":["static/chunks/pages/settings/email-templates-e633750d2b45ddd6.js"],"/settings/locations":[s,Y,F,"static/chunks/pages/settings/locations-3948686cbd372969.js"],"/settings/organization":["static/chunks/pages/settings/organization-04ece499c22d23f4.js"],"/settings/regulations":[s,Y,F,"static/chunks/pages/settings/regulations-7752305084280cca.js"],"/systems":[s,t,e,c,"static/chunks/pages/systems-cac52e6c3abf6a15.js"],"/systems/configure/[id]":[s,t,a,n,i,j,e,c,r,u,k,h,I,q,N,"static/chunks/pages/systems/configure/[id]-86de9e6d72098e45.js"],"/systems/configure/[id]/test-datasets":[f,m,"static/chunks/pages/systems/configure/[id]/test-datasets-9e5f9066be6f218d.js"],"/taxonomy":["static/chunks/678d4732-50255cc09048e643.js",a,n,i,p,"static/chunks/3983-17ae9c232bddc413.js",u,"static/css/34a7eb08b86ddb57.css","static/chunks/pages/taxonomy-60d5930b6855679b.js"],"/user-management":[U,"static/chunks/pages/user-management-7dee83dd6d9292aa.js"],"/user-management/new":[U,Z,"static/chunks/pages/user-management/new-b124cc24b930c9e1.js"],"/user-management/profile/[id]":[U,Z,"static/chunks/pages/user-management/profile/[id]-b0f4c34752d32c73.js"],sortedPages:["/","/404","/_app","/_error","/add-systems","/add-systems/manual","/add-systems/multiple","/consent","/consent/configure","/consent/configure/add-vendors","/consent/privacy-experience","/consent/privacy-experience/new","/consent/privacy-experience/[id]","/consent/privacy-notices","/consent/privacy-notices/new","/consent/privacy-notices/[id]","/consent/properties","/consent/reporting","/data-catalog","/data-catalog/[systemId]/projects","/data-catalog/[systemId]/projects/[projectUrn]","/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]","/data-catalog/[systemId]/resources","/data-catalog/[systemId]/resources/[resourceUrn]","/data-discovery/action-center","/data-discovery/action-center/[monitorId]","/data-discovery/action-center/[monitorId]/[systemId]","/data-discovery/activity","/data-discovery/detection","/data-discovery/detection/[resourceUrn]","/data-discovery/discovery","/data-discovery/discovery/[resourceUrn]","/datamap","/dataset","/dataset/new","/dataset/[datasetId]","/dataset/[datasetId]/[collectionName]","/dataset/[datasetId]/[collectionName]/[...subfieldNames]","/datastore-connection","/datastore-connection/new","/datastore-connection/[id]","/fides-js-docs","/integrations","/integrations/[id]","/login","/login/[provider]","/messaging","/messaging/add-template","/messaging/[id]","/poc/ant-components","/poc/form-experiments/AntForm","/poc/form-experiments/FormikAntFormItem","/poc/form-experiments/FormikControlled","/poc/form-experiments/FormikField","/poc/form-experiments/FormikSpreadField","/poc/forms","/poc/table-migration","/privacy-requests","/privacy-requests/configure","/privacy-requests/configure/messaging","/privacy-requests/configure/storage","/privacy-requests/[id]","/properties","/properties/add-property","/properties/[id]","/reporting/datamap","/settings/about","/settings/about/alpha","/settings/consent","/settings/consent/[configuration_id]/[purpose_id]","/settings/custom-fields","/settings/domain-records","/settings/domains","/settings/email-templates","/settings/locations","/settings/organization","/settings/regulations","/systems","/systems/configure/[id]","/systems/configure/[id]/test-datasets","/taxonomy","/user-management","/user-management/new","/user-management/profile/[id]"]}}("static/chunks/c78d26b1-88a3e1bacb2a03c2.js","static/chunks/7553-08bc3d9f66695111.js","static/chunks/6060-cb1ab5be7067bf7b.js","static/chunks/4481-7f6710c928bb0cb0.js","static/chunks/2858-0b44609b6be7850b.js","static/chunks/2866-a73888c17a195cbe.js","static/chunks/9278-9b1b5970f0702668.js","static/chunks/69-00cba94689b9e740.js","static/css/d2d4e9a6923e6730.css","static/chunks/401-7e800aed05537126.js","static/chunks/3662-f6a1ddca5ee42076.js","static/chunks/7980-736f9fd1e749ddd2.js","static/chunks/2310-744354001d01f366.js","static/chunks/6527-0eed08abe252a918.js","static/chunks/1099-667e84655846e78c.js","static/chunks/9327-6a53461c9764b16f.js","static/chunks/5277-e8a036319456127f.js","static/chunks/8499-1fd392d0be9e8ee4.js","static/chunks/6202-081545c7822d09af.js","static/chunks/3923-b4f701ada3ef0ee0.js","static/chunks/6277-459e054b2702c60e.js","static/chunks/9494-1ffb888b95289891.js","static/chunks/4132-9b1731bfec6ee537.js","static/css/eb46b504bb5d980d.css","static/chunks/5487-2cbd8d2169eb2a65.js","static/chunks/8702-d1c8296f9f6afc10.js","static/chunks/3513-5c2d412a84a78971.js","static/css/972dc7eef106ee7c.css","static/chunks/8032-74d94f7bd5b81c89.js","static/css/92fc10cc7ed1aba3.css","static/chunks/796-d6586308ed44334b.js","static/chunks/6853-688df0b88fe65fd5.js","static/chunks/3670-2abd9b2f17770872.js","static/chunks/1817-951f58ddd5d46081.js","static/chunks/6659-b2088f525bf13c17.js","static/chunks/6954-4e313b4599b8763d.js","static/chunks/79-fc548561beed136f.js","static/chunks/3872-45cc725e241211f0.js","static/chunks/3119-e36ae5071c8f27a5.js","static/chunks/5404-2694509cf5fa96da.js","static/chunks/5683-37137111b3e769fb.js","static/chunks/1904-361e37a5811ed7fc.js","static/chunks/5258-2079138c8cc34f6c.js","static/chunks/9767-afd674014a1d1152.js","static/chunks/9187-851756440f79cd75.js","static/chunks/641-7e4eef3222cbda70.js","static/chunks/9033-fdd87182c15b91e2.js","static/chunks/1100-0b01f500b1eaf60d.js","static/chunks/2921-49af55ad7c631c93.js","static/chunks/8433-51870336908fb253.js","static/chunks/4060-90a52a9afc655bfc.js","static/chunks/3505-113f9c95d34b7aae.js","static/chunks/4121-66b0e00d5e7ae817.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
1
+ self.__BUILD_MANIFEST=function(s,e,t,c,a,n,i,d,o,r,p,u,g,f,b,m,j,k,h,y,l,v,I,F,x,_,U,w,q,N,A,S,B,C,z,D,E,L,M,T,P,G,H,J,K,O,Q,R,V,W,X,Y,Z){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[w,"static/chunks/pages/index-773182b5e35d0045.js"],"/404":["static/chunks/pages/404-ec04f826f3dd79ea.js"],"/_error":["static/chunks/pages/_error-bede3a8288930dcf.js"],"/add-systems":[e,w,"static/chunks/pages/add-systems-effde5cfe49de55f.js"],"/add-systems/manual":[s,t,a,n,i,j,e,c,r,u,k,h,I,q,N,"static/chunks/pages/add-systems/manual-1bec086d567aacff.js"],"/add-systems/multiple":[s,t,e,c,r,y,A,"static/chunks/pages/add-systems/multiple-f68bf100e4e60e88.js"],"/consent":["static/chunks/pages/consent-42d4d2d6e0253671.js"],"/consent/configure":[s,t,e,c,r,y,"static/chunks/pages/consent/configure-4cc195e15e0c3cc8.js"],"/consent/configure/add-vendors":[s,t,e,c,r,y,A,"static/chunks/pages/consent/configure/add-vendors-ec95ed8cb0712828.js"],"/consent/privacy-experience":[s,t,j,e,c,S,"static/chunks/pages/consent/privacy-experience-ccf96207de3b74ea.js"],"/consent/privacy-experience/new":[a,n,p,B,d,l,C,"static/chunks/pages/consent/privacy-experience/new-a0039f216fb3eb93.js"],"/consent/privacy-experience/[id]":[a,n,p,B,d,l,C,"static/chunks/pages/consent/privacy-experience/[id]-be8972c79fb39705.js"],"/consent/privacy-notices":[s,t,e,c,S,"static/chunks/pages/consent/privacy-notices-b9beeee1bde5ca79.js"],"/consent/privacy-notices/new":[a,n,p,z,d,l,D,"static/chunks/pages/consent/privacy-notices/new-373f5772ab41bc93.js"],"/consent/privacy-notices/[id]":[a,n,p,z,d,l,D,"static/chunks/pages/consent/privacy-notices/[id]-b9823cc008372cee.js"],"/consent/properties":[s,t,e,c,E,"static/chunks/pages/consent/properties-6ab3a5baafebd199.js"],"/consent/reporting":[s,t,a,e,c,"static/chunks/pages/consent/reporting-8562790ae07f17c9.js"],"/data-catalog":[s,t,a,n,i,e,c,"static/css/95ac327e5d70148d.css","static/chunks/pages/data-catalog-bb57eed84f59a932.js"],"/data-catalog/[systemId]/projects":[s,t,a,n,i,e,c,b,o,"static/chunks/pages/data-catalog/[systemId]/projects-7eb08af333baaa8e.js"],"/data-catalog/[systemId]/projects/[projectUrn]":[s,t,e,c,L,"static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-9d1df6d890671b0c.js"],"/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]":[s,t,a,n,i,e,c,g,b,M,o,"static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]-18e3faf7963962e4.js"],"/data-catalog/[systemId]/resources":[s,t,e,c,L,"static/chunks/pages/data-catalog/[systemId]/resources-51d99174c8006eb5.js"],"/data-catalog/[systemId]/resources/[resourceUrn]":[s,t,a,n,i,e,c,g,b,M,o,"static/chunks/pages/data-catalog/[systemId]/resources/[resourceUrn]-7320524a47104798.js"],"/data-discovery/action-center":[s,t,e,c,"static/chunks/pages/data-discovery/action-center-9d8e84a8b4bf568d.js"],"/data-discovery/action-center/[monitorId]":[s,t,a,n,i,e,c,T,F,"static/chunks/pages/data-discovery/action-center/[monitorId]-76cefefc53e84c7f.js"],"/data-discovery/action-center/[monitorId]/[systemId]":[s,t,a,n,i,e,c,r,I,T,"static/css/81642473e38c67a5.css","static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-47eb34aef3e31ac6.js"],"/data-discovery/activity":[s,t,e,c,"static/chunks/pages/data-discovery/activity-c3eaadd88a2e6caa.js"],"/data-discovery/detection":[s,t,e,c,g,v,P,"static/chunks/pages/data-discovery/detection-6f27dbb7c8edc69d.js"],"/data-discovery/detection/[resourceUrn]":[s,t,e,c,g,v,P,"static/chunks/pages/data-discovery/detection/[resourceUrn]-4c526db0c30c488a.js"],"/data-discovery/discovery":[s,t,a,n,i,e,c,g,b,v,G,o,"static/chunks/pages/data-discovery/discovery-fe7f51502eda57c9.js"],"/data-discovery/discovery/[resourceUrn]":[s,t,a,n,i,e,c,g,b,v,G,o,"static/chunks/pages/data-discovery/discovery/[resourceUrn]-562d2b8ae90dd1f0.js"],"/datamap":[s,t,"static/chunks/255-7db55b0e3a0f9dea.js",e,c,u,k,H,"static/chunks/pages/datamap-db45aa864e9dda8a.js"],"/dataset":[s,t,f,e,c,m,"static/chunks/pages/dataset-e3b2d8e3980ab093.js"],"/dataset/new":[f,m,"static/chunks/pages/dataset/new-c23d18a9b56c2e3c.js"],"/dataset/[datasetId]":[s,t,"static/chunks/9729-fcf6ff4e3534e4a8.js",e,c,x,"static/chunks/pages/dataset/[datasetId]-12fc86f15a4c764e.js"],"/dataset/[datasetId]/[collectionName]":[s,t,a,n,i,_,e,c,x,o,"static/chunks/pages/dataset/[datasetId]/[collectionName]-618b89228f83435e.js"],"/dataset/[datasetId]/[collectionName]/[...subfieldNames]":[s,t,a,n,i,_,e,c,x,o,"static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-d5cfdebc74654337.js"],"/datastore-connection":["static/css/5f393dea1c0d031c.css","static/chunks/pages/datastore-connection-84eb56f5a07bdf4f.js"],"/datastore-connection/new":[f,j,m,J,"static/chunks/pages/datastore-connection/new-bbac1f624424282d.js"],"/datastore-connection/[id]":[f,m,J,"static/chunks/pages/datastore-connection/[id]-6e27257eccf65f01.js"],"/fides-js-docs":["static/chunks/2fbcc6de-a6c61724c327e9fa.js","static/chunks/e3251fe7-5777b5d778e6fffa.js",a,n,i,f,_,K,"static/css/ab65b8cc3144bfc8.css","static/chunks/905-8ab919e7b274ed50.js","static/chunks/pages/fides-js-docs-80b241bf6cddb72e.js"],"/integrations":[s,t,a,n,i,p,O,e,c,h,Q,o,"static/chunks/pages/integrations-781808bca01f8048.js"],"/integrations/[id]":[s,t,a,n,i,p,O,e,c,h,Q,"static/css/e458b5f1afdbb7fc.css","static/chunks/pages/integrations/[id]-eb28c927da5bd653.js"],"/login":["static/chunks/pages/login-0cb0eb44bf2dd24c.js"],"/login/[provider]":["static/chunks/pages/login/[provider]-c58beef131c3a82d.js"],"/messaging":[s,t,a,n,i,e,c,"static/chunks/pages/messaging-7dc295b3ed3d2224.js"],"/messaging/add-template":[d,R,"static/chunks/pages/messaging/add-template-1de479533f733fbd.js"],"/messaging/[id]":[d,R,"static/chunks/pages/messaging/[id]-b51bee8680d66b20.js"],"/poc/ant-components":["static/chunks/pages/poc/ant-components-f64dac3392f5ded7.js"],"/poc/form-experiments/AntForm":["static/chunks/pages/poc/form-experiments/AntForm-eb020bfac4bee532.js"],"/poc/form-experiments/FormikAntFormItem":["static/chunks/pages/poc/form-experiments/FormikAntFormItem-0bd62e28b539e114.js"],"/poc/form-experiments/FormikControlled":["static/chunks/pages/poc/form-experiments/FormikControlled-936877004113c2a6.js"],"/poc/form-experiments/FormikField":["static/chunks/pages/poc/form-experiments/FormikField-6416f01524482af9.js"],"/poc/form-experiments/FormikSpreadField":[V,"static/chunks/pages/poc/form-experiments/FormikSpreadField-af097d661f6abcf4.js"],"/poc/forms":[V,"static/chunks/pages/poc/forms-3f4e1313d1f2969b.js"],"/poc/table-migration":[r,y,"static/chunks/pages/poc/table-migration-1db7a54437db7db0.js"],"/privacy-requests":[s,t,e,c,W,"static/chunks/pages/privacy-requests-20cdb2c8a03deae1.js"],"/privacy-requests/configure":["static/chunks/pages/privacy-requests/configure-b6c876dceb16ad1b.js"],"/privacy-requests/configure/messaging":["static/chunks/pages/privacy-requests/configure/messaging-8cab04871908cfeb.js"],"/privacy-requests/configure/storage":["static/chunks/pages/privacy-requests/configure/storage-150d40428245ee0c.js"],"/privacy-requests/[id]":[W,"static/css/5ded47c57dae5baf.css","static/chunks/pages/privacy-requests/[id]-64236fd0141414fd.js"],"/properties":[s,t,e,c,E,"static/chunks/pages/properties-9a88220d03e7e02f.js"],"/properties/add-property":[d,X,"static/chunks/pages/properties/add-property-644dc669b508a79a.js"],"/properties/[id]":[d,X,"static/chunks/pages/properties/[id]-54bcc875592d1fb9.js"],"/reporting/datamap":[s,t,a,n,i,K,e,c,u,k,H,"static/chunks/pages/reporting/datamap-70dc1081df37ea69.js"],"/settings/about":["static/chunks/pages/settings/about-7cb16e0000dd16c9.js"],"/settings/about/alpha":["static/chunks/pages/settings/about/alpha-3c71b4dbcb6fd6c9.js"],"/settings/consent":["static/chunks/pages/settings/consent-dc220e116ad5c09e.js"],"/settings/consent/[configuration_id]/[purpose_id]":[s,t,e,c,"static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-a18d8f12ee8dcf5d.js"],"/settings/custom-fields":[s,t,e,c,u,"static/chunks/pages/settings/custom-fields-55ddc5f25b86f28e.js"],"/settings/domain-records":[s,t,e,c,"static/chunks/pages/settings/domain-records-5ca7decded228bc8.js"],"/settings/domains":["static/chunks/pages/settings/domains-a6fafa1be2834c40.js"],"/settings/email-templates":["static/chunks/pages/settings/email-templates-e633750d2b45ddd6.js"],"/settings/locations":[s,Y,F,"static/chunks/pages/settings/locations-3948686cbd372969.js"],"/settings/organization":["static/chunks/pages/settings/organization-04ece499c22d23f4.js"],"/settings/regulations":[s,Y,F,"static/chunks/pages/settings/regulations-7752305084280cca.js"],"/systems":[s,t,e,c,"static/chunks/pages/systems-cac52e6c3abf6a15.js"],"/systems/configure/[id]":[s,t,a,n,i,j,e,c,r,u,k,h,I,q,N,"static/chunks/pages/systems/configure/[id]-86de9e6d72098e45.js"],"/systems/configure/[id]/test-datasets":[f,m,"static/chunks/pages/systems/configure/[id]/test-datasets-9e5f9066be6f218d.js"],"/taxonomy":["static/chunks/678d4732-50255cc09048e643.js",a,n,i,p,"static/chunks/3983-17ae9c232bddc413.js",u,"static/css/34a7eb08b86ddb57.css","static/chunks/pages/taxonomy-60d5930b6855679b.js"],"/user-management":[U,"static/chunks/pages/user-management-7dee83dd6d9292aa.js"],"/user-management/new":[U,Z,"static/chunks/pages/user-management/new-b124cc24b930c9e1.js"],"/user-management/profile/[id]":[U,Z,"static/chunks/pages/user-management/profile/[id]-b0f4c34752d32c73.js"],sortedPages:["/","/404","/_app","/_error","/add-systems","/add-systems/manual","/add-systems/multiple","/consent","/consent/configure","/consent/configure/add-vendors","/consent/privacy-experience","/consent/privacy-experience/new","/consent/privacy-experience/[id]","/consent/privacy-notices","/consent/privacy-notices/new","/consent/privacy-notices/[id]","/consent/properties","/consent/reporting","/data-catalog","/data-catalog/[systemId]/projects","/data-catalog/[systemId]/projects/[projectUrn]","/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]","/data-catalog/[systemId]/resources","/data-catalog/[systemId]/resources/[resourceUrn]","/data-discovery/action-center","/data-discovery/action-center/[monitorId]","/data-discovery/action-center/[monitorId]/[systemId]","/data-discovery/activity","/data-discovery/detection","/data-discovery/detection/[resourceUrn]","/data-discovery/discovery","/data-discovery/discovery/[resourceUrn]","/datamap","/dataset","/dataset/new","/dataset/[datasetId]","/dataset/[datasetId]/[collectionName]","/dataset/[datasetId]/[collectionName]/[...subfieldNames]","/datastore-connection","/datastore-connection/new","/datastore-connection/[id]","/fides-js-docs","/integrations","/integrations/[id]","/login","/login/[provider]","/messaging","/messaging/add-template","/messaging/[id]","/poc/ant-components","/poc/form-experiments/AntForm","/poc/form-experiments/FormikAntFormItem","/poc/form-experiments/FormikControlled","/poc/form-experiments/FormikField","/poc/form-experiments/FormikSpreadField","/poc/forms","/poc/table-migration","/privacy-requests","/privacy-requests/configure","/privacy-requests/configure/messaging","/privacy-requests/configure/storage","/privacy-requests/[id]","/properties","/properties/add-property","/properties/[id]","/reporting/datamap","/settings/about","/settings/about/alpha","/settings/consent","/settings/consent/[configuration_id]/[purpose_id]","/settings/custom-fields","/settings/domain-records","/settings/domains","/settings/email-templates","/settings/locations","/settings/organization","/settings/regulations","/systems","/systems/configure/[id]","/systems/configure/[id]/test-datasets","/taxonomy","/user-management","/user-management/new","/user-management/profile/[id]"]}}("static/chunks/c78d26b1-88a3e1bacb2a03c2.js","static/chunks/7553-08bc3d9f66695111.js","static/chunks/6060-cb1ab5be7067bf7b.js","static/chunks/4481-7f6710c928bb0cb0.js","static/chunks/2858-0b44609b6be7850b.js","static/chunks/2866-a73888c17a195cbe.js","static/chunks/9278-9b1b5970f0702668.js","static/chunks/69-00cba94689b9e740.js","static/css/d2d4e9a6923e6730.css","static/chunks/401-7e800aed05537126.js","static/chunks/3662-f6a1ddca5ee42076.js","static/chunks/7980-736f9fd1e749ddd2.js","static/chunks/2310-744354001d01f366.js","static/chunks/6527-0eed08abe252a918.js","static/chunks/1099-667e84655846e78c.js","static/chunks/9327-6a53461c9764b16f.js","static/chunks/5277-e8a036319456127f.js","static/chunks/8499-1fd392d0be9e8ee4.js","static/chunks/6202-081545c7822d09af.js","static/chunks/3923-b4f701ada3ef0ee0.js","static/chunks/6277-459e054b2702c60e.js","static/chunks/9494-1ffb888b95289891.js","static/chunks/4132-9b1731bfec6ee537.js","static/css/eb46b504bb5d980d.css","static/chunks/5487-2cbd8d2169eb2a65.js","static/chunks/8702-d1c8296f9f6afc10.js","static/chunks/3513-5c2d412a84a78971.js","static/css/972dc7eef106ee7c.css","static/chunks/8032-74d94f7bd5b81c89.js","static/css/92fc10cc7ed1aba3.css","static/chunks/796-d6586308ed44334b.js","static/chunks/6853-688df0b88fe65fd5.js","static/chunks/3670-2abd9b2f17770872.js","static/chunks/1817-951f58ddd5d46081.js","static/chunks/6659-b2088f525bf13c17.js","static/chunks/6954-4e313b4599b8763d.js","static/chunks/79-fc548561beed136f.js","static/chunks/3872-45cc725e241211f0.js","static/chunks/3119-e36ae5071c8f27a5.js","static/chunks/5404-2694509cf5fa96da.js","static/chunks/5683-37137111b3e769fb.js","static/chunks/1904-361e37a5811ed7fc.js","static/chunks/5258-2079138c8cc34f6c.js","static/chunks/9767-afd674014a1d1152.js","static/chunks/9187-851756440f79cd75.js","static/chunks/641-7e4eef3222cbda70.js","static/chunks/9033-fdd87182c15b91e2.js","static/chunks/1100-0b01f500b1eaf60d.js","static/chunks/2921-49af55ad7c631c93.js","static/chunks/8433-51870336908fb253.js","static/chunks/4060-90a52a9afc655bfc.js","static/chunks/3505-113f9c95d34b7aae.js","static/chunks/4121-66b0e00d5e7ae817.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{13687:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/messaging",function(){return i(61463)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var n=i(24246),s=i(4454),r=i(88038),l=i.n(r),a=i(86677);i(27378);var o=i(25980),c=i(90867),u=i(77830),d=()=>{let e=(0,a.useRouter)();return(0,n.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(s.xuv,{children:[(0,n.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(s.wpx,{onClick:()=>{e.push(u.fz)},children:"Configure"})]}),(0,n.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:i,padded:r=!0,mainProps:u}=e,m=(0,o.hz)(),p=(0,a.useRouter)(),h="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,x=!(m.flags.privacyRequestsConfiguration&&h),{data:g}=(0,c.JE)(void 0,{skip:x}),{data:f}=(0,c.PW)(void 0,{skip:x}),y=m.flags.privacyRequestsConfiguration&&(!g||!f)&&h;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(s.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,n.jsx)(d,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),s=i(4454),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:a,rightContent:o,style:c,...u}=e;return(0,n.jsxs)("div",{...u,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(s.lQT,{className:i||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,n.jsx)(r.m,{className:a?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),a]})}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return r.D4},MM:function(){return m},Ot:function(){return c},c6:function(){return s},cj:function(){return h},e$:function(){return a},fn:function(){return o},iC:function(){return p},nU:function(){return d},tB:function(){return u}});var n,s,r=i(19043);let l="An unexpected error occurred. Please try again.",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:l};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:i}=e;return{status:i,message:a(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=s||(s={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},h=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),s=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?i=t.data.detail:(0,s.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var n=i(24246),s=i(4454);let r=()=>{let e=(0,s.pmc)();return{errorAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)},successAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return c}});var n=i(24246),s=i(4454),r=i(79894),l=i.n(r),a=i(27378);let{Text:o}=s.AntTypography,c=e=>{let{items:t,...i}=e,r=(0,a.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,a={...e},c=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:a.title})),c)?a.title=(0,n.jsx)(s.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,n.jsx)(l(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,n.jsx)(s.zrq,{items:r,...i})}},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return o},I3:function(){return s},kN:function(){return l},qX:function(){return a},rE:function(){return r}});var n=i(61317);let s=[...new Map([[n.q2.APPROVED,"Approved"],[n.q2.CANCELED,"Canceled"],[n.q2.COMPLETE,"Completed"],[n.q2.DENIED,"Denied"],[n.q2.ERROR,"Error"],[n.q2.IN_PROCESSING,"In Progress"],[n.q2.PENDING,"New"],[n.q2.PAUSED,"Paused"],[n.q2.IDENTITY_UNVERIFIED,"Unverified"],[n.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),r=new Map([[n.Us.ACCESS,"Access"],[n.Us.ERASURE,"Erasure"],[n.Us.CONSENT,"Consent"],[n.Us.UPDATE,"Update"]]),l=[...r].map(e=>{let[t,i]=e;return{label:i,value:t}}),a={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3",gcs:"gcs"}},61463:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return _}});var n=i(24246),s=i(4454),r=i(27378),l=i(812),a=i(14047),o=i(77213),c=i(77830),u=i(58754),d=i(7426),m=i(71784),p=i(90867),h=i(34090),x=i(40324),g=e=>{let{messagingDetails:t}=e,{successAlert:i}=(0,a.V)(),{handleError:r}=(0,a.H)(),[o]=(0,p.SU)(),c=t.service_type===m.qX.twilio_email||t.service_type===m.qX.mailgun,u=t.service_type===m.qX.twilio_text,d=async e=>{if(c){let t=await o({email:e.email});(0,l.D4)(t)?r(t.error):i("Test message successfully sent.")}if(u){let t=await o({phone_number:e.phone});(0,l.D4)(t)?r(t.error):i("Test message successfully sent.")}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,mb:5,children:"Test connection"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(h.J9,{initialValues:{email:"",phone:""},onSubmit:d,children:e=>{let{isSubmitting:t,resetForm:i}=e;return(0,n.jsxs)(h.l0,{children:[c?(0,n.jsx)(x.j0,{name:"email",label:"Email",placeholder:"youremail@domain.com",isRequired:!0}):null,u?(0,n.jsx)(x.j0,{name:"phone",label:"Phone",placeholder:"+10000000000",isRequired:!0}):null,(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]})},f=()=>{var e;let{successAlert:t}=(0,a.V)(),[i,o]=(0,r.useState)(""),{handleError:c}=(0,a.H)(),{data:u}=(0,p.S3)({type:m.qX.mailgun}),[d]=(0,p.h9)(),[f]=(0,p.iI)(),y=async e=>{let i=await d({service_type:m.qX.mailgun,details:{is_eu_domain:"false",domain:e.domain}});(0,l.D4)(i)?c(i.error):(t("Mailgun email successfully updated. You can now enter your security key."),o("apiKey"))},j=async e=>{let i=await f({details:{mailgun_api_key:e.api_key},service_type:m.qX.mailgun});(0,l.D4)(i)?c(i.error):(t("Mailgun security key successfully updated."),o("testConnection"))},v={domain:null!==(e=null==u?void 0:u.details.domain)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Mailgun messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(h.J9,{initialValues:v,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(h.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(x.j0,{name:"domain",label:"Domain",placeholder:"Enter domain","data-testid":"option-twilio-domain",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{htmlType:"submit",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"apiKey"===i||"testConnection"===i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(h.J9,{initialValues:{api_key:""},onSubmit:j,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(h.l0,{children:[(0,n.jsx)(x.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===i?(0,n.jsx)(g,{messagingDetails:u||{service_type:m.qX.mailgun}}):null]})},y=()=>{var e;let[t,i]=(0,r.useState)(""),{successAlert:o}=(0,a.V)(),{handleError:c}=(0,a.H)(),{data:u}=(0,p.S3)({type:m.qX.twilio_email}),[d]=(0,p.h9)(),[f]=(0,p.iI)(),y=async e=>{let t=await d({service_type:m.qX.twilio_email,details:{twilio_email_from:e.email}});(0,l.D4)(t)?c(t.error):(o("Twilio email successfully updated. You can now enter your security key."),i("configureTwilioEmailSecrets"))},j=async e=>{let t=await f({details:{twilio_api_key:e.api_key},service_type:m.qX.twilio_email});(0,l.D4)(t)?c(t.error):(o("Twilio email secrets successfully updated."),i("testConnection"))},v={email:null!==(e=null==u?void 0:u.details.twilio_email_from)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio Email messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(h.J9,{initialValues:v,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(h.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(x.j0,{name:"email",label:"Email",placeholder:"Enter email",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"configureTwilioEmailSecrets"===t||"testConnection"===t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(h.J9,{initialValues:{api_key:""},onSubmit:j,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(h.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(x.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===t?(0,n.jsx)(g,{messagingDetails:u||{service_type:m.qX.twilio_email}}):null]})},j=()=>{let{successAlert:e}=(0,a.V)(),{handleError:t}=(0,a.H)(),[i,o]=(0,r.useState)(""),{data:c}=(0,p.S3)({type:"twilio_text"}),[u]=(0,p.iI)(),d=async i=>{let n=await u({details:{twilio_account_sid:i.account_sid,twilio_auth_token:i.auth_token,twilio_messaging_service_sid:i.messaging_service_sid,twilio_sender_phone_number:i.phone},service_type:m.qX.twilio_text});(0,l.D4)(n)?t(n.error):(e("Twilio text secrets successfully updated."),o("testConnection"))};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio SMS messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(h.J9,{initialValues:{account_sid:"",auth_token:"",messaging_service_sid:"",phone:""},onSubmit:d,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(h.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(x.j0,{name:"account_sid",label:"Account SID",placeholder:"Enter account SID",isRequired:!0}),(0,n.jsx)(x.j0,{name:"auth_token",label:"Auth token",placeholder:"Enter auth token",type:"password",isRequired:!0}),(0,n.jsx)(x.j0,{name:"messaging_service_sid",label:"Messaging Service SID",placeholder:"Enter messaging service SID"}),(0,n.jsx)(x.j0,{name:"phone",label:"Phone Number",placeholder:"Enter phone number"})]}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"testConnection"===i?(0,n.jsx)(g,{messagingDetails:c||{service_type:m.qX.twilio_text}}):null]})},v=()=>{let{successAlert:e}=(0,a.V)(),{handleError:t}=(0,a.H)(),[i,h]=(0,r.useState)(""),[x]=(0,p.h9)(),[g]=(0,d.L)(),{data:v}=(0,p.JE)();(0,r.useEffect)(()=>{v&&h(null==v?void 0:v.service_type)},[v]);let _=async i=>{let{value:n}=i.target,s=await g({notifications:{notification_service_type:n,send_request_completion_notification:!0,send_request_receipt_notification:!0,send_request_review_notification:!0},execution:{subject_identity_verification_required:!0}});if((0,l.D4)(s))t(s.error);else if(n!==m.qX.twilio_text)h(n);else{let i=await x({service_type:m.qX.twilio_text});(0,l.D4)(i)?t(i.error):(e("Messaging provider saved successfully."),h(n))}};return(0,n.jsxs)(o.Z,{title:"Configure Privacy Requests - Messaging",children:[(0,n.jsx)(u.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Configure requests",href:c.fz},{title:"Messaging"}]}),(0,n.jsx)(s.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure your messaging provider"}),(0,n.jsxs)(s.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,n.jsxs)(s.xuv,{children:["Fides requires a messsaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,n.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"documentation"})," ","to setup a messaging service that Fides supports. Ensure you have completed the setup for the preferred messaging provider and have the details handy prior to the following steps."]}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose service type to configure"}),(0,n.jsx)(s.y02.Group,{onChange:_,value:i,"data-testid":"privacy-requests-messaging-provider-selection",className:"p-3",children:(0,n.jsxs)(s.jqI,{children:[(0,n.jsx)(s.y02,{value:m.qX.mailgun,"data-testid":"option-mailgun",children:"Mailgun Email"},m.qX.mailgun),(0,n.jsx)(s.y02,{value:m.qX.twilio_email,"data-testid":"option-twilio-email",children:"Twilio Email"},m.qX.twilio_email),(0,n.jsx)(s.y02,{value:m.qX.twilio_text,"data-testid":"option-twilio-sms",children:"Twilio SMS"},m.qX.twilio_text)]})}),i===m.qX.mailgun?(0,n.jsx)(f,{}):null,i===m.qX.twilio_email?(0,n.jsx)(y,{}):null,i===m.qX.twilio_text?(0,n.jsx)(j,{}):null]})]})},_=()=>(0,n.jsx)(v,{})},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return l},D4:function(){return s},Dy:function(){return o},XD:function(){return c},cz:function(){return u},hE:function(){return a},oK:function(){return r}});var n=i(76649);let s=e=>"error"in e,r=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,l=e=>(0,n.Ln)({status:"number",data:{}},e),a=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>r(e,t),s=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>r(i,t[e]));class l{static narrow(e){return new l(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof l?e.NF:e instanceof Function?e:t=>n(e,t);return new l(e=>t(e)&&i(e))}}new l(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=13687)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5979],{23663:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/storage",function(){return i(64665)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var n=i(24246),s=i(4454),r=i(88038),a=i.n(r),l=i(86677);i(27378);var o=i(25980),d=i(90867),c=i(77830),u=()=>{let e=(0,l.useRouter)();return(0,n.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(s.xuv,{children:[(0,n.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(s.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,n.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:i,padded:r=!0,mainProps:c}=e,m=(0,o.hz)(),h=(0,l.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(m.flags.privacyRequestsConfiguration&&p),{data:v}=(0,d.JE)(void 0,{skip:x}),{data:f}=(0,d.PW)(void 0,{skip:x}),j=m.flags.privacyRequestsConfiguration&&(!v||!f)&&p;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(a(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(s.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[j?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),s=i(4454),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:a=!0,children:l,rightContent:o,style:d,...c}=e;return(0,n.jsxs)("div",{...c,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(s.lQT,{className:i||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,n.jsx)(r.m,{className:l?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return d}});var n=i(24246),s=i(4454),r=i(34090),a=i(27378),l=i(46238),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:m="inline",helperText:h,...p}=e,[x,v,{setValue:f}]=(0,r.U$)(t),j=!!(v.touched&&v.error),[g,y]=(0,a.useState)("");x.value||"tags"!==p.mode&&"multiple"!==p.mode||(x.value=[]),"tags"===p.mode&&"string"==typeof x.value&&(x.value=[x.value]);let _="tags"===p.mode?(e,t)=>e?e.value!==g||x.value.includes(g)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:p.optionRender||void 0,b=e=>{y(e),p.onSearch&&p.onSearch(e)},C=(e,t)=>{f(e),p.onChange&&p.onChange(e,t)};return"inline"===m?(0,n.jsx)(s.NIc,{isInvalid:j,isRequired:u,children:(0,n.jsxs)(s.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,n.jsx)(o.__,{htmlFor:p.id||t,...d,children:i}):null,(0,n.jsxs)(s.jqI,{align:"center",children:[(0,n.jsxs)(s.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(s.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:_,onSearch:"tags"===p.mode?b:void 0,onChange:C,value:x.value||void 0,status:j?"error":void 0}),h&&(0,n.jsx)(s.Q6r,{children:h}),(0,n.jsx)(o.Bc,{isInvalid:j,message:v.error,fieldName:x.name})]}),(0,n.jsx)(l.b,{label:c,className:j?"mt-2 self-start":void 0})]})]})}):(0,n.jsx)(s.NIc,{isInvalid:j,isRequired:u,children:(0,n.jsxs)(s.gCW,{alignItems:"start",children:[(0,n.jsxs)(s.jqI,{align:"center",children:[i?(0,n.jsx)(o.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,(0,n.jsx)(l.b,{label:c})]}),(0,n.jsx)(s.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:_,onSearch:"tags"===p.mode?b:void 0,onChange:C,value:x.value||void 0,status:j?"error":void 0}),h&&(0,n.jsx)(s.Q6r,{style:{marginTop:0},children:h}),(0,n.jsx)(o.Bc,{isInvalid:j,message:v.error,fieldName:x.name})]})})}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return r.D4},MM:function(){return m},Ot:function(){return d},c6:function(){return s},cj:function(){return p},e$:function(){return l},fn:function(){return o},iC:function(){return h},nU:function(){return u},tB:function(){return c}});var n,s,r=i(19043);let a="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:i}=e;return{status:i,message:l(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=s||(s={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},p=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),s=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?i=t.data.detail:(0,s.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var n=i(24246),s=i(4454);let r=()=>{let e=(0,s.pmc)();return{errorAlert:(t,i,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)},successAlert:(t,i,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var n=i(24246),s=i(4454),r=i(79894),a=i.n(r),l=i(27378);let{Text:o}=s.AntTypography,d=e=>{let{items:t,...i}=e,r=(0,l.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,l={...e},d=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:l.title})),d)?l.title=(0,n.jsx)(s.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,n.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,n.jsx)(s.zrq,{items:r,...i})}},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return o},I3:function(){return s},kN:function(){return a},qX:function(){return l},rE:function(){return r}});var n=i(61317);let s=[...new Map([[n.q2.APPROVED,"Approved"],[n.q2.CANCELED,"Canceled"],[n.q2.COMPLETE,"Completed"],[n.q2.DENIED,"Denied"],[n.q2.ERROR,"Error"],[n.q2.IN_PROCESSING,"In Progress"],[n.q2.PENDING,"New"],[n.q2.PAUSED,"Paused"],[n.q2.IDENTITY_UNVERIFIED,"Unverified"],[n.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),r=new Map([[n.Us.ACCESS,"Access"],[n.Us.ERASURE,"Erasure"],[n.Us.CONSENT,"Consent"],[n.Us.UPDATE,"Update"]]),a=[...r].map(e=>{let[t,i]=e;return{label:i,value:t}}),l={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3",gcs:"gcs"}},64665:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return y}});var n=i(24246),s=i(4454),r=i(27378),a=i(812),l=i(14047),o=i(77213),d=i(77830),c=i(58754),u=i(7426),m=i(71784),h=i(90867),p=i(34090),x=i(97181),v=i(40324),f=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[f,j]=(0,r.useState)(""),[g]=(0,h.gC)(),[y]=(0,h.cf)(),{handleError:_}=(0,l.H)(),{successAlert:b}=(0,l.V)(),C={type:m.DE.gcs,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},k=async e=>{let t=await g({type:m.DE.gcs,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,a.D4)(t)?_(t.error):(j(e.auth_method),b("Google Cloud Storage credentials successfully updated."))},w=async e=>{let t=e.private_key.trim();t.includes("\\n")&&(t=t.replace(/\\n/g,"\n"));let i=await y({details:{type:e.type,project_id:e.project_id,private_key_id:e.private_key_id,private_key:t,client_email:e.client_email,client_id:e.client_id,auth_uri:e.auth_uri,token_uri:e.token_uri,auth_provider_x509_cert_url:e.auth_provider_x509_cert_url,client_x509_cert_url:e.client_x509_cert_url,universe_domain:e.universe_domain},type:m.DE.gcs});(0,a.D4)(i)?_(i.error):b("Google Cloud Storage secrets successfully updated.")};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Google Cloud Storage configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:C,onSubmit:k,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(x.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,n.jsx)(x.d,{name:"auth_method",label:"Auth method",options:[{label:"Service Account Keys",value:"service_account_keys"},{label:"Application Default Credentials",value:"adc"}],"data-testid":"auth_method",isRequired:!0}),(0,n.jsx)(v.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,n.jsx)(s.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"service_account_keys"===f&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:5}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:{type:"",project_id:"",private_key_id:"",private_key:"",client_email:"",client_id:"",auth_uri:"",token_uri:"",auth_provider_x509_cert_url:"",client_x509_cert_url:"",universe_domain:""},onSubmit:w,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(v.j0,{name:"type",label:"Type"}),(0,n.jsx)(v.j0,{name:"project_id",label:"Project ID"}),(0,n.jsx)(v.j0,{name:"private_key_id",label:"Private key ID",type:"password"}),(0,n.jsx)(v.j0,{name:"private_key",label:"Private key",type:"password"}),(0,n.jsx)(v.j0,{name:"client_email",label:"Client email"}),(0,n.jsx)(v.j0,{name:"client_id",label:"Client ID"}),(0,n.jsx)(v.j0,{name:"auth_uri",label:"Auth URI"}),(0,n.jsx)(v.j0,{name:"token_uri",label:"Token URI"}),(0,n.jsx)(v.j0,{name:"auth_provider_x509_cert_url",label:"Auth provider x509 cert URL"}),(0,n.jsx)(v.j0,{name:"client_x509_cert_url",label:"Client x509 cert URL"}),(0,n.jsx)(v.j0,{name:"universe_domain",label:"Universe domain"})]}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]})]})},j=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[f,j]=(0,r.useState)(""),[g]=(0,h.gC)(),[y]=(0,h.cf)(),{handleError:_}=(0,l.H)(),{successAlert:b}=(0,l.V)(),C={type:m.DE.s3,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},k=async e=>{let t=await g({type:m.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,a.D4)(t)?_(t.error):(j(e.auth_method),b("S3 storage credentials successfully updated."))},w=async e=>{let t=await y({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:m.DE.s3});(0,a.D4)(t)?_(t.error):b("S3 storage secrets successfully updated.")};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"S3 storage configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:C,onSubmit:k,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(x.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,n.jsx)(x.d,{name:"auth_method",label:"Auth method",options:[{label:"secret_keys",value:"secret_keys"},{label:"automatic",value:"automatic"}],"data-testid":"auth_method",isRequired:!0}),(0,n.jsx)(v.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,n.jsx)(s.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"secret_keys"===f?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:5}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:w,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(v.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,n.jsx)(v.j0,{name:"aws_secret_access_key",label:"AWS secret access key",type:"password"})]}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null]})},g=()=>{let{successAlert:e}=(0,l.V)(),{handleError:t}=(0,l.H)(),[i,p]=(0,r.useState)(""),{data:x}=(0,h.PW)(),{data:v}=(0,h.Au)({type:i}),[g,{isLoading:y}]=(0,h.gC)(),[_]=(0,u.L)();(0,r.useEffect)(()=>{x&&p(x.type)},[x]);let b=async i=>{let{value:n}=i.target;if(n===m.DE.local){let i=await g({type:n,details:{},format:"json"});(0,a.D4)(i)?t(i.error):e("Configured storage details successfully.")}let s=await _({storage:{active_default_storage_type:n}});(0,a.D4)(s)?t(s.error):p(n)},C={s3:j,gcs:f}[i];return(0,n.jsxs)(o.Z,{title:"Configure Privacy Requests - Storage",children:[(0,n.jsx)(c.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:d.Jw},{title:"Configure requests",href:d.fz},{title:"Storage"}]}),(0,n.jsx)(s.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure storage"}),(0,n.jsxs)(s.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,n.jsx)(s.xuv,{mb:5,children:"Fides requires a storage destination to store and share the results of privacy requests. For a production setup, it is highly recommended to have S3 as a storage destination. Ensure you have completed the setup for the storage destination and have the details handy prior to the following steps."}),(0,n.jsxs)(s.xuv,{children:["To configure a Storage destination, first choose a method to store your results. Fides currently supports"," ",(0,n.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"Local"}),", ",(0,n.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"S3"})," ","and"," ",(0,n.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"GCS"})," ","storage methods."]}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose storage type to configure"}),(0,n.jsx)(s.y02.Group,{disabled:y,onChange:b,value:i,"data-testid":"privacy-requests-storage-selection",className:"p-3",children:(0,n.jsxs)(s.jqI,{children:[(0,n.jsx)(s.y02,{value:"local","data-testid":"option-local",children:"Local"},"local"),(0,n.jsx)(s.y02,{value:"s3","data-testid":"option-s3",children:"S3"},"s3"),(0,n.jsx)(s.y02,{value:"gcs","data-testid":"option-gcs",children:"GCS"},"gcs")]})}),C&&v&&(0,n.jsx)(C,{storageDetails:v})]})]})},y=()=>(0,n.jsx)(g,{})},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return a},D4:function(){return s},Dy:function(){return o},XD:function(){return d},cz:function(){return c},hE:function(){return l},oK:function(){return r}});var n=i(76649);let s=e=>"error"in e,r=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,n.Ln)({status:"number",data:{}},e),l=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>r(e,t),s=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>r(i,t[e]));class a{static narrow(e){return new a(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof a?e.NF:e instanceof Function?e:t=>n(e,t);return new a(e=>t(e)&&i(e))}}new a(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);