public class FilesRepo extends IdRepo
java.io.File
classes. The directory structure is organized as
follows: The root directory is specified by the instance configuration
parameter "sunFilesIdRepoDirectory"
. If not specified, it
defaults to "/var/opt/SUNWam/idm/flatfiles"
.
Under the root directory are sub-directories for each identity type (i.e.,
users, roles, agents, etc). In these sub-directories an identity is stored
as a properties file.Modifier and Type | Field and Description |
---|---|
static Debug |
debug |
static String |
DIRECTORY |
static String |
ENCRYPT |
static String |
HASH |
static String |
NAME |
static String |
OBJECTCLASS |
static String |
OC |
static String |
PASSWORD |
static String |
STATUS |
static String |
UPDATE_CACHE |
static String |
UPDATE_CACHE_TIME |
Constructor and Description |
---|
FilesRepo() |
Modifier and Type | Method and Description |
---|---|
int |
addListener(SSOToken token,
IdRepoListener listener)
Adds a listener for changes in the repository
|
void |
assignService(SSOToken token,
IdType type,
String name,
String serviceName,
SchemaType stype,
Map attrMap)
This method is used to assign a service to the given identity.
|
boolean |
authenticate(Callback[] credentials)
Returns
true if the data store successfully authenticates
the identity with the provided credentials. |
static void |
clearCache() |
String |
create(SSOToken token,
IdType type,
String name,
Map attrMap)
Creates an identity.
|
void |
delete(SSOToken token,
IdType type,
String name)
Deletes an identity.
|
Set |
getAssignedServices(SSOToken token,
IdType type,
String name,
Map mapOfServicesAndOCs)
Returns the set of services assigned to this identity.
|
Map |
getAttributes(SSOToken token,
IdType type,
String name)
Returns all attributes and values of name object
|
Map |
getAttributes(SSOToken token,
IdType type,
String name,
Set attrNames)
Returns requested attributes and values of name object.
|
Map |
getBinaryAttributes(SSOToken token,
IdType type,
String name,
Set attrNames)
Returns requested binary attributes as an array of bytes.
|
Map |
getBinaryServiceAttributes(SSOToken token,
IdType type,
String name,
String serviceName,
Set attrNames)
Returns the requested binary attribute values of the service attributes
as an array of bytes.
|
String |
getFullyQualifiedName(SSOToken token,
IdType type,
String name)
Returns the fully qualified name for the identity.
|
Set |
getMembers(SSOToken token,
IdType type,
String name,
IdType membersType)
Returns the memberships of an identity.
|
Set |
getMemberships(SSOToken token,
IdType type,
String name,
IdType membershipType)
Returns the memberships of an identity.
|
Map |
getServiceAttributes(SSOToken token,
IdType type,
String name,
String serviceName,
Set attrNames)
Returns the attribute values of the service attributes.
|
Set |
getSupportedOperations(IdType type)
Return supported operations for a given IdType
|
Set |
getSupportedTypes() |
void |
initialize(Map configParams)
Initialization paramters as configred for a given plugin.
|
boolean |
isActive(SSOToken token,
IdType type,
String name)
Returns true if the
name object is active. |
boolean |
isExists(SSOToken token,
IdType type,
String name)
Returns true if the
name object exists in the data store. |
void |
modifyMemberShip(SSOToken token,
IdType type,
String name,
Set members,
IdType membersType,
int operation)
Modify membership of the identity.
|
void |
modifyService(SSOToken token,
IdType type,
String name,
String serviceName,
SchemaType sType,
Map attrMap)
Modifies the attribute values of the service attributes.
|
void |
removeAttributes(SSOToken token,
IdType type,
String name,
Set attrNames)
Removes the attributes from the identity.
|
void |
removeListener()
Removes the listener added using
addListener method. |
RepoSearchResults |
search(SSOToken token,
IdType type,
CrestQuery crestQuery,
int maxTime,
int maxResults,
Set returnAttrs,
boolean returnAllAttrs,
int filterOp,
Map avPairs,
boolean recursive)
Search for specific type of identities using a CrestQuery object instead of a string.
|
RepoSearchResults |
search(SSOToken token,
IdType type,
String pattern,
int maxTime,
int maxResults,
Set returnAttrs,
boolean returnAllAttrs,
int filterOp,
Map avPairs,
boolean recursive) |
RepoSearchResults |
search(SSOToken token,
IdType type,
String pattern,
Map avPairs,
boolean recursive,
int maxResults,
int maxTime,
Set returnAttrs) |
void |
setActiveStatus(SSOToken token,
IdType type,
String name,
boolean active)
Sets the object's status to
active . |
void |
setAttributes(SSOToken token,
IdType type,
String name,
Map attributes,
boolean isAdd)
Set the values of attributes of the identity.
|
void |
setBinaryAttributes(SSOToken token,
IdType type,
String name,
Map attributes,
boolean isAdd)
Set the values of binary attributes the identity.
|
boolean |
supportsAuthentication()
Returns
true if the data store supports authentication of
identities. |
void |
unassignService(SSOToken token,
IdType type,
String name,
String serviceName,
Map attrMap)
If the service is already assigned to the identity then
this method unassigns the service and removes the related
attributes from the entry.
|
changePassword, getConfiguration, shutdown
public static final String NAME
public static final Debug debug
public static final String DIRECTORY
public static final String OBJECTCLASS
public static final String PASSWORD
public static final String STATUS
public static final String HASH
public static final String ENCRYPT
public static final String UPDATE_CACHE
public static final String UPDATE_CACHE_TIME
public static final String OC
public void initialize(Map configParams) throws IdRepoException
IdRepo
initialize
in class IdRepo
IdRepoException
public int addListener(SSOToken token, IdRepoListener listener) throws IdRepoException, SSOException
IdRepo
addListener
in class IdRepo
token
- Single sign on token of identity performing the task.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void assignService(SSOToken token, IdType type, String name, String serviceName, SchemaType stype, Map attrMap) throws IdRepoException, SSOException
IdRepo
assignService
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- service to assignattrMap
- Map of attribute-values.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public String create(SSOToken token, IdType type, String name, Map attrMap) throws IdRepoException, SSOException
IdRepo
create
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attrMap
- Map of attribute-values assoicated with this object.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void delete(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
IdRepo
delete
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Set getAssignedServices(SSOToken token, IdType type, String name, Map mapOfServicesAndOCs) throws IdRepoException, SSOException
IdRepo
getAssignedServices
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.name
IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Map getAttributes(SSOToken token, IdType type, String name, Set attrNames) throws IdRepoException, SSOException
IdRepo
getAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attrNames
- Set of attribute names to be readIdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Map getAttributes(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
IdRepo
getAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Map getBinaryAttributes(SSOToken token, IdType type, String name, Set attrNames) throws IdRepoException, SSOException
IdRepo
getBinaryAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attrNames
- Set of attribute names to be readIdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void setBinaryAttributes(SSOToken token, IdType type, String name, Map attributes, boolean isAdd) throws IdRepoException, SSOException
IdRepo
setBinaryAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attributes
- Map of binary attribute-values to set or add.isAdd
- if true
add the attribute-values; otherwise
replaces the attribute-values.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Set getMembers(SSOToken token, IdType type, String name, IdType membersType) throws IdRepoException, SSOException
IdRepo
getMembers
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.membersType
- IdType of members of name object.name
IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Set getMemberships(SSOToken token, IdType type, String name, IdType membershipType) throws IdRepoException, SSOException
IdRepo
getMemberships
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.membershipType
- IdType of memberships to return.name
is a member of.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Map getServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames) throws IdRepoException, SSOException
IdRepo
getServiceAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- Name of service.attrNames
- Set of attribute names.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Map getBinaryServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames) throws IdRepoException, SSOException
IdRepo
getBinaryServiceAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- Name of service.attrNames
- Set of attribute names.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public boolean isExists(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
IdRepo
name
object exists in the data store.isExists
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.true
if name object is in data store
else false
IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void modifyMemberShip(SSOToken token, IdType type, String name, Set members, IdType membersType, int operation) throws IdRepoException, SSOException
IdRepo
modifyMemberShip
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.members
- Set of names to be added as members of namemembersType
- IdType of members.operation
- operations to perform on members ADDMEMBER or REMOVEMEMBER.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void modifyService(SSOToken token, IdType type, String name, String serviceName, SchemaType sType, Map attrMap) throws IdRepoException, SSOException
IdRepo
modifyService
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- Name of service.attrMap
- map of attribute-values.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void removeAttributes(SSOToken token, IdType type, String name, Set attrNames) throws IdRepoException, SSOException
IdRepo
removeAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attrNames
- Set of attribute names to remove.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void removeListener()
IdRepo
addListener
method. This
is called by the IdRepo framework when the plugin is being shutdown due
to configuration change, so that a new instance can be created with the
new configuration map.removeListener
in class IdRepo
public RepoSearchResults search(SSOToken token, IdType type, CrestQuery crestQuery, int maxTime, int maxResults, Set returnAttrs, boolean returnAllAttrs, int filterOp, Map avPairs, boolean recursive) throws IdRepoException, SSOException
IdRepo
search
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.crestQuery
- pattern to search for, of type CrestQuery
.maxTime
- maximum wait time for search.maxResults
- maximum records to return.returnAttrs
- Set of attribute names to return.returnAllAttrs
- return all attributesfilterOp
- filter condition.avPairs
- additional search conditions.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public RepoSearchResults search(SSOToken token, IdType type, String pattern, int maxTime, int maxResults, Set returnAttrs, boolean returnAllAttrs, int filterOp, Map avPairs, boolean recursive) throws IdRepoException, SSOException
IdRepoException
SSOException
public RepoSearchResults search(SSOToken token, IdType type, String pattern, Map avPairs, boolean recursive, int maxResults, int maxTime, Set returnAttrs) throws IdRepoException, SSOException
IdRepoException
SSOException
public void setAttributes(SSOToken token, IdType type, String name, Map attributes, boolean isAdd) throws IdRepoException, SSOException
IdRepo
setAttributes
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attributes
- Map of attribute-values to set or add.isAdd
- if true
add the attribute-values; otherwise
replaces the attribute-values.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void unassignService(SSOToken token, IdType type, String name, String serviceName, Map attrMap) throws IdRepoException, SSOException
IdRepo
unassignService
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- Service name to remove.attrMap
- Map of attribute-values to removeIdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public Set getSupportedOperations(IdType type)
IdRepo
getSupportedOperations
in class IdRepo
type
- Identity typepublic Set getSupportedTypes()
getSupportedTypes
in class IdRepo
public boolean isActive(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
IdRepo
name
object is active.isActive
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.true
if name object is in active
else false
IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public void setActiveStatus(SSOToken token, IdType type, String name, boolean active) throws IdRepoException, SSOException
IdRepo
active
.setActiveStatus
in class IdRepo
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.active
- true if setting to active; false otherwise.IdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public String getFullyQualifiedName(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
IdRepo
getFullyQualifiedName
in class IdRepo
token
- administrator SSOToken that can be used by the datastore to
determine the fully qualified nametype
- type of the identityname
- name of the identityIdRepoException
- If there are repository related error conditions.SSOException
- If identity's single sign on token is invalid.public boolean supportsAuthentication()
IdRepo
true
if the data store supports authentication of
identities. Used by IdRepo framework to authenticate identities.supportsAuthentication
in class IdRepo
true
if data store supports authentication of of
identities; else false
public boolean authenticate(Callback[] credentials) throws IdRepoException, AuthLoginException
IdRepo
true
if the data store successfully authenticates
the identity with the provided credentials. In case the data store
requires additional credentials, the list would be returned via the
IdRepoException
exception.authenticate
in class IdRepo
credentials
- Array of callback objects containing information such as
username and password.true
if data store authenticates the identity;
else false
IdRepoException
AuthLoginException
public static void clearCache()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.