mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-01 11:19:05 +00:00
updates security spec creation, removes unused specification
This commit is contained in:
parent
80a43d9114
commit
c60545ab54
@ -1,5 +1,6 @@
|
||||
/**
|
||||
* Builds a privacyCompliancePolicy map with default / unset values for non null properties
|
||||
* Builds a privacyCompliancePolicy map with default / unset
|
||||
* values for non null properties
|
||||
*/
|
||||
export const createPrivacyCompliancePolicy = () => {
|
||||
const policy = {
|
||||
@ -12,24 +13,27 @@ export const createPrivacyCompliancePolicy = () => {
|
||||
return JSON.parse(JSON.stringify(policy));
|
||||
};
|
||||
|
||||
/**
|
||||
* Builds a securitySpecification map with default / unset values for non null properties as per avro schema
|
||||
* @param {number} id
|
||||
*/
|
||||
/**
|
||||
* Builds a securitySpecification map with default / unset values
|
||||
* for non null properties as per avro schema
|
||||
* @param {number} id
|
||||
*/
|
||||
export const createSecuritySpecification = id => {
|
||||
const classification = [
|
||||
'highlyConfidential', 'confidential', 'limitedDistribution', 'mustBeEncrypted', 'mustBeMasked'
|
||||
].reduce((classification, classifier) => {
|
||||
const classification = ['highlyConfidential', 'confidential'].reduce(
|
||||
(classification, classifier) => {
|
||||
classification[classifier] = [];
|
||||
return classification;
|
||||
}, {});
|
||||
const securitySpecification = {
|
||||
classification,
|
||||
datasetId: id,
|
||||
geographicAffinity: {affinity: ''},
|
||||
recordOwnerType: '',
|
||||
retentionPolicy: {retentionType: ''}
|
||||
};
|
||||
},
|
||||
{}
|
||||
);
|
||||
|
||||
return JSON.parse(JSON.stringify(securitySpecification));
|
||||
const securitySpecification = {
|
||||
classification,
|
||||
datasetId: id,
|
||||
geographicAffinity: { affinity: '' },
|
||||
recordOwnerType: '',
|
||||
retentionPolicy: { retentionType: '' }
|
||||
};
|
||||
|
||||
return JSON.parse(JSON.stringify(securitySpecification));
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user