Ejemplo n.º 1
0
        /// <summary>
        /// Constuctor - populates with sample data not part of the contract
        /// </summary>
        public DataMaskingPolicyContract()
        {
            DatabaseEntityContract dummyEntity = new DatabaseEntityContract()
            {
                Schema = "dbo",
                Name   = "MyTable"
            };

            DataMaskingPolicyRules = new List <DataMaskingPolicyRuleContract>()
            {
                new DataMaskingPolicyRuleContract()
                {
                    IsEnabled = true, Entity = dummyEntity, ColumnName = "Column1", FieldType = DatabaseSecurityPolicyConstants.FieldTypeCreditCard, MaskingFunction = DatabaseSecurityPolicyConstants.DataMaskingFunctionFull
                },
                new DataMaskingPolicyRuleContract()
                {
                    IsEnabled = true, Entity = dummyEntity, ColumnName = "Column2", FieldType = DatabaseSecurityPolicyConstants.FieldTypeSocialSecurityNumber, MaskingFunction = DatabaseSecurityPolicyConstants.DataMaskingFunctionPartial
                },
                new DataMaskingPolicyRuleContract()
                {
                    IsEnabled = true, Entity = dummyEntity, ColumnName = "Column3", FieldType = DatabaseSecurityPolicyConstants.FieldTypeFullName, MaskingFunction = DatabaseSecurityPolicyConstants.DataMaskingFunctionRandomReplacement
                },
                new DataMaskingPolicyRuleContract()
                {
                    IsEnabled = true, Entity = dummyEntity, ColumnName = "Column4", FieldType = DatabaseSecurityPolicyConstants.FieldTypePhoneNumber, MaskingFunction = DatabaseSecurityPolicyConstants.DataMaskingFunctionPartial
                },
                new DataMaskingPolicyRuleContract()
                {
                    IsEnabled = true, Entity = dummyEntity, ColumnName = "Column5", FieldType = DatabaseSecurityPolicyConstants.FieldTypeEmailAddress, MaskingFunction = DatabaseSecurityPolicyConstants.DataMaskingFunctionRandomReplacement
                },
            };
            IncludedPrincipals = new List <string>()
            {
                "giladeis",
            };
            ExcludedPrincipals = new List <string>()
            {
                "yosefd",
            };
            DataMaskingReplacementRules = new List <DataMaskingReplacementRuleContract>()
            {
                new DataMaskingReplacementRuleContract()
            };
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constuctor - populates with sample data not part of the contract
 /// </summary>
 public DataMaskingReplacementRuleContract()
 {
     To   = new DatabaseEntityContract();
     From = new DatabaseEntityContract();
 }