Ejemplo n.º 1
0
 internal void SuppressPiiData(PiiMap piiMap)
 {
     base.Name = (SuppressingPiiProperty.TryRedact(ADObjectSchema.Name, base.Name, piiMap) as string);
     if (this.ExchangeBinding != null)
     {
         foreach (BindingMetadata binding in this.ExchangeBinding)
         {
             Utils.RedactBinding(binding, false);
         }
     }
     if (this.SharePointBinding != null)
     {
         foreach (BindingMetadata binding2 in this.SharePointBinding)
         {
             Utils.RedactBinding(binding2, true);
         }
     }
     if (this.OneDriveBinding != null)
     {
         foreach (BindingMetadata binding3 in this.OneDriveBinding)
         {
             Utils.RedactBinding(binding3, true);
         }
     }
     if (this.DistributionResults != null)
     {
         foreach (PolicyDistributionErrorDetails policyDistributionErrorDetails in this.DistributionResults)
         {
             policyDistributionErrorDetails.Redact();
         }
     }
 }
Ejemplo n.º 2
0
        public static LocalizedString Redact(LocalizedString original, PiiMap piiMap)
        {
            LocalizedString result;

            SuppressingPiiData.TryRedactPiiLocString(original, piiMap, out result);
            return(result);
        }
Ejemplo n.º 3
0
 internal override void SuppressPiiData(PiiMap piiMap)
 {
     base.SuppressPiiData(piiMap);
     this.dlpPolicyMetaData.Name          = (SuppressingPiiProperty.TryRedact(DlpPolicySchemaBase.Name, this.dlpPolicyMetaData.Name, piiMap) as string);
     this.dlpPolicyMetaData.Description   = SuppressingPiiProperty.TryRedactValue <string>(DlpPolicySchemaBase.Description, this.dlpPolicyMetaData.Description);
     this.dlpPolicyMetaData.PublisherName = SuppressingPiiProperty.TryRedactValue <string>(DlpPolicySchemaBase.PublisherName, this.dlpPolicyMetaData.PublisherName);
     this.dlpPolicyMetaData.Keywords      = SuppressingPiiProperty.TryRedactValue <List <string> >(DlpPolicySchemaBase.Keywords, this.dlpPolicyMetaData.Keywords);
 }
Ejemplo n.º 4
0
 internal override void SuppressPiiData(PiiMap piiMap)
 {
     base.SuppressPiiData(piiMap);
     if (base.PolicyId != null)
     {
         base.PolicyId = SuppressingPiiProperty.TryRedactValue <ADIdParameter>(MalwareFilterRuleSchema.MalwareFilterPolicy, base.PolicyId);
     }
 }
Ejemplo n.º 5
0
 private static void AddPiiToMap(ExchangeRunspaceConfiguration config, string original, string redacted)
 {
     if (config != null)
     {
         if (string.IsNullOrEmpty(original) || string.IsNullOrEmpty(redacted))
         {
             return;
         }
         PiiMap orAdd = PiiMapManager.Instance.GetOrAdd(config.PiiMapId);
         if (orAdd != null)
         {
             orAdd[redacted] = original.ToString();
             return;
         }
     }
     else
     {
         ExTraceGlobals.TaskTracer.TraceDebug(0L, "Original value is not added to PII map. ExchangeRunspaceConfiguration is not set.");
     }
 }
Ejemplo n.º 6
0
 public static bool TryRedactPiiLocString(LocalizedString original, PiiMap piiMap, out LocalizedString redactedLocString)
 {
     if (original.FormatParameters != null)
     {
         object[]          array     = original.FormatParameters.ToArray <object>();
         IEnumerable <int> piiParams = SuppressingPiiData.GetPiiParams(original.FullId, array);
         bool flag = false;
         foreach (int num in piiParams)
         {
             string value = null;
             string key   = null;
             if (array[num] is LocalizedString)
             {
                 flag      |= SuppressingPiiData.TryRedactPiiLocString((LocalizedString)array[num], piiMap, out redactedLocString);
                 array[num] = redactedLocString;
             }
             else if (array[num] is ADObjectId)
             {
                 flag       = true;
                 array[num] = SuppressingPiiData.Redact((ADObjectId)array[num], out value, out key);
             }
             else if (array[num] != null)
             {
                 flag       = true;
                 array[num] = SuppressingPiiData.Redact(array[num].ToString(), out value, out key);
             }
             if (piiMap != null && !string.IsNullOrEmpty(value))
             {
                 piiMap[key] = value;
             }
         }
         redactedLocString = (flag ? original.RecreateWithNewParams(array) : original);
         return(flag);
     }
     redactedLocString = original;
     return(false);
 }
Ejemplo n.º 7
0
 internal override void SuppressPiiData(PiiMap piiMap)
 {
     base.SuppressPiiData(piiMap);
     if (this.conditions != null)
     {
         foreach (TransportRulePredicate transportRulePredicate in this.conditions)
         {
             transportRulePredicate.SuppressPiiData();
         }
     }
     if (this.exceptions != null)
     {
         foreach (TransportRulePredicate transportRulePredicate2 in this.exceptions)
         {
             transportRulePredicate2.SuppressPiiData();
         }
     }
     this.sentTo                    = SuppressingPiiProperty.TryRedactValue <RecipientIdParameter[]>(HygieneFilterRuleSchema.SentTo, this.sentTo);
     this.sentToMemberOf            = SuppressingPiiProperty.TryRedactValue <RecipientIdParameter[]>(HygieneFilterRuleSchema.SentToMemberOf, this.sentToMemberOf);
     this.recipientDomainIs         = SuppressingPiiProperty.TryRedactValue <Word[]>(HygieneFilterRuleSchema.RecipientDomainIs, this.recipientDomainIs);
     this.exceptIfSentTo            = SuppressingPiiProperty.TryRedactValue <RecipientIdParameter[]>(HygieneFilterRuleSchema.ExceptIfSentTo, this.exceptIfSentTo);
     this.exceptIfSentToMemberOf    = SuppressingPiiProperty.TryRedactValue <RecipientIdParameter[]>(HygieneFilterRuleSchema.ExceptIfSentToMemberOf, this.exceptIfSentToMemberOf);
     this.exceptIfRecipientDomainIs = SuppressingPiiProperty.TryRedactValue <Word[]>(HygieneFilterRuleSchema.ExceptIfRecipientDomainIs, this.exceptIfRecipientDomainIs);
 }
 internal virtual void SuppressPiiData(PiiMap piiMap)
 {
     this.transportRule.DistinguishedName = (SuppressingPiiProperty.TryRedact(RulePresentationObjectBaseSchema.DistinguishedName, this.transportRule.DistinguishedName, piiMap) as string);
     this.transportRule.Name = (SuppressingPiiProperty.TryRedact(RulePresentationObjectBaseSchema.Name, this.transportRule.Name, piiMap) as string);
 }
 internal virtual void SuppressPiiData(PiiMap piiMap)
 {
     this.adDlpPolicy.DistinguishedName = (SuppressingPiiProperty.TryRedact(DlpPolicySchemaBase.DistinguishedName, this.adDlpPolicy.DistinguishedName, piiMap) as string);
 }
Ejemplo n.º 10
0
 internal void SuppressPiiData(PiiMap piiMap)
 {
     base.Name = (SuppressingPiiProperty.TryRedact(ADObjectSchema.Name, base.Name, piiMap) as string);
 }