Skip navigation links

Oracle Secure Enterprise Search Java API Reference
10g Release 1 (10.1.8)

B32260-01


oracle.search.sdk.security
Interface IdentityPlugin


public interface IdentityPlugin

An interface for identity-based security.

See Also:
IdentityPluginManager

Method Summary
 String authenticate(String username, char[] password)
          Authenticates a user and returns the canonical attribute representing the authenticated user.
 void close()
          Called to indicate that this plug-in object will no longer be used.
 String[] getAllGroups(String username)
          Returns the groups or roles for a given user.
 String[] getAttribute(String attrName, String username, String identityAttr)
          Returns the value or values of an attribute for a given user.
 String getAuthenticationAttribute()
          Returns the authentication attribute name, which was configured in the call to IdentityPluginManager.init.
 String[] getGroupAttribute(String attrName, String groupname, String identityAttr)
          Returns the value or values of an attribute for a given group.
 boolean isValidAttribute(String attrName)
          Indicates if the given attribute name is valid.
 String validateGroup(String group, String attrName)
          Indicates if the given group is valid.
 String validateUser(String username, String attrName)
          Indicates if the given user is valid.

 

Method Detail

authenticate

public String authenticate(String username,
                           char[] password)
                    throws PluginException
Authenticates a user and returns the canonical attribute representing the authenticated user. If the authentication fails, this returns null.
Parameters:
username - the username for the search user, passed in as the authentication attribute configured in the call to IdentityPluginManager.init.
password - the password for the search user
Returns:
the canonical attribute representing the user if authentication succeeds, otherwise null
Throws:
PluginException - if an error occurs

getAttribute

public String[] getAttribute(String attrName,
                             String username,
                             String identityAttr)
                      throws PluginException
Returns the value or values of an attribute for a given user.
Parameters:
attrName - the name of the attribute. E.g. AD_NAME
username - the username for the search user
identityAttr - the attribute (format) for the user name
Returns:
the values for the given attribute
Throws:
PluginException - if an error occurs

getGroupAttribute

public String[] getGroupAttribute(String attrName,
                                  String groupname,
                                  String identityAttr)
                           throws PluginException
Returns the value or values of an attribute for a given group.
Parameters:
attrName - the name of the attribute. E.g. AD_NAME
groupname - the group name
identityAttr - the attribute (format) for the group name
Returns:
the values for the given attribute
Throws:
PluginException - if an error occurs

getAllGroups

public String[] getAllGroups(String username)
                      throws PluginException
Returns the groups or roles for a given user. This method is called by the query engine when building the security filters.
Parameters:
username - the username for the search user, passed in as the canonical attribute returned by a call to IdentityPlugin.authenticate.
Returns:
the groups for the given user
Throws:
PluginException - if an error occurs

validateUser

public String validateUser(String username,
                           String attrName)
                    throws PluginException
Indicates if the given user is valid. This method is called by the administration app and crawler to validate an identity string and convert it to the canonical attribute.
Parameters:
username - the username identity string
attrName - the authentication attribute (format)
Returns:
the canonical attribute representing the user if valid, otherwise null
Throws:
PluginException - if an error occurs

validateGroup

public String validateGroup(String group,
                            String attrName)
                     throws PluginException
Indicates if the given group is valid. This method is called by the administration app and crawler to validate an identity string and convert it to the canonical attribute.
Parameters:
group - the group identity string
attrName - the authentication attribute (format)
Returns:
the canonical attribute representing the group if valid, otherwise null
Throws:
PluginException - if an error occurs

isValidAttribute

public boolean isValidAttribute(String attrName)
Indicates if the given attribute name is valid.
Parameters:
attrName - the name of the attribute
Returns:
true if the given attribute is valid, false otherwise

getAuthenticationAttribute

public String getAuthenticationAttribute()
Returns the authentication attribute name, which was configured in the call to IdentityPluginManager.init.
Returns:
the name of the authentication attribute

close

public void close()
Called to indicate that this plug-in object will no longer be used.

Skip navigation links

Oracle Secure Enterprise Search Java API Reference
10g Release 1 (10.1.8)

B32260-01


Copyright © 2006, Oracle. All rights reserved.