Oracle Fusion Applications Search Java API Reference for Oracle Enterprise Crawl and Search Framework
11g Release 1 (11.1.2)

E21908-02

oracle.ecsf
Interface Securable


public interface Securable

A securable is an interface to be implemented for seucrity plugin to enforce custom security rules on the searchable objects. Each searchable object can be associated with a plugin that might implement this interface.


Field Summary
static java.lang.String RCS_ID
           
static boolean RCS_ID_RECORDED
           
 
Method Summary
 java.lang.String[] getAcl(SearchContext ctx, IndexableDocument indexableDocument)
          This is the mechanism to enforce applications security.
 java.lang.String[] getSecurableParams()
          This method is used to return a list of the names of the configuration parameters used by the security plug-in.
 java.lang.String[] getSecureAttrAcl(SearchContext ctx, IndexableDocument document, java.lang.String attributeName)
          SES implemenation.
 java.lang.String[] getSecureAttrKeys(SearchContext ctx, java.lang.String attributeName)
          SES implemenation.
 java.lang.String[] getSecurityKeys(SearchContext ctx)
          Returns a list of keys owned by the session user, identified by session information passed in through ctx.
 boolean isAclEnabled(SearchContext ctx)
          Tests if this plug-in enables ACL security or not.
 

Field Detail

RCS_ID

static final java.lang.String RCS_ID
See Also:
Constant Field Values

RCS_ID_RECORDED

static final boolean RCS_ID_RECORDED
Method Detail

isAclEnabled

boolean isAclEnabled(SearchContext ctx)
Tests if this plug-in enables ACL security or not. If this returns false,

Parameters:
ctx - runtime context.
Returns:
whether ACL is enabled.
See Also:
and #getSecurityKeys method will not be called.

getAcl

java.lang.String[] getAcl(SearchContext ctx,
                          IndexableDocument indexableDocument)
                          throws SearchSecurityException
This is the mechanism to enforce applications security. This method is called at crawl time to create a locker for each document. A locker is a list of strings returned by this method.

The implementation must create an effective locker for each indexable document that requires access controls. For SES, each string in the list must be either or a combination of the following two:

Parameters:
ctx - crawler's runtime context. It has a properly initialized application context..
indexableDocument - needed to be locked.
Throws:
SearchSecurityException - You must throw a SearchSecurityException if the document does not satisfy your security rules. The exception will result this document not indexed in the index store.

getSecurityKeys

java.lang.String[] getSecurityKeys(SearchContext ctx)
                                   throws SearchSecurityException
Returns a list of keys owned by the session user, identified by session information passed in through ctx.

You must use the defined way to access user object via the context passed by. For more details, @see SearchConext.

If hash function is used in getAcl, the same hash function should be used to form the key.

Parameters:
ctx - runtime context.
Returns:
keys for a given search.
Throws:
SearchSecurityException - if for some reason the context passed to does not satisfy your security rules. This will result a security violation message for UI component to display.

getSecureAttrKeys

java.lang.String[] getSecureAttrKeys(SearchContext ctx,
                                     java.lang.String attributeName)
                                     throws SearchSecurityException
SES implemenation. It works as this:

For a searchable object, one can norminate one or more attributes as security attribute. For these attributes, the framework will call this method to get list of keys to form a security filter and pass to SES.

Parameters:
attributeName - name of the security attribute.
Throws:
SearchSecurityException

getSecureAttrAcl

java.lang.String[] getSecureAttrAcl(SearchContext ctx,
                                    IndexableDocument document,
                                    java.lang.String attributeName)
                                    throws SearchSecurityException
SES implemenation. This method is called when crawling. The crawler calls this method to get specific ACL list for the nominated security attributes.

Throws:
SearchSecurityException

getSecurableParams

java.lang.String[] getSecurableParams()
                                      throws SearchSecurityException
This method is used to return a list of the names of the configuration parameters used by the security plug-in. security attributes.

Throws:
SearchSecurityException

Oracle Fusion Applications Search Java API Reference for Oracle Enterprise Crawl and Search Framework
11g Release 1 (11.1.2)

E21908-02

Copyright © 2011 Oracle. All rights reserved.