Configuring the Provider when Creating a Store Instance

25-20 Oracle Fusion Middleware Application Security Guide UserManager um = oidStore.getUserManager; RoleManager rm = oidStore.getRoleManager; Topics in this section include: ■ Handling Special Characters when Creating Identities ■ Creating an Identity ■ Modifying an Identity ■ Deleting an Identity

25.6.1 Handling Special Characters when Creating Identities

RFC-2253 defines the string representation of Distinguished Names for LDAP v3. This means that all the characters specified in the RFC are handled. The User and Role API user does not need to escapede-escape those special characters; attempting to do so will cause erroneous results. There could be a problem when creating identities with empty properties. In this case, the RDN name is used to fill in the values of various mandatory attributes. Some of these attributes could have stricter validation rules. In this case, the creation of the identity fails and an exception is raised.

25.6.2 Creating an Identity

Two functions in the UserManager class facilitate creating a user: createUserjava.lang.String name, char[] password creates a user with the specified name and password in the underlying repository. When the identity store designates that some attributes are mandatory, all such fields will be populated with the name value. createUserjava.lang.String name, char[] password, PropertySet suppliedProps Properties are set using the supplied property values. If any mandatory attribute values are not supplied, the missing attributes will use the name value as the default. Likewise, RoleManager APIs are used to create roles. Roles are organized into two categories: ■ application scope ■ enterprise scope When you invoke RoleManager to create a role, by default the role is created in the enterprise scope unless you specify otherwise. RoleManager APIs supporting role creation are: createRoleString roleName; createRoleString roleName, int roleScope; The procedure for creating a role is similar to that for creating a user, and all mandatory attributes must be supplied with roleName.