java.lang.Object
org.elasticsearch.xpack.core.security.authz.accesscontrol.SecurityIndexReaderWrapper
All Implemented Interfaces:
org.elasticsearch.core.CheckedFunction<org.apache.lucene.index.DirectoryReader,org.apache.lucene.index.DirectoryReader,IOException>

public class SecurityIndexReaderWrapper extends Object implements org.elasticsearch.core.CheckedFunction<org.apache.lucene.index.DirectoryReader,org.apache.lucene.index.DirectoryReader,IOException>
An IndexReader wrapper implementation that is used for field and document level security.

Based on the ThreadContext this class will enable field and/or document level security.

Field level security is enabled by wrapping the original DirectoryReader in a FieldSubsetReader in the apply(DirectoryReader) method.

Document level security is enabled by wrapping the original DirectoryReader in a DocumentSubsetReader instance.