SlideShare a Scribd company logo
1 of 34
DOCUMENT LEVEL SECURITY IN SEARCH BASED
APPLICATIONS

Rajani Maski

- Senior Software Engineer
Agenda






Introduction to Search Based Applications
Requirement Analysis of Document Level Security
Access Control Lists
Multiple Solutions
Summary
Search Based Applications
 Search Based Applications are software application in which Search Engine
platform is used as the core infrastructure for information accessing and
reporting.
 E-commerce web applications or content management systems are the types of
search based application.
Overview of Search Based System
User Authentication System

Search Based Application Server

Unified Data Layer

Archives

Documents

Emails

File
Server

Authentication
• User is authenticated before providing access
to the application
Application
•
Presents with full fledge User Interface
• Perform user operations such as upload
documents, send emails, search, etc.
Unified Data Layer
• Search Server
• Indexes content across the sources
• Retrieves data at very high speed.
Data Storage
• Volume of data sources from different
repositories.
So Far, So Good!

What’s the problem?
Common Access
To Unified data Layer

User Authentication System

Search Based Application

How is this a
threat?
Unified Data Layer

Archives

Documents

Emails

File
Servers
Consider a Sample Use Case
User A :
- Logs in to application.
- Performs a search operation
- With the key words such as ‘Pay Slips’, ‘Personal’ or ‘appraisal’.
Sample results demonstrated for “appraisal”
Search Results

Un Authorized
Results
Observations
Relevant Search Results : [Correct]
- User A was returned with relevant search results based on his search query;
such as exact matches, more like this key words, synonym key words, etc.
Unauthorized Search results: [Wrong]
- Few of the search results retrieved were the documents to which he was not
authorized to view.
How are we
doing with this?
Threats:
• Exposure to other users’ confidential documents
• Access to Unauthorized information.
Problem Definition
•

To develop a search platform where every user has access to only those
documents to which he/she is authorized to.

•

To ensure that all the confidential data uploaded is not globally searchable unless
it is intended to be globally accessible.

How can we
achieve this?
Solution
Maintaining Access Control List mapped to each document
object.

Access
Control
List?
Access Control List
• Access Controls are Security features
that control how users [subject] and
documents[object] communicate and
interact with one another.
• Subject: An active entity[User] that
requests access to an
object[Document].
• Object: A passive entity[Document]
that contains information

Interaction

Subject

Document

Object
Data Model
Let’s first understand the data model of search engine.

Alec_1167
,_id:”1167”,
Name:”Ale C”,
Agent:”Miller”
Place:”NY, NJ, CA”,
Units:570}

NY

2

NJ

1167

1167 Alec Miller

1

1167

How are documents stored in search engine?
Document Oriented Approach.

1167

3

CA

570

3424 Kiwi

reds

340

5612 Reh

Mo’s

664
Indexing and Storing Document Object
•
•
•
•

User A uploads a document into the system
Text Extraction
Convert it to a flat structure
Input it to Search Engine

Document

Text
Extract

Search
Engine

Document
Saved
•

We missed to capture something!

•

What did we miss?
– Capturing of User information for each document!
• Who uploaded the document
• To whom did the user share with?
Document

•

Text
Extract

Search
Engine

How do we maintain this information?
– Access control list to each document object.

Document
Saved
Conventional Solution
•

Access Control Lists for each user.

•

At the time of search,
– Retrieve search results,
– And perform a check on each document for
user’s authorization and
– Finally return the results.

Search Engine

Security Filter Each
Document
Return Results to
User
 Multiple Solutions.
Access Control Models
Solutions are dependent on the Access Control Models we choose.
Two important types of Access Control Models:
1.
2.

Non-Discretionary Access Control(Role Based)
Discretionary Access Control (DAC)
1. Non-Discretionary (Role Based)
Sales
Definition:
•

Non-Discretionary ACL uses a
administered set of rules to
determine how Users and
Documents interact.

Sales Documents

Marketing Documents

Manager

Engineering Documents

•

It is referred to as
nondiscretionary because
assigning a user to a role is
unavoidable

Admin Documents

Super User
Solution For Role Based ACL - Type 1
System that has,
• Roles defined during design time and Static ACL set
to each document .
•

We choose, “Early Binding with ACL bound to

Document Objects”
In such systems,
• Document objects will include a multi-valued Roleid field that will contain list of role-Ids which has
access to the document.

Index Time
Document 1
role-Ids: *“1”, “2”, “3”+
Document 1
role-Ids: *“1”, “2”, “3”+
Document 2
“role-Ids:” * “2”, “3”+

Documents with ACLs
Continued…
At the time of search,
•
User Search Query should be appended with user’s
Role Id.
•
Solr’s Filter Query feature and it’s caching
techniques gives the most efficient solution for
such ACL Techniques. This approach is called as
‘Early Binding’ approach.

Query
Request

Early Binding
User Role-Id

Solr J Client

Query
Response
Solution For Role Based ACL - Type 2
Systems that has,
•
Roles which often change; data is normalized by
segregating access control information into
different tables.
•

Document1
D1

This approach is called as ‘Early Binding with

Externalized ACL’

•
•
•

In such systems:
Role-Ids are not attached to the document object.
Instead they are stored into different tables with
foreign key relation.
Use Pseudo Joins at the time of Search

Doc ID

Role-Ids

D1

1, 2, 3, N
2. Discretionary Access Control
Definition:
• Discretionary – Document
owner has the authority to
control access of the document.

• A system that enables the
document owner to specify set
of Users with access to a set of
documents

Owner

Specifies Users/groups
who can Access

Object
Solution for Discretionary ACL - Type 1
System that has
•
Frequent changes in ACL
•
ACL is defined for each user and a document,
•
We choose ‘Late Binding Approach with
Externalized ACL’

Users

Doc1

Doc2 Doc N

User A

1

1

1

User B

0

1

1

User M
In such systems,
•
ACL is a 2D-matrix with users and documents
along its rows and columns

Encode Values – 0 :No access, 1 : Access
N : Number of Users, M – Number of Documents
Continued…
For implementation, the ACL matrix can be represented as a array of bits.
Users

Doc1 Doc2

Doc N

UserA 1

1

1

UserB

1

1

0

[1] 111
[2] 011

This compact representation improves search efficiency and memory over head.
Example
Consider,
•
•
•
•

Maximum documents in the Search systems is 5 with document ids:{1,2, 3, 4, 5}
Maximum Users are 2 { Id : 1,2 }
User 1 has access to document {1, 2, 3} 1 1 1 0 0
User 2 has access to Document {1,2,3,4,5} 1 1 1 1 1

•

ACL matrix and array representation:
User

1 2 3 4 5

1

1 1 1 0 0

2

1 1 1 1 1

[1] 11100
[2] 11111
Solr Implementation
Solution 1
• Solr has a Post Filter Interface that can be extended to develop a Custom Plugin.
• Interface has a method called ‘collect()’

•

Collect() has a list of documents matched to the user’s search query.
– Iterate through the list, get the document-Id from the Field Cache and
apply ACL using bit array . 1 1 1 0 0

•

Code Snippets: https://gist.github.com/rajanim/7197154
Other Implementation Solution
Solution 2
• Using BitSet utilities
• Get the bitset of documents matched by the search query from Search Engine
• Get the User ACL bitset instance
• Obtain the intersection of the two bitsets [intersect(bitset other)]

1

1

1

0

0

1

1

1

1

1

0

0

1

0

0
Solution for Discretionary ACL - Type 2
•
•

Discretionary ACL systems have static ACL
We choose, “Early Binding with ACL bound to Document
Objects”

In such systems,
• Document objects will include a multi-valued user-id field that
contains a list of user-ids with access to the document.
• The user-id field has to be indexed.
Continued…
•

This solution requires the ACL and document data to be de-normalized to flat
structure.

Index Time
Parse Document

Search Time
Query Request
With User ID

Add List of Users
Who has access

Solr J Client

Query
Response
 Summary
Summary
•

Discretionary ACL with late binding solution is a complex model and it requires
extensive verification

•

Leverage Solr’s smart caching capability

•

Since ACL always adds an additional over head it has to be optimized to provide
minimum delay.
References:
•
•
•
•
•

•

searchhub.org/2012/02/22/custom-security-filtering-in-solr/
Secure Search in Enterprise Webs: Tradeoffs in Efficient Implementation for
Document Level Security By Peter Bailey, David Hawking, Brett Matson
All in One Book (Shon Harris, 2005)
http://www.searchtechnologies.com/enterprise-search-document-levelsecurity.html
http://alvinalexander.com/java/jwarehouse/lucene/src/test/org/apache/lucene
/search/TestFilteredQuery.java.shtml
https://github.com/Zvents/score_stats_component/blob/master/src/main/java/
com/zvents/solr/components/ScoreStatsPostFilter.java
Thank
You

More Related Content

What's hot

security and privacy in dbms and in sql database
security and privacy in dbms and in sql databasesecurity and privacy in dbms and in sql database
security and privacy in dbms and in sql databasegourav kottawar
 
Scalable policy-aware Linked Data architecture for prIvacy, transparency and ...
Scalable policy-aware Linked Data architecture for prIvacy, transparency and ...Scalable policy-aware Linked Data architecture for prIvacy, transparency and ...
Scalable policy-aware Linked Data architecture for prIvacy, transparency and ...Sabrina Kirrane
 
Sabrina Kirrane INSIGHT Viva Presentation
Sabrina Kirrane INSIGHT Viva Presentation Sabrina Kirrane INSIGHT Viva Presentation
Sabrina Kirrane INSIGHT Viva Presentation Sabrina Kirrane
 
Scalable Data Management: Automation and the Modern Research Data Portal
Scalable Data Management: Automation and the Modern Research Data PortalScalable Data Management: Automation and the Modern Research Data Portal
Scalable Data Management: Automation and the Modern Research Data PortalGlobus
 
Attribute based encryption with privacy preserving in clouds
Attribute based encryption with privacy preserving in cloudsAttribute based encryption with privacy preserving in clouds
Attribute based encryption with privacy preserving in cloudsSwathi Rampur
 
Security and Integrity
Security and IntegritySecurity and Integrity
Security and Integritylubna19
 
Facilitating Collaboration with Globus (GlobusWorld Tour - STFC)
Facilitating Collaboration with Globus (GlobusWorld Tour - STFC)Facilitating Collaboration with Globus (GlobusWorld Tour - STFC)
Facilitating Collaboration with Globus (GlobusWorld Tour - STFC)Globus
 
Accessing secured data in cloud computing environment
Accessing secured data in cloud computing environmentAccessing secured data in cloud computing environment
Accessing secured data in cloud computing environmentIJNSA Journal
 
Secure file sharing of dynamic audit services in cloud storage
Secure file sharing of dynamic audit services in cloud storageSecure file sharing of dynamic audit services in cloud storage
Secure file sharing of dynamic audit services in cloud storageeSAT Publishing House
 
Maintaining Data Integrity for Shared Data in Cloud
Maintaining Data Integrity for Shared Data in Cloud Maintaining Data Integrity for Shared Data in Cloud
Maintaining Data Integrity for Shared Data in Cloud IJERA Editor
 
Shared authority based privacy preserving authentication protocol in cloud co...
Shared authority based privacy preserving authentication protocol in cloud co...Shared authority based privacy preserving authentication protocol in cloud co...
Shared authority based privacy preserving authentication protocol in cloud co...Pvrtechnologies Nellore
 
Shared authority based privacy preserving authentication protocol in cloud co...
Shared authority based privacy preserving authentication protocol in cloud co...Shared authority based privacy preserving authentication protocol in cloud co...
Shared authority based privacy preserving authentication protocol in cloud co...Papitha Velumani
 
Web Services: Encapsulation, Reusability, and Simplicity
Web Services: Encapsulation, Reusability, and SimplicityWeb Services: Encapsulation, Reusability, and Simplicity
Web Services: Encapsulation, Reusability, and Simplicityhannonhill
 
Shared authority based privacy preserving authentication protocol in cloud co...
Shared authority based privacy preserving authentication protocol in cloud co...Shared authority based privacy preserving authentication protocol in cloud co...
Shared authority based privacy preserving authentication protocol in cloud co...Adz91 Digital Ads Pvt Ltd
 
CLOUD BASED ACCESS CONTROL MODEL FOR SELECTIVE ENCRYPTION OF DOCUMENTS WITH T...
CLOUD BASED ACCESS CONTROL MODEL FOR SELECTIVE ENCRYPTION OF DOCUMENTS WITH T...CLOUD BASED ACCESS CONTROL MODEL FOR SELECTIVE ENCRYPTION OF DOCUMENTS WITH T...
CLOUD BASED ACCESS CONTROL MODEL FOR SELECTIVE ENCRYPTION OF DOCUMENTS WITH T...IJNSA Journal
 
Ensuring distributed accountability
Ensuring distributed accountabilityEnsuring distributed accountability
Ensuring distributed accountabilityNandini Chandran
 

What's hot (20)

security and privacy in dbms and in sql database
security and privacy in dbms and in sql databasesecurity and privacy in dbms and in sql database
security and privacy in dbms and in sql database
 
Database security
Database securityDatabase security
Database security
 
Scalable policy-aware Linked Data architecture for prIvacy, transparency and ...
Scalable policy-aware Linked Data architecture for prIvacy, transparency and ...Scalable policy-aware Linked Data architecture for prIvacy, transparency and ...
Scalable policy-aware Linked Data architecture for prIvacy, transparency and ...
 
Sabrina Kirrane INSIGHT Viva Presentation
Sabrina Kirrane INSIGHT Viva Presentation Sabrina Kirrane INSIGHT Viva Presentation
Sabrina Kirrane INSIGHT Viva Presentation
 
Scalable Data Management: Automation and the Modern Research Data Portal
Scalable Data Management: Automation and the Modern Research Data PortalScalable Data Management: Automation and the Modern Research Data Portal
Scalable Data Management: Automation and the Modern Research Data Portal
 
Attribute based encryption with privacy preserving in clouds
Attribute based encryption with privacy preserving in cloudsAttribute based encryption with privacy preserving in clouds
Attribute based encryption with privacy preserving in clouds
 
Security and Integrity
Security and IntegritySecurity and Integrity
Security and Integrity
 
Facilitating Collaboration with Globus (GlobusWorld Tour - STFC)
Facilitating Collaboration with Globus (GlobusWorld Tour - STFC)Facilitating Collaboration with Globus (GlobusWorld Tour - STFC)
Facilitating Collaboration with Globus (GlobusWorld Tour - STFC)
 
Accessing secured data in cloud computing environment
Accessing secured data in cloud computing environmentAccessing secured data in cloud computing environment
Accessing secured data in cloud computing environment
 
Database Security
Database SecurityDatabase Security
Database Security
 
Secure file sharing of dynamic audit services in cloud storage
Secure file sharing of dynamic audit services in cloud storageSecure file sharing of dynamic audit services in cloud storage
Secure file sharing of dynamic audit services in cloud storage
 
Database security issues
Database security issuesDatabase security issues
Database security issues
 
Maintaining Data Integrity for Shared Data in Cloud
Maintaining Data Integrity for Shared Data in Cloud Maintaining Data Integrity for Shared Data in Cloud
Maintaining Data Integrity for Shared Data in Cloud
 
Application Hosting
Application HostingApplication Hosting
Application Hosting
 
Shared authority based privacy preserving authentication protocol in cloud co...
Shared authority based privacy preserving authentication protocol in cloud co...Shared authority based privacy preserving authentication protocol in cloud co...
Shared authority based privacy preserving authentication protocol in cloud co...
 
Shared authority based privacy preserving authentication protocol in cloud co...
Shared authority based privacy preserving authentication protocol in cloud co...Shared authority based privacy preserving authentication protocol in cloud co...
Shared authority based privacy preserving authentication protocol in cloud co...
 
Web Services: Encapsulation, Reusability, and Simplicity
Web Services: Encapsulation, Reusability, and SimplicityWeb Services: Encapsulation, Reusability, and Simplicity
Web Services: Encapsulation, Reusability, and Simplicity
 
Shared authority based privacy preserving authentication protocol in cloud co...
Shared authority based privacy preserving authentication protocol in cloud co...Shared authority based privacy preserving authentication protocol in cloud co...
Shared authority based privacy preserving authentication protocol in cloud co...
 
CLOUD BASED ACCESS CONTROL MODEL FOR SELECTIVE ENCRYPTION OF DOCUMENTS WITH T...
CLOUD BASED ACCESS CONTROL MODEL FOR SELECTIVE ENCRYPTION OF DOCUMENTS WITH T...CLOUD BASED ACCESS CONTROL MODEL FOR SELECTIVE ENCRYPTION OF DOCUMENTS WITH T...
CLOUD BASED ACCESS CONTROL MODEL FOR SELECTIVE ENCRYPTION OF DOCUMENTS WITH T...
 
Ensuring distributed accountability
Ensuring distributed accountabilityEnsuring distributed accountability
Ensuring distributed accountability
 

Similar to Lucene solrrev documentlevelsecurity_rajanimaski_final

Least privilege, access control, operating system security
Least privilege, access control, operating system securityLeast privilege, access control, operating system security
Least privilege, access control, operating system securityG Prachi
 
Presentation security measure
Presentation security measurePresentation security measure
Presentation security measuremukarram522
 
FAST PHRASE SEARCH FOR ENCRYPTED CLOUD STORAGE.pptx
FAST PHRASE SEARCH FOR ENCRYPTED CLOUD STORAGE.pptxFAST PHRASE SEARCH FOR ENCRYPTED CLOUD STORAGE.pptx
FAST PHRASE SEARCH FOR ENCRYPTED CLOUD STORAGE.pptxgattamanenitejeswar
 
Documentum content server
Documentum content serverDocumentum content server
Documentum content serverSanjay Singh
 
Database managementsystemes_Unit-7.pptxe
Database managementsystemes_Unit-7.pptxeDatabase managementsystemes_Unit-7.pptxe
Database managementsystemes_Unit-7.pptxechnrketan
 
Library Management System
Library Management SystemLibrary Management System
Library Management SystemMartins Okoi
 
Software engineering lecture 1
Software engineering  lecture 1Software engineering  lecture 1
Software engineering lecture 1JusperKato
 
Secure File Sharing on Cloud
Secure File Sharing on CloudSecure File Sharing on Cloud
Secure File Sharing on CloudSupriya .
 
Database management system lecture notes
Database management system lecture notesDatabase management system lecture notes
Database management system lecture notesUTSAHSINGH2
 
documentation for identity based secure distrbuted data storage schemes
documentation for identity based secure distrbuted data storage schemesdocumentation for identity based secure distrbuted data storage schemes
documentation for identity based secure distrbuted data storage schemesSahithi Naraparaju
 
Protection Domain and Access Matrix Model -Operating System
Protection Domain and Access Matrix Model -Operating SystemProtection Domain and Access Matrix Model -Operating System
Protection Domain and Access Matrix Model -Operating SystemLalfakawmaKh
 
information security(authentication application, Authentication and Access Co...
information security(authentication application, Authentication and Access Co...information security(authentication application, Authentication and Access Co...
information security(authentication application, Authentication and Access Co...Zara Nawaz
 
Authentication Authorization-Lesson-2-Slides.ppt
Authentication Authorization-Lesson-2-Slides.pptAuthentication Authorization-Lesson-2-Slides.ppt
Authentication Authorization-Lesson-2-Slides.pptMuhammadAbdullah311866
 
Concepts for Object Oriented Databases.ppt
Concepts for Object Oriented Databases.pptConcepts for Object Oriented Databases.ppt
Concepts for Object Oriented Databases.pptnafsigenet
 

Similar to Lucene solrrev documentlevelsecurity_rajanimaski_final (20)

Chapter 7
Chapter 7Chapter 7
Chapter 7
 
Least privilege, access control, operating system security
Least privilege, access control, operating system securityLeast privilege, access control, operating system security
Least privilege, access control, operating system security
 
Presentation security measure
Presentation security measurePresentation security measure
Presentation security measure
 
Protection
ProtectionProtection
Protection
 
FAST PHRASE SEARCH FOR ENCRYPTED CLOUD STORAGE.pptx
FAST PHRASE SEARCH FOR ENCRYPTED CLOUD STORAGE.pptxFAST PHRASE SEARCH FOR ENCRYPTED CLOUD STORAGE.pptx
FAST PHRASE SEARCH FOR ENCRYPTED CLOUD STORAGE.pptx
 
Documentum content server
Documentum content serverDocumentum content server
Documentum content server
 
Cache Security- The Basics
Cache Security- The BasicsCache Security- The Basics
Cache Security- The Basics
 
Database managementsystemes_Unit-7.pptxe
Database managementsystemes_Unit-7.pptxeDatabase managementsystemes_Unit-7.pptxe
Database managementsystemes_Unit-7.pptxe
 
Library Management System
Library Management SystemLibrary Management System
Library Management System
 
Software engineering lecture 1
Software engineering  lecture 1Software engineering  lecture 1
Software engineering lecture 1
 
MCSA 70-412 Chapter 03
MCSA 70-412 Chapter 03MCSA 70-412 Chapter 03
MCSA 70-412 Chapter 03
 
Secure File Sharing on Cloud
Secure File Sharing on CloudSecure File Sharing on Cloud
Secure File Sharing on Cloud
 
Database management system lecture notes
Database management system lecture notesDatabase management system lecture notes
Database management system lecture notes
 
documentation for identity based secure distrbuted data storage schemes
documentation for identity based secure distrbuted data storage schemesdocumentation for identity based secure distrbuted data storage schemes
documentation for identity based secure distrbuted data storage schemes
 
Protection Domain and Access Matrix Model -Operating System
Protection Domain and Access Matrix Model -Operating SystemProtection Domain and Access Matrix Model -Operating System
Protection Domain and Access Matrix Model -Operating System
 
information security(authentication application, Authentication and Access Co...
information security(authentication application, Authentication and Access Co...information security(authentication application, Authentication and Access Co...
information security(authentication application, Authentication and Access Co...
 
Oracle Identity Manager Basics
Oracle Identity Manager BasicsOracle Identity Manager Basics
Oracle Identity Manager Basics
 
Authentication Authorization-Lesson-2-Slides.ppt
Authentication Authorization-Lesson-2-Slides.pptAuthentication Authorization-Lesson-2-Slides.ppt
Authentication Authorization-Lesson-2-Slides.ppt
 
Concepts for Object Oriented Databases.ppt
Concepts for Object Oriented Databases.pptConcepts for Object Oriented Databases.ppt
Concepts for Object Oriented Databases.ppt
 
4_5949547032388570388.ppt
4_5949547032388570388.ppt4_5949547032388570388.ppt
4_5949547032388570388.ppt
 

Recently uploaded

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Lucene solrrev documentlevelsecurity_rajanimaski_final

  • 1. DOCUMENT LEVEL SECURITY IN SEARCH BASED APPLICATIONS Rajani Maski - Senior Software Engineer
  • 2. Agenda      Introduction to Search Based Applications Requirement Analysis of Document Level Security Access Control Lists Multiple Solutions Summary
  • 3. Search Based Applications  Search Based Applications are software application in which Search Engine platform is used as the core infrastructure for information accessing and reporting.  E-commerce web applications or content management systems are the types of search based application.
  • 4. Overview of Search Based System User Authentication System Search Based Application Server Unified Data Layer Archives Documents Emails File Server Authentication • User is authenticated before providing access to the application Application • Presents with full fledge User Interface • Perform user operations such as upload documents, send emails, search, etc. Unified Data Layer • Search Server • Indexes content across the sources • Retrieves data at very high speed. Data Storage • Volume of data sources from different repositories.
  • 5. So Far, So Good! What’s the problem?
  • 6. Common Access To Unified data Layer User Authentication System Search Based Application How is this a threat? Unified Data Layer Archives Documents Emails File Servers
  • 7. Consider a Sample Use Case User A : - Logs in to application. - Performs a search operation - With the key words such as ‘Pay Slips’, ‘Personal’ or ‘appraisal’. Sample results demonstrated for “appraisal”
  • 9. Observations Relevant Search Results : [Correct] - User A was returned with relevant search results based on his search query; such as exact matches, more like this key words, synonym key words, etc. Unauthorized Search results: [Wrong] - Few of the search results retrieved were the documents to which he was not authorized to view. How are we doing with this? Threats: • Exposure to other users’ confidential documents • Access to Unauthorized information.
  • 10. Problem Definition • To develop a search platform where every user has access to only those documents to which he/she is authorized to. • To ensure that all the confidential data uploaded is not globally searchable unless it is intended to be globally accessible. How can we achieve this?
  • 11. Solution Maintaining Access Control List mapped to each document object. Access Control List?
  • 12. Access Control List • Access Controls are Security features that control how users [subject] and documents[object] communicate and interact with one another. • Subject: An active entity[User] that requests access to an object[Document]. • Object: A passive entity[Document] that contains information Interaction Subject Document Object
  • 13. Data Model Let’s first understand the data model of search engine. Alec_1167 ,_id:”1167”, Name:”Ale C”, Agent:”Miller” Place:”NY, NJ, CA”, Units:570} NY 2 NJ 1167 1167 Alec Miller 1 1167 How are documents stored in search engine? Document Oriented Approach. 1167 3 CA 570 3424 Kiwi reds 340 5612 Reh Mo’s 664
  • 14. Indexing and Storing Document Object • • • • User A uploads a document into the system Text Extraction Convert it to a flat structure Input it to Search Engine Document Text Extract Search Engine Document Saved
  • 15. • We missed to capture something! • What did we miss? – Capturing of User information for each document! • Who uploaded the document • To whom did the user share with? Document • Text Extract Search Engine How do we maintain this information? – Access control list to each document object. Document Saved
  • 16. Conventional Solution • Access Control Lists for each user. • At the time of search, – Retrieve search results, – And perform a check on each document for user’s authorization and – Finally return the results. Search Engine Security Filter Each Document Return Results to User
  • 18. Access Control Models Solutions are dependent on the Access Control Models we choose. Two important types of Access Control Models: 1. 2. Non-Discretionary Access Control(Role Based) Discretionary Access Control (DAC)
  • 19. 1. Non-Discretionary (Role Based) Sales Definition: • Non-Discretionary ACL uses a administered set of rules to determine how Users and Documents interact. Sales Documents Marketing Documents Manager Engineering Documents • It is referred to as nondiscretionary because assigning a user to a role is unavoidable Admin Documents Super User
  • 20. Solution For Role Based ACL - Type 1 System that has, • Roles defined during design time and Static ACL set to each document . • We choose, “Early Binding with ACL bound to Document Objects” In such systems, • Document objects will include a multi-valued Roleid field that will contain list of role-Ids which has access to the document. Index Time Document 1 role-Ids: *“1”, “2”, “3”+ Document 1 role-Ids: *“1”, “2”, “3”+ Document 2 “role-Ids:” * “2”, “3”+ Documents with ACLs
  • 21. Continued… At the time of search, • User Search Query should be appended with user’s Role Id. • Solr’s Filter Query feature and it’s caching techniques gives the most efficient solution for such ACL Techniques. This approach is called as ‘Early Binding’ approach. Query Request Early Binding User Role-Id Solr J Client Query Response
  • 22. Solution For Role Based ACL - Type 2 Systems that has, • Roles which often change; data is normalized by segregating access control information into different tables. • Document1 D1 This approach is called as ‘Early Binding with Externalized ACL’ • • • In such systems: Role-Ids are not attached to the document object. Instead they are stored into different tables with foreign key relation. Use Pseudo Joins at the time of Search Doc ID Role-Ids D1 1, 2, 3, N
  • 23. 2. Discretionary Access Control Definition: • Discretionary – Document owner has the authority to control access of the document. • A system that enables the document owner to specify set of Users with access to a set of documents Owner Specifies Users/groups who can Access Object
  • 24. Solution for Discretionary ACL - Type 1 System that has • Frequent changes in ACL • ACL is defined for each user and a document, • We choose ‘Late Binding Approach with Externalized ACL’ Users Doc1 Doc2 Doc N User A 1 1 1 User B 0 1 1 User M In such systems, • ACL is a 2D-matrix with users and documents along its rows and columns Encode Values – 0 :No access, 1 : Access N : Number of Users, M – Number of Documents
  • 25. Continued… For implementation, the ACL matrix can be represented as a array of bits. Users Doc1 Doc2 Doc N UserA 1 1 1 UserB 1 1 0 [1] 111 [2] 011 This compact representation improves search efficiency and memory over head.
  • 26. Example Consider, • • • • Maximum documents in the Search systems is 5 with document ids:{1,2, 3, 4, 5} Maximum Users are 2 { Id : 1,2 } User 1 has access to document {1, 2, 3} 1 1 1 0 0 User 2 has access to Document {1,2,3,4,5} 1 1 1 1 1 • ACL matrix and array representation: User 1 2 3 4 5 1 1 1 1 0 0 2 1 1 1 1 1 [1] 11100 [2] 11111
  • 27. Solr Implementation Solution 1 • Solr has a Post Filter Interface that can be extended to develop a Custom Plugin. • Interface has a method called ‘collect()’ • Collect() has a list of documents matched to the user’s search query. – Iterate through the list, get the document-Id from the Field Cache and apply ACL using bit array . 1 1 1 0 0 • Code Snippets: https://gist.github.com/rajanim/7197154
  • 28. Other Implementation Solution Solution 2 • Using BitSet utilities • Get the bitset of documents matched by the search query from Search Engine • Get the User ACL bitset instance • Obtain the intersection of the two bitsets [intersect(bitset other)] 1 1 1 0 0 1 1 1 1 1 0 0 1 0 0
  • 29. Solution for Discretionary ACL - Type 2 • • Discretionary ACL systems have static ACL We choose, “Early Binding with ACL bound to Document Objects” In such systems, • Document objects will include a multi-valued user-id field that contains a list of user-ids with access to the document. • The user-id field has to be indexed.
  • 30. Continued… • This solution requires the ACL and document data to be de-normalized to flat structure. Index Time Parse Document Search Time Query Request With User ID Add List of Users Who has access Solr J Client Query Response
  • 32. Summary • Discretionary ACL with late binding solution is a complex model and it requires extensive verification • Leverage Solr’s smart caching capability • Since ACL always adds an additional over head it has to be optimized to provide minimum delay.
  • 33. References: • • • • • • searchhub.org/2012/02/22/custom-security-filtering-in-solr/ Secure Search in Enterprise Webs: Tradeoffs in Efficient Implementation for Document Level Security By Peter Bailey, David Hawking, Brett Matson All in One Book (Shon Harris, 2005) http://www.searchtechnologies.com/enterprise-search-document-levelsecurity.html http://alvinalexander.com/java/jwarehouse/lucene/src/test/org/apache/lucene /search/TestFilteredQuery.java.shtml https://github.com/Zvents/score_stats_component/blob/master/src/main/java/ com/zvents/solr/components/ScoreStatsPostFilter.java

Editor's Notes

  1. By maintaining ACL mapped to each document object. ACL are mapping between user space to document space. Mapping indicates the list of document user has access to. Ok let’s define ACL’
  2. This is a role based type of model. In such models, every user is assigned to administered set of role. ACL are developed based on the role user is assigned to.It is called as non-discretionary type because in such systems, user has to be unavoidably assigned to a role. There is no option of user existing without a role.So users and documents interact with each other based on role-ids. If the user uploads a document, his role-id is also captured with the document so that while searching this document is accessible by only those users who belong to that role.
  3. Each row can be rep as stream of bits and entire matrix can be represented at array of such bits