Resource
A resource is a crucial element within a system that is typically associated with a specific business function. It represents a single entity that can either store or process data. Each resource is designed to perform a specific function within a system. A resource can be a microservice or a single product from a cloud provider.
A resource is defined in the catalogue/\<organization name\>/\<system name\>/\<resource name/>/resource.yml
file. The resource.yml
file accepts all arguments defined in the Resource
model with the expection of:
- The
key
is created using the catalogue folder structure. - The
datasets
dictionary is created using the catalogue folder strucutre.
Example
# resource.yaml
resource:
key: resource_key
tags:
- foo
- bar
name: <resource name>
description: <resource description>
resource_type: Service
data_responsibility_title: Processor
privacy_declarations:
- name: Privacy Policy
data_categories:
- user.device.cookie_id
- user.contact
data_use: improve.system
data_subjects:
- Customer
data_qualifier: Aggregated
dependencies:
- system_key
joint_controller:
name: Dave
address: Museumplein 10, 1071 DJ Amsterdam, Netherlands
email: dave@organization.com
phone: 020 573 2911
third_country_transfers:
- USA
- CAN
administrating_department: engineering
data_protection_impact_assessment:
is_required: true
status: Complete
link: https://example.org/analytics_system_data_protection_impact_assessment
Models
blackline.models.catalogue.Resource
Bases: BlacklineModel
The System resource model.
Describes an application and includes a list of PrivacyDeclaration resources.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_type |
Optional[ResourceTypeEnum]
|
A required value to describe the type of system being modeled |
None
|
data_responsibility_title |
Optional[DataResponsibilityTitle]
|
None
|
|
privacy_declarations |
Optional[list[PrivacyDeclaration]]
|
None
|
|
dependencies |
Optional[list[Key]]
|
A list of keys to model dependencies. |
None
|
joint_controller |
Optional[ContactDetails]
|
None
|
|
third_country_transfers |
Optional[list[str]]
|
An optional array to identify any countries where data is transited to. For consistency purposes, these fields are required to follow the Alpha-3 code set in ISO 3166-1. |
None
|
administrating_department |
Optional[str]
|
The department or group that owns the resource |
None
|
data_protection_impact_assessment |
Optional[DataProtectionImpactAssessment]
|
None
|
|
children |
Optional[dict[str, Dataset]]
|
Dataset dict |
None
|
stem | required | ||
children_stem | required | ||
children_cls | required | ||
_sort_privacy_declarations |
classmethod
|
required | |
_no_self_reference |
classmethod
|
required | |
_check_valid_country_code |
classmethod
|
required |
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/catalogue.py
blackline.models.catalogue.BlacklineModel
Bases: BaseModel
The base model for all Resources.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
Key
|
A unique key used to identify this resource. | required |
tags |
Optional[list[str]]
|
A list of tags for this resource. |
None
|
name |
Optional[str]
|
None
|
|
description |
Optional[str]
|
None
|
|
children |
Optional[dict[str, Type[BlacklineModel]]]
|
The children resources. |
None
|
stem |
str
|
The stem of the resource. | required |
children_stem |
Optional[str]
|
required | |
children_cls |
Optional[type[BlacklineModel]]
|
required |
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/catalogue.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
|
Config
parse_children(path, key_prefix=None)
classmethod
Parse a directory of YAML files into a dictionary of Dataset objects.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
Path
|
The path to the directory of YAML files. |
required |
path |
Path
|
Path |
required |
Returns:
Type | Description |
---|---|
dict[str, Type[BlacklineModel]]
|
A dictionary of Dataset objects. |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/catalogue.py
parse_dir(path, key_prefix=None)
classmethod
Parse a directory of YAML files into a dictionary of Dataset objects.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
Path
|
The path to the directory of YAML files. |
required |
path |
Path
|
Path |
required |
Returns:
Type | Description |
---|---|
A dictionary of Dataset objects. |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/catalogue.py
parse_yaml(path, key, children={})
classmethod
Parse a yaml file into a the children_cls object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
Path
|
Path location of the yaml file. |
required |
key |
str
|
Key to identify the dataset. |
required |
Returns:
Type | Description |
---|---|
Dataset object. |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/catalogue.py
blackline.models.catalogue.ResourceTypeEnum
Bases: str
, Enum
The model for resource types.
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/catalogue.py
APPLICATION = 'Application'
class-attribute
instance-attribute
DATABASE = 'Database'
class-attribute
instance-attribute
DATALAKE = 'Datalake'
class-attribute
instance-attribute
DATA_WAREHOUSE = 'Data Warehouse'
class-attribute
instance-attribute
SERVICE = 'Service'
class-attribute
instance-attribute
blackline.models.catalogue.DataResponsibilityTitle
Bases: str
, Enum
The model defining the responsibility or role over the system that processes personal data.
Used to identify whether the organization is a Controller, Processor, or Sub-Processor of the data
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/catalogue.py
blackline.models.catalogue.PrivacyDeclaration
Bases: BaseModel
The PrivacyDeclaration resource model.
States a function of a system, and describes how it relates to the privacy data types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the privacy declaration on the system. | required |
data_categories |
list[Key]
|
An array of data categories describing a system in a privacy declaration. | required |
data_use |
Key
|
The Data Use describing a system in a privacy declaration. | required |
data_qualifier |
Optional[Key]
|
None
|
|
data_subjects |
list[Key]
|
An array of data subjects describing a system in a privacy declaration. | required |
dataset_references |
Optional[list[Key]]
|
Referenced Dataset keys used by the system. |
None
|
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/catalogue.py
blackline.models.validation.Key
Bases: ConstrainedStr
A Key type that creates a custom constrained string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
regex |
Pattern[str]
|
required |
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/validation.py
blackline.models.catalogue.ContactDetails
Bases: BaseModel
The contact details information model.
Used to capture contact information for controllers, used as part of exporting a data map / ROPA.
This model is nested under an Organization and potentially under a system/dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
Optional[str]
|
An individual name used as part of publishing contact information. |
None
|
address |
Optional[str]
|
An individual address used as part of publishing contact information. |
None
|
Optional[str]
|
An individual email used as part of publishing contact information. |
None
|
|
phone |
Optional[str]
|
An individual phone number used as part of publishing contact information. |
None
|
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/catalogue.py
blackline.models.catalogue.DataProtectionImpactAssessment
Bases: BaseModel
The DataProtectionImpactAssessment (DPIA) resource model.
Contains information in regard to the data protection impact assessment exported on a data map or Record of Processing Activities (RoPA).
A legal requirement under GDPR for any project that introduces a high risk to personal information.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
is_required |
bool
|
A boolean value determining if a data protection impact assessment is required. Defaults to False. |
False
|
status |
Optional[ImpactAssessmentStatusEnum]
|
The optional status of a Data Protection Impact Assessment. Returned on an exported data map or RoPA. |
None
|
link |
Optional[AnyUrl]
|
The optional link to the Data Protection Impact Assessment. Returned on an exported data map or RoPA. |
None
|
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/catalogue.py
blackline.models.catalogue.ImpactAssessmentStatusEnum
Bases: str
, Enum
The model for impact assessment statuses.