Manage PII data
Introduces methods used for managing personally identifiable information (PII) in a search index used with Optimizely Search & Navigation.
Optimizely Search & Navigation uses tracking to store statistical data about search queries submitted by site visitors and the results they clicked. The statistics help identify areas of improvement and optimization so you can provide more relevant content to visitors.
Managing PII data in your search solution is important to comply with GDPR policies (General Data Protection Regulation) and manage data protection requests. See GDPR guidelines.
Use the following methods to manage PII data in the search index.
You should not index form attachments if there is a chance those attachments contain sensitive information, such as personally identifiable information (PII). For example, if you upload documents with PII data on form attachments, Optimizely Search & Navigation will index these, even though form attachment permissions prevent viewing. However, you might discover the information in search results.
To prevent this, add the following initialization code to prevent uploads of those form attachments.
{
[InitializableModule]
[ModuleDependency(typeof (EPiServer.Web.InitializationModule))]
public class FindInitialization: IInitializableModule {
private ContentAssetHelper contentAssetHelper;
private ContentIndexer contentIndexer;
public void Initialize(InitializationEngine context) {
contentAssetHelper = ServiceLocator.Current.GetInstance < ContentAssetHelper > ();
contentIndexer = ServiceLocator.Current.GetInstance < ContentIndexer > ();
//Media
ContentIndexer.Instance.Conventions.ForInstancesOf < MediaData > ().ShouldIndex(p => ShouldIndexDocument(p));
}
bool ShouldIndexDocument(MediaData content) {
if (contentAssetHelper.GetAssetOwner(content.ContentLink) is FileUploadElementBlock) {
//if descendant of episerver forms or a file uplaoded through a epi form, do not index
return false;
}
return !content.IsDeleted && isNotArchived(content.StopPublish);
}
bool isNotArchived(DateTime ? stopPublishDate) {
return (stopPublishDate == null || (stopPublishDate != null && stopPublishDate > System.DateTime.Now));
}
public void Uninitialize(InitializationEngine context) {}
}
}
Updated 1 day ago