Class Index | File Index

Classes


Class Identity

The Identity class is used to manage resource identities, primarily users, within Sentinel. Each user of an enterprise's IT systems should have a set of meta-information available to help identify that user from a security perspective, pursuant to local privacy laws. The Identity object is used to store that information and make some of it available in events, and the rest available through interactive lookups.

The class accepts a pre-defined set of Identity attributes, all of which (except for GUID, which is auto-generated) are optional:

In addition to the above, you may also attach extended attribute information to the identity; this information is stored separately in an ExtendedAttribute area that is not available to the GUI lookup methods, but can be used for reporting.

Further, user accounts which belong to this identity can be attached; see the Account class for further information.
Defined in: identity.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Identity(properties)
Constructs an instance of the Identity class based on passed-in properties.
Method Summary
Method Attributes Method Name and Description
 
attachAccounts(accounts)
Attaches accounts to the Identity.
<static>  
Identity.find(params)
Finds the identity.
 
save()
The save methods saves the identity object synchronously.
<static>  
Identity.saveBatch(identarr, callback)
Save an array of objects in the background, notifying via the callback of any issues.
Class Detail
Identity(properties)
Constructs an instance of the Identity class based on passed-in properties.
Parameters:
{Hash} properties
Initial properties (JSON notation) to define identity
See:
Account
Method Detail
attachAccounts(accounts)
Attaches accounts to the Identity.

Example:

var myIden = new Identity({
			DistinguishedName:"cn=JoeSmith,ou=Active,ou=Users,o=Vault",
			FullName : "Joe Smith",
			FirstName : "Joe",
			LastName : "Smith",
			JobTitle : "QA",
			WorkForceId : "95502",
			OfficeCode : "VVA-100",
			PrimaryPhone : "703-555-1212",
			PrimaryEmail : "joesmith@novell.com"});

Account acc1 = new Account({Name:"JoeSmith",
			Authority:"cn=JoeSmith,ou=Active,ou=Users,o=Vault",
			Status: "A",
			CustomerId : 5})
Account acc2 = new Account({Name:"JohnSmith",
			Authority:"cn=JohnSmith,ou=Active,ou=Users,o=Vault",
			Status: "A"})

myIden.attachAccounts(new Array(acc1,acc2));
myIden.save();
Parameters:
{Account[]} accounts
Array of Account objects

<static> {Identity[]} Identity.find(params)
Finds the identity.

Example:

var myIdens = Identity.find({DistinguishedName: "cn=JoeSmith,ou=Active,ou=Users,o=Vault"});
var myIdens = Identity.find({FullName : "Joe Smith",FirstName : "Joe"});
Parameters:
{JSON} params
JSON notation of the identity attributes to be matched
Throws:
{String}
Throws an string exception describing the error.
Returns:
{Identity[]} Returns an array of Identities found; the array could be of size 0 if no identities are found for the search criteria.

{GUID} save()
The save methods saves the identity object synchronously.

Example:

var myIden = new Identity({
			DistinguishedName:"cn=JoeSmith,ou=Active,ou=Users,o=Vault",
			FullName : "Joe Smith",
			FirstName : "Joe",
			LastName : "Smith",
			JobTitle : "QA",
			WorkForceId : "95502",
			OfficeCode : "VVA-100",
			PrimaryPhone : "703-555-1212",
			PrimaryEmail : "joesmith@novell.com"});
myIden.save();
Throws:
{String}
Throws an string exception describing the error.
Returns:
{GUID} GUID associated with the identity

<static> Identity.saveBatch(identarr, callback)
Save an array of objects in the background, notifying via the callback of any issues.

Example:

var id1 = new Identity({
			DistinguishedName:"cn=JoeSmith,ou=Active,ou=Users,o=Vault",
			FullName : "Joe Smith",
			FirstName : "Joe",
			LastName : "Smith",
			JobTitle : "QA",
			WorkForceId : "95502",
			OfficeCode : "VVA-100",
			PrimaryPhone : "703-555-1212",
			PrimaryEmail : "joesmith@novell.com"});
var id2 = new Identity({
			DistinguishedName:"cn=JohnSmith,ou=Active,ou=Users,o=Vault",
			FullName : "John Smith",
			FirstName : "John",
			LastName : "Smith",
			JobTitle : "Engineer",
			WorkForceId : "95504",
			OfficeCode : "VVA-100",
			PrimaryPhone : "703-555-1213",
			PrimaryEmail : "johnsmith@novell.com"});

var callback = function(idenarr,errmessage) {
	// do something with the original idenarr called with the saveBatch and the errmessage
  // log(idenarr, errmessage)
}
var guids = Identity.saveBatch([id1,id2],callback);
Parameters:
{Identity[]} identarr
Array of Identity objects to save (length of array must be <= 100)
{Callback} callback
Calls this function when an error occur saving the identities asynchronously

©2008
Documentation generated by JsDoc Toolkit 2.0.2 on Thu Oct 07 2010 07:23:17 GMT-0400 (EDT)