public class IdmCredentialManager extends Object implements CredentialManager
IdmCredentialManager supports user creation, user deletion, setting users' passwords, and listing users. However, any of these capabilities may be selectively disabled through service configuration properties.
IdmCredentialManager supports TokenCredential, CleartextCredential authentication.
IdmCredentialManager identifies users in User Repository by their User ID. The User ID is retrieved by UserRole API UserProfile.getUserID(), and stored in the DirectoryUser Name attribute.
IFS_SERVICE_CREDENTIALMANAGER_CLASSNAME, IFS_SERVICE_CREDENTIALMANAGER_DEFAULTREALM, IFS_SERVICE_CREDENTIALMANAGER_REALM_LIST, OPTION_LISTUSERS_CREDENTIALMANAGERNAME, OPTION_LISTUSERS_RETURNCMUSERS, OPTION_LISTUSERS_RETURNDISTINGUISHEDNAMES, OPTION_LISTUSERS_RETURNUSERIDS, OPTION_LISTUSERS_SUBSCRIBERNAME
Constructor and Description |
---|
IdmCredentialManager(String name,
S_LibraryService service)
Constructs an IdmCredentialManager.
|
Modifier and Type | Method and Description |
---|---|
void |
authenticate(String distinguishedName,
Credential credential,
ConnectOptions options)
Authenticates the specified user using the specified credential.
|
oracle.security.idm.IdentityStore |
createIdentityStore()
Create an IdentityStore instance
|
protected static oracle.security.idm.IdentityStore |
createIdentityStore(Hashtable env)
Create an IdentityStore instance
|
String |
createUser(String name,
String password,
AttributeValue[] options)
Creates a new user.
|
void |
deleteUser(String distinguishedName,
AttributeValue[] options)
Deletes the specified user.
|
void |
dispose()
Disposes this IdmCredentialManager.
|
boolean |
exists(String distinguishedName)
Determines whether this IdmCredentialManager can authenticate the
specified user.
|
IdmCredentialManagerUtilities |
getIdmCredentialManagerUtilities()
Returns IdmCredentialManagerUtilities instance
|
protected static Hashtable |
getOptionsHashtable(AttributeValue[] avs)
Converts an AttributeValue[] to a Hashtable of AttributeValues.
|
AttributeValue |
getProperty(String name)
Gets the value of the specified dynamic property for this
IdmCredentialManager.
|
Vector |
listUsers(AttributeValue[] options)
Gets the users managed by this IdmCredentialManager.
|
void |
setPassword(String distinguishedName,
String password,
AttributeValue[] options)
Sets the password of the specified user.
|
boolean |
supportsCreateUser()
Determines whether this IdmCredentialManager supports the
createUser method. |
boolean |
supportsDeleteUser()
Determines whether this IdmCredentialManager supports the
deleteUser method. |
boolean |
supportsListUsers()
Determines whether this IdmCredentialManager supports the
listUsers method. |
boolean |
supportsSetPassword()
Determines whether this IdmCredentialManager supports the
setPassword method. |
public static final String OPTION_LISTUSERS_USERIDFILTER
This option applies to listUsers and must have a String value.
The value of this option specifies a filter to apply to user Id. Use "*" to indicate zero or more characters in that position. Special characters "(", ")", and "\" are handled internally and thus escaping is not required. If null or unspecified, no Id filter is applied to the users.
public static final String OPTION_LISTUSERS_USERDISTINGUISHEDNAMEFILTER
This option applies to listUsers and must have a String value.
The value of this option specifies a filter to apply to user Id. Use "*" to indicate zero or more characters in that position. Special characters "(", ")", and "\" are handled internally and thus escaping is not required. If null or unspecified, no Id filter is applied to the users.
public static final String OPTION_LISTUSERS_MAILFILTER
This option applies to listUsers and must have a String value.
The value of this option specifies a filter to apply to user Id. Use "*" to indicate zero or more characters in that position. Special characters "(", ")", and "\" are handled internally and thus escaping is not required. If null or unspecified, no Id filter is applied to the users.
public static final String OPTION_LISTUSERS_LASTNAMEFILTER
This option applies to listUsers and must have a String value.
The value of this option specifies a filter to apply to user Id. Use "*" to indicate zero or more characters in that position. Special characters "(", ")", and "\" are handled internally and thus escaping is not required. If null or unspecified, no Id filter is applied to the users.
public static final String OPTION_LISTUSERS_FIRSTNAMEFILTER
This option applies to listUsers and must have a String value.
The value of this option specifies a filter to apply to user Id. Use "*" to indicate zero or more characters in that position. Special characters "(", ")", and "\" are handled internally and thus escaping is not required. If null or unspecified, no Id filter is applied to the users.
public static final String OPTION_LISTUSERS_MAXIMUMTIME
public static final String OPTION_LISTUSERS_MAXIMUMCOUNT
public static final String SECURITY_PROVIDER_TYPE_FILE_BASED
public static final String SECURITY_PROVIDER_TYPE_OID
public static final String SECURITY_PROVIDER_TYPE_THIRD_PARTY_LDAP
public static final String LDAP_DIRECTORY_VENDOR_ACTIVE_DIRECTORY
public static final String LDAP_DIRECTORY_VENDOR_IPLANET
public static final String LDAP_DIRECTORY_VENDOR_OPENLDAP
public static final String LDAP_DIRECTORY_VENDOR_EDIRECTORY
public static final String LDAP_DIRECTORY_VENDOR_OTHER
public static final String LDAP_SSL_KEY_STORE
public static final String LDAP_SSL_KEY_PASSWORD
public static final String LDAP_PRINCIPAL
public static final String LDAP_CREDENTIAL
public IdmCredentialManager(String name, S_LibraryService service) throws IfsException
name
- the name of this IdmCredentialManagerservice
- the S_LibraryService to which this
IdmCredentialManager belongsIfsException
- (IFS-10150) if the operation failspublic IdmCredentialManagerUtilities getIdmCredentialManagerUtilities() throws IfsException
IfsException
- (IFS-10150) if the operation failspublic void authenticate(String distinguishedName, Credential credential, ConnectOptions options) throws IfsException
Only TokenCredential and CleartextCredential are supported.
authenticate
in interface CredentialManager
distinguishedName
- the distinguished name of the usercredential
- the credentialoptions
- the ConnectOptions supplied by the user; can
be nullIfsException
- public boolean exists(String distinguishedName) throws IfsException
exists
in interface CredentialManager
distinguishedName
- the distinguished name of the userIfsException
- if the operation failspublic boolean supportsCreateUser() throws IfsException
createUser
method.supportsCreateUser
in interface CredentialManager
createUser
is supportedIfsException
- if the operation failspublic String createUser(String name, String password, AttributeValue[] options) throws IfsException
createUser
in interface CredentialManager
name
- the name of the userpassword
- the password of the useroptions
- unused; may be nullIfsException
- (IFS-10154) if the operation failspublic boolean supportsDeleteUser() throws IfsException
deleteUser
method.supportsDeleteUser
in interface CredentialManager
deleteUser
is supportedIfsException
- (IFS-10155) if the operation failspublic void deleteUser(String distinguishedName, AttributeValue[] options) throws IfsException
deleteUser
in interface CredentialManager
distinguishedName
- the distinguished name of the useroptions
- unused; may be nullIfsException
- (IFS-10156) if the operation failspublic boolean supportsSetPassword() throws IfsException
setPassword
method.supportsSetPassword
in interface CredentialManager
setPassword
is supportedIfsException
- (IFS-10157) if the operation failspublic void setPassword(String distinguishedName, String password, AttributeValue[] options) throws IfsException
This method supports the following options:
OPTION_SETPASSWORD_IFSPASSWORD
: if true, the CM SDK-specific
password is set; if false, null, or unspecified, the SSO password is set
setPassword
in interface CredentialManager
distinguishedName
- the distinguished name of the userpassword
- the new passwordoptions
- see method description; may be nullIfsException
- (IFS-10158) if the operation failspublic boolean supportsListUsers() throws IfsException
listUsers
method.supportsListUsers
in interface CredentialManager
listUsers
is supportedIfsException
- (IFS-10159) if the operation failspublic Vector listUsers(AttributeValue[] options) throws IfsException
This method supports the following options:
OPTION_LISTUSERS_USERIDFILTER
: a filter to apply to
userids; use "*" to indicate any zero or more characters in that
position; special characters "*", "(", ")", and "\" must be escaped
in accordance with RFC 2254; if null or unspecified, no userid
filter is applied to the subscriber's users
OPTION_LISTUSERS_USERDISTINGUISHEDNAMEFILTER
: a filter
to apply to user GUIDs; use "*" to indicate any zero or more characters
in that position; special characters "*", "(", ")", and "\" must be escaped
in accordance with RFC 2254; if null or unspecified, no user GUID
filter is applied to the subscriber's users
OPTION_LISTUSERS_MAILFILTER
: a filter to apply to the
user's eMail address; use "*" to indicate any zero or more characters
in that position; special characters "*", "(", ")", and "\" must be
escaped in accordance with RFC 2254; if null or unspecified, no
email address filter is applied to the subscriber's users
OPTION_LISTUSERS_LASTNAMEFILTER
: a filter to apply to
the user's lastname; use "*" to indicate any zero or more characters
in that position; special characters "*", "(", ")", and "\" must be
escaped in accordance with RFC 2254; if null or unspecified, no
lastname filter is applied to the subscriber's users
OPTION_LISTUSERS_FIRSTNAMEFILTER
: a filter to apply to the
user's firstname; use "*" to indicate any zero or more characters
in that position; special characters "*", "(", ")", and "\" must be
escaped in accordance with RFC 2254; if null or unspecified, no
firstname filter is applied to the subscriber's users
OPTION_LISTUSERS_MAXIMUMTIME
: the maximum time to
wait, in milliseconds; if 0, null, or unspecified, the operation
waits indefinitely
OPTION_LISTUSERS_MAXIMUMCOUNT
: the maximum number of
users to return; if 0, null, or unspecified, no limit is applied
OPTION_LISTUSERS_RETURNUSERIDS
: if true, userids are
returned.
OPTION_LISTUSERS_RETURNGUIDS
: if true, GUIDs are
returned; this is the default otpion for returned values.
OPTION_LISTUSERS_RETURNCMUSERS
: if true, the
CredentialManagerUser objects are returned.
listUsers
in interface CredentialManager
options
- see method description; may be nullIfsException
- if the operation failspublic AttributeValue getProperty(String name) throws IfsException
getProperty
in interface CredentialManager
name
- the property nameIfsException
- (IFS-10163) if the operation failspublic void dispose() throws IfsException
dispose
in interface CredentialManager
IfsException
- (IFS-10161) if the operation failsprotected static Hashtable getOptionsHashtable(AttributeValue[] avs) throws IfsException
avs
- the array of AttributeValuesIfsException
- if the operation failspublic oracle.security.idm.IdentityStore createIdentityStore() throws IfsException
IfsException
- if the operation failsprotected static oracle.security.idm.IdentityStore createIdentityStore(Hashtable env) throws IfsException
env
- the property environmentIfsException
- if the operation failsCopyright © 2023. All rights reserved.