// Token: 0x06000040 RID: 64 RVA: 0x00002F4C File Offset: 0x0000114C
        private RULE_PACKAGE_DETAILS LoadRules(string packageId)
        {
            ULS.SendTraceTag(4850015U, ULSCat.msoulscat_SEARCH_DataLossPrevention, 50, "FASTClassificationStore.GetDefaultRulePackageDetails :: Loading rules for package [{0}]", new object[]
            {
                packageId
            });
            RULE_PACKAGE_DETAILS result = default(RULE_PACKAGE_DETAILS);

            result.RulePackageID    = packageId;
            result.RulePackageSetID = "NA";
            List <string> list = new List <string>();

            if (this.defaultRuleSet.PackageId == packageId)
            {
                foreach (string text in this.defaultRuleSet.AllRuleIds)
                {
                    if (VariantConfiguration.IsFeatureEnabled(40, text))
                    {
                        ULS.SendTraceTag(4850016U, ULSCat.msoulscat_SEARCH_DataLossPrevention, 100, "FASTClassificationStore.GetDefaultRulePackageDetails :: Adding rule [{0}]", new object[]
                        {
                            text
                        });
                        list.Add(text);
                    }
                }
            }
            result.RuleIDs = list.ToArray();
            return(result);
        }
Ejemplo n.º 2
0
 // Token: 0x06000053 RID: 83 RVA: 0x00003804 File Offset: 0x00001A04
 private void EvaluateFlights(string path, string tenantId, IRecord record, out bool crawl, out bool persist)
 {
     crawl   = false;
     persist = false;
     if (VariantConfiguration.IsFeatureEnabled(41, tenantId))
     {
         crawl   = true;
         persist = true;
     }
     ULS.SendTraceTag(4850052U, ULSCat.msoulscat_SEARCH_DataLossPrevention, 100, "DLPClassificationEvaluator.EvaluateFlights :: path=[{0}] crawl={1}  persist={2}", new object[]
     {
         path,
         crawl,
         persist
     });
 }
 // Token: 0x060000AC RID: 172 RVA: 0x00004A14 File Offset: 0x00002C14
 protected override void FirstRecord(IRecord record)
 {
     this.isIPClassificationQueryEnabled = VariantConfiguration.IsFeatureEnabled(39, this.GetTenantId(record).ToString());
 }
Ejemplo n.º 4
0
        // Token: 0x0600009B RID: 155 RVA: 0x0000449C File Offset: 0x0000269C
        protected override void ProcessRecordInScopeIterationMode()
        {
            ULS.SendTraceTag(5256286U, ULSCat.msoulscat_SEARCH_DataLossPrevention, 100, "DLPSecurityTrimmerProducer.ProcessRecordInScopeIterationMode :: record={0}", new object[]
            {
                this.holder
            });
            IField field = this.holder[this.tenantIdPosition];

            if (field != null)
            {
                this.tenantId = (Guid)field.Value;
            }
            else
            {
                ULS.SendTraceTag(5256287U, ULSCat.msoulscat_SEARCH_DataLossPrevention, 50, "DLPSecurityTrimmerProducer.ProcessRecordInScopeIterationMode :: Could not extract the tenant ID from the record.  Using the empty Guid.");
            }
            if (!VariantConfiguration.IsFeatureEnabled(62, this.tenantId.ToString()))
            {
                return;
            }
            try
            {
                this.isDLPAuthorized = this.CanAccessDataLossPreventionProperties(this.holder);
                if (!this.isDLPAuthorized)
                {
                    IListField <string> listField = this.holder[this.selectPropertiesPosition] as IListField <string>;
                    if (listField != null)
                    {
                        for (int i = 0; i < listField.Count; i++)
                        {
                            string text = listField[i];
                            if (this.classificationScopes.Contains(text, StringComparer.OrdinalIgnoreCase))
                            {
                                ULS.SendTraceTag(5256288U, ULSCat.msoulscat_SEARCH_DataLossPrevention, 50, "DLPSecurityTrimmerProducer.ProcessRecordInScopeIterationMode :: tenantId={0}; selectProperty={1}; User is not authorized for data-loss-prevention properties, but attempted to access at least one as a select property.", new object[]
                                {
                                    this.tenantId,
                                    text
                                });
                                throw new SecurityAccessDeniedException("You do not have access to this property: " + text);
                            }
                        }
                    }
                    base.ProcessRecordInScopeIterationMode();
                }
            }
            catch (ThreadAbortException)
            {
            }
            catch (OutOfMemoryException)
            {
                throw;
            }
            catch (SecurityAccessDeniedException)
            {
                throw;
            }
            catch (Exception ex)
            {
                ULS.SendTraceTag(5256289U, ULSCat.msoulscat_SEARCH_DataLossPrevention, 10, "DLPSecurityTrimmerProducer.ProcessRecordInScopeIterationMode :: tenantId={0}; exception={1}", new object[]
                {
                    this.tenantId,
                    ex
                });
                throw;
            }
        }
        // Token: 0x060000BE RID: 190 RVA: 0x00004E74 File Offset: 0x00003074
        protected override void ProcessRecordInScopeIterationMode()
        {
            IField field = this.holder[this.tenantIdPosition];

            if (field != null)
            {
                this.tenantId = (Guid)field.Value;
            }
            else
            {
                ULS.SendTraceTag(5833443U, ULSCat.msoulscat_SEARCH_DataLossPrevention, 50, "DLPQuerySensitiveTypeTranslationProducer.ProcessRecordInScopeIterationMode :: Could not extract the tenant ID from the record.  Using the empty Guid.");
            }
            if (!VariantConfiguration.IsFeatureEnabled(39, this.tenantId.ToString()))
            {
                return;
            }
            try
            {
                IUpdateableListField <string> updateableListField = this.holder[this.selectPropertiesPosition] as IUpdateableListField <string>;
                if (updateableListField != null)
                {
                    bool flag  = false;
                    bool flag2 = false;
                    int  num   = 0;
                    while (num < updateableListField.Count && !flag2)
                    {
                        string b = updateableListField[num];
                        if (string.Equals("SensitiveType", b, StringComparison.OrdinalIgnoreCase))
                        {
                            flag2 = true;
                        }
                        else if (string.Equals("SensitiveMatchCount", b, StringComparison.OrdinalIgnoreCase) || string.Equals("SensitiveMatchConfidence", b, StringComparison.OrdinalIgnoreCase))
                        {
                            flag = true;
                        }
                        num++;
                    }
                    if (flag && !flag2)
                    {
                        updateableListField.Add("SensitiveType");
                    }
                }
                base.ProcessRecordInScopeIterationMode();
            }
            catch (ThreadAbortException)
            {
            }
            catch (OutOfMemoryException)
            {
                throw;
            }
            catch (SecurityAccessDeniedException)
            {
                throw;
            }
            catch (ArgumentException)
            {
                throw;
            }
            catch (Exception ex)
            {
                ULS.SendTraceTag(5833472U, ULSCat.msoulscat_SEARCH_DataLossPrevention, 10, "DLPQuerySensitiveTypeTranslationProducer.ProcessRecordInScopeIterationMode :: tenantId={0}; exception={1}", new object[]
                {
                    this.tenantId,
                    ex
                });
                throw;
            }
        }