Пример #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();
         }
     }
 }
Пример #2
0
 internal override void SuppressPiiData(PiiMap piiMap)
 {
     base.SuppressPiiData(piiMap);
     if (base.PolicyId != null)
     {
         base.PolicyId = SuppressingPiiProperty.TryRedactValue <ADIdParameter>(MalwareFilterRuleSchema.MalwareFilterPolicy, base.PolicyId);
     }
 }
Пример #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);
 }
Пример #4
0
        public void PopulateSyncObjectData()
        {
            this.SyncObjectData = string.Empty;
            SortedDictionary <string, object> sortedDictionary = new SortedDictionary <string, object>();

            foreach (PropertyDefinition propertyDefinition in this.MySyncObject.Schema.AllProperties)
            {
                SyncPropertyDefinition syncPropertyDefinition = propertyDefinition as SyncPropertyDefinition;
                if (syncPropertyDefinition != null && this.MySyncObject.IsPropertyPresent(syncPropertyDefinition))
                {
                    object        obj          = this.MySyncObject[syncPropertyDefinition];
                    ISyncProperty syncProperty = obj as ISyncProperty;
                    if (syncProperty != null)
                    {
                        if (!syncProperty.HasValue)
                        {
                            continue;
                        }
                        obj = syncProperty.GetValue();
                    }
                    if (obj != null)
                    {
                        if (SuppressingPiiContext.NeedPiiSuppression)
                        {
                            obj = SuppressingPiiProperty.TryRedact(syncPropertyDefinition, obj, null);
                        }
                        IList list = obj as IList;
                        if (list != null)
                        {
                            StringBuilder stringBuilder = new StringBuilder();
                            stringBuilder.Append("(");
                            for (int i = 0; i < list.Count; i++)
                            {
                                if (i == 0)
                                {
                                    stringBuilder.Append(list[i].ToString());
                                }
                                else
                                {
                                    stringBuilder.AppendFormat(",{0}", list[i].ToString());
                                }
                            }
                            stringBuilder.Append(")");
                            obj = stringBuilder.ToString();
                        }
                        sortedDictionary[propertyDefinition.Name] = obj;
                    }
                }
            }
            StringBuilder stringBuilder2 = new StringBuilder();

            foreach (string text in sortedDictionary.Keys)
            {
                object obj2 = sortedDictionary[text];
                stringBuilder2.AppendFormat("[{0}]:{1}\r\n", text, obj2.ToString());
            }
            this.SyncObjectData = stringBuilder2.ToString();
        }
        internal override void SuppressPiiData()
        {
            string text = SuppressingPiiProperty.TryRedactValue <string>(RuleSchema.PrependSubject, this.Prefix.ToString());

            if (text != null && text.Length > 32)
            {
                text = text.Substring(0, 32);
            }
            this.Prefix = new SubjectPrefix(text);
        }
Пример #6
0
        protected IDisposable CreatePiiSuppressionContext(IConfigurable outputObject)
        {
            ConfigurableObject configurableObject = outputObject as ConfigurableObject;

            if (configurableObject == null)
            {
                return(null);
            }
            if (configurableObject.SkipPiiRedaction || SuppressingPiiProperty.IsExcludedSchemaType(configurableObject.ObjectSchema.GetType()) || (VariantConfiguration.InvariantNoFlightingSnapshot.CmdletInfra.SkipPiiRedactionForForestWideObject.Enabled && TaskHelper.IsForestWideADObject(outputObject as ADObject)))
            {
                return(null);
            }
            CmdletLogger.SafeSetLogger(this.CurrentTaskContext.UniqueId, RpsCmdletMetadata.IsOutputObjectRedacted, true);
            return(SuppressingPiiContext.Create(true, this.CurrentPiiMap));
        }
Пример #7
0
 private static IEnumerable <int> GetPiiParams(string fullId, object[] parameters)
 {
     int[] piiParamIndexes = SuppressingPiiProperty.GetPiiStringParams(fullId);
     for (int i = 0; i < parameters.Length; i++)
     {
         if (parameters[i] is LocalizedString)
         {
             yield return(i);
         }
         else if (piiParamIndexes != null && piiParamIndexes.Contains(i))
         {
             yield return(i);
         }
     }
     yield break;
 }
Пример #8
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);
 }
Пример #9
0
        private void InitializePiiRedaction()
        {
            string    text = Path.Combine(ExchangeSetupContext.InstallPath, "ClientAccess\\PowerShell-Proxy\\CmdletDataRedaction.xml");
            Exception ex   = null;
            string    text2;

            try
            {
                text2 = SuppressingPiiProperty.Initialize(text);
            }
            catch (IOException ex2)
            {
                ex    = ex2;
                text2 = string.Format("IOException occurred while loading the configuration file. Please make sure the CmdletDataRedaction.xml is accessible. Expected path: {0}, Details: {1}", text, ex2);
            }
            catch (InvalidOperationException ex3)
            {
                ex    = ex3;
                text2 = string.Format("An error occurred during deserializing file {0}, please make sure the XML file is well-formatted and complies with the XML schema definition. Details: {1}", text, ex3);
            }
            if (text2 != null)
            {
                if (ex != null)
                {
                    this.CurrentTaskContext.CommandShell.WriteError(new LocalizedException(LocalizedString.Empty, ex), ExchangeErrorCategory.ServerOperation, text);
                }
                else
                {
                    this.CurrentTaskContext.CommandShell.WriteWarning(Strings.PiiRedactionInitializationFailed(text2));
                }
                TaskLogger.LogEvent("All", TaskEventLogConstants.Tuple_FailedToInitailizeCmdletDataRedactionConfiguration, new object[]
                {
                    text2
                });
            }
        }
Пример #10
0
 internal override void SuppressPiiData()
 {
     this.Words = SuppressingPiiProperty.TryRedactValue <Word[]>(RuleSchema.HeaderContainsWords, this.Words);
 }
Пример #11
0
 internal override void SuppressPiiData()
 {
     this.Words = SuppressingPiiProperty.TryRedactValue <Word[]>(RuleSchema.AttachmentExtensionMatchesWords, this.Words);
 }
Пример #12
0
 internal override void SuppressPiiData()
 {
     this.EventMessage = SuppressingPiiProperty.TryRedactValue <EventLogText>(RuleSchema.LogEventText, this.EventMessage);
 }
 internal virtual void SuppressPiiData(PiiMap piiMap)
 {
     this.adDlpPolicy.DistinguishedName = (SuppressingPiiProperty.TryRedact(DlpPolicySchemaBase.DistinguishedName, this.adDlpPolicy.DistinguishedName, piiMap) as string);
 }
Пример #14
0
 internal override void SuppressPiiData()
 {
     this.Lists = SuppressingPiiProperty.TryRedactValue <Word[]>(RuleSchema.SenderInRecipientList, this.Lists);
 }
 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 override void SuppressPiiData()
 {
     this.ConnectorName = SuppressingPiiProperty.TryRedactValue <string>(RuleSchema.RouteMessageOutboundConnector, this.ConnectorName);
 }
Пример #17
0
 internal override void SuppressPiiData()
 {
     this.NotificationContent = SuppressingPiiProperty.TryRedactValue <DisclaimerText>(RuleSchema.GenerateNotification, this.NotificationContent);
 }
Пример #18
0
		internal override void SuppressPiiData()
		{
			this.MessageHeader = SuppressingPiiProperty.TryRedactValue<HeaderName>(RuleSchema.RemoveHeader, this.MessageHeader);
		}
Пример #19
0
 internal void SuppressPiiData(PiiMap piiMap)
 {
     base.Name = (SuppressingPiiProperty.TryRedact(ADObjectSchema.Name, base.Name, piiMap) as string);
 }
Пример #20
0
 internal override void SuppressPiiData()
 {
     this.template = SuppressingPiiProperty.TryRedactValue <RmsTemplateIdentity>(RuleSchema.ApplyRightsProtectionTemplate, this.template);
 }
Пример #21
0
 internal override void SuppressPiiData()
 {
     this.Text = SuppressingPiiProperty.TryRedactValue <DisclaimerText>(RuleSchema.ApplyHtmlDisclaimerText, this.Text);
 }
 internal override void SuppressPiiData()
 {
     this.MessageHeader = SuppressingPiiProperty.TryRedactValue <HeaderName>(RuleSchema.HeaderMatchesMessageHeader, this.MessageHeader);
     this.Patterns      = Utils.RedactPatterns(this.Patterns);
 }
Пример #23
0
 internal override void SuppressPiiData()
 {
     this.RejectReason = SuppressingPiiProperty.TryRedactValue <DsnText>(RuleSchema.RejectMessageReasonText, this.RejectReason);
 }