Developing a Read-Only Provider

25-36 Oracle Fusion Middleware Application Security Guide These steps are required to set up the sample provider: 1. Implement the User and Role APIs to access the database repository serving as the identity store. This involves: a. Building the sample provider. Run ant help for instructions. b. Creating the identity store schema in the database. 2. Configure the sample provider as the identity store, as shown in Section 25.10.7.3, Configure jps-config.xml to use the Sample Identity Provider . 3. Set up Weblogic Authenticator to use this provider as SQLAuthenticator, as explained in Section 25.10.7.4, Configure Oracle WebLogic Server .

25.10.7.3 Configure jps-config.xml to use the Sample Identity Provider

Configure jps-config.xml as follows to enable the sample identity provider to be used as the identity store:

1. Add a new provider in the service providers list:

serviceProviders ............ serviceProvider type=IDENTITY_STORE name=custom.provider class=oracle.security.jps.internal.idstore.generic.GenericIdentityStoreProvide r descriptionCustom IdStore Providerdescription serviceProvider serviceProviders

2. Add the service instance:

serviceInstances ........ serviceInstance name=idstore.custom provider=custom.provider location=dumb descriptionCustom Identity Store Service Instancedescription property name=idstore.type value=CUSTOM property name=ADF_IM_FACTORY_CLASS value=custom_provider_identityStoreFactoryClassName property name=DB_SERVER_NAME value=db_server_name property name=DB_SERVER_PORT value=db_port property name=DB_DATABASE_NAME value=db_service_name property name=ST_SECURITY_PRINCIPAL value=user_name property name=ST_SECURITY_CREDENTIALS value=password serviceInstance ........ serviceInstances Note: The sample provider is intended solely for demonstration purposes, and it is not advisable to use this provider in production without exhaustive testing. Note: custom_provider_identityStoreFactoryClassName for the sample provider is org.sample.providers.db.DBIdentityStoreFactory Developing with the User and Role API 25-37 3. Ensure that the default jpsContext points to the identity store service instance added in Step 2 above: jpsContext name=default serviceInstanceRef ref=credstore serviceInstanceRef ref=keystore serviceInstanceRef ref=policystore.xml serviceInstanceRef ref=audit serviceInstanceRef ref=idstore.custom jpsContext 4. Add the path of the custom provider jar to the classpath. 5. Restart the server.

25.10.7.4 Configure Oracle WebLogic Server

The final task is to configure Oracle WebLogic Server to use SQLAuthenticator. The steps are as follows:

1. Log in to the Oracle WebLogic Server console. Select Security Realms, then

myrealm , then Providers. Click New to add a new provider. 2. Enter a name for the provider and select SQLAuthenticator as the authenticator type.

3. On the Providers page, click on the newly created authenticator.

4. Set the Control Flag to SUFFICIENT. Click Save.

5. Set the control flag to sufficient for all authenticators in the list. 6. Click on the Provider Specific tab to enter the details for the authenticator server. Enter the DataSource name that was used to create the schema for the provider. Click Save. 7. Return to the Providers tab and reorder the providers so that SQLAuthenticator is at the top of the list. 25-38 Oracle Fusion Middleware Application Security Guide The User and Role SPI Reference This section contains the User and Role SPI reference Javadoc, describing each abstract class in the SPI with package name oracle.security.idm.spi. The classes are: ■ oracle.security.idm.spi.AbstractUserProfile ■ oracle.security.idm.spi.AbstractUserManager ■ oracle.security.idm.spi.AbstractUser ■ oracle.security.idm.spi.AbstractSubjectParser ■ oracle.security.idm.spi.AbstractStoreConfiguration ■ oracle.security.idm.spi. AbstractSimpleSearchFilter ■ oracle.security.idm.spi.AbstractSearchResponse ■ oracle.security.idm.spi.AbstractRoleProfile ■ oracle.security.idm.spi.AbstractRoleManager ■ oracle.security.idm.spi.AbstractRole ■ oracle.security.idm.spi.AbstractIdentityStoreFactory ■ oracle.security.idm.spi.AbstractIdentityStore ■ oracle.security.idm.spi.AbstractComplexSearchFilter Developing with the User and Role API 25-39 oracle.security.idm.spi.AbstractUserProfile This class represents a detailed user profile and enables you to set or obtain attributes of the user profile. Constructors public AbstractUserProfile Methods public void setPasswordchar[] oldPasswd, char[] newPasswd public byte[] getUserCertificate public void setUserCertificatebyte[] cert public java.lang.String getEmployeeNumber public void setEmployeeNumberString employeeNumber public java.lang.String getBusinessPostalAddr public void setBusinessPostalAddrString addr public java.lang.String getBusinessPOBox public void setBusinessPOBoxString pobox public byte[] getJPEGPhoto public void setJPEGPhotoString imgpath public java.lang.String getTimeZone public void setTimeZoneString zone public java.lang.String getDescription public void setDescriptionString desc public java.lang.String getDepartmentNumber public void setDepartmentNumberString departmentnumber public java.lang.String getGivenName public void setGivenNameString givenname public java.lang.String getBusinessEmail public void setBusinessEmailString email public java.lang.String getBusinessPager public void setBusinessPagerString pager public java.lang.String getOrganization public void setOrganizationString org public void setNameString name public java.lang.String getBusinessCity public void setBusinessCityString city public java.lang.String getMaidenName public void setMaidenNameString maidenname public java.lang.String getDepartment public void setDepartmentString dept public java.lang.String getBusinessFax public void setBusinessFaxString fax public java.lang.String getUserName public void setUserNameString uname public java.lang.String getBusinessMobile public void setBusinessMobileString mobile public java.lang.String getDateofHire public void setDateofHireString hiredate public java.lang.String getTitle public void setTitleString title public java.lang.String getNameSuffix public void setNameSuffixString suffix public java.lang.String getMiddleName public void setMiddleNameString middlename public java.lang.String getHomePhone 25-40 Oracle Fusion Middleware Application Security Guide public void setHomePhoneString homephone public void setDisplayNameString dispname public java.lang.String getEmployeeType public void setEmployeeTypeString emptype public java.lang.String getLastName public void setLastNameString lastname public java.lang.String getDateofBirth public void setDateofBirthString dob public java.lang.String getManager public void setManagerString manager public java.lang.String getBusinessState public void setBusinessStateString state public java.lang.String getHomeAddress public void setHomeAddressString homeaddr public java.lang.String getBusinessStreet public void setBusinessStreetString street public java.lang.String getBusinessPostalCode public void setBusinessPostalCodeString postalcode public java.lang.String getInitials public void setInitialsString initials public java.lang.String getUserID public void setUserIDString userid public java.lang.String getFirstName public void setFirstNameString firstname public java.lang.String getDefaultGroup public void setDefaultGroupString defgroup public java.lang.String getOrganiztionalUnit public void setOrganizationalUnitString ouUnit public java.lang.String getWirelessAcctNumber public void setWirelessAcctNumberString wirelessacct public java.lang.String getBusinessPhone public void setBusinessPhoneString phone public java.lang.String getBusinessCountry public void setBusinessCountryString country public java.lang.String getPreferredLanguage public void setPreferredLanguageString language public java.lang.String getUIAccessMode public void setUIAccessModeString accessMode public java.lang.Object getPropertyValString prop public oracle.security.idm.SearchResponse getReporteesboolean direct public java.util.List getManagementChainint max, String upToManagerName, String upToTitle public oracle.security.idm.PropertySet getAllUserProperties Developing with the User and Role API 25-41 oracle.security.idm.spi.AbstractUserManager This class represents a user manager and includes basic authentication methods. Constructors public AbstractUserManager Methods public oracle.security.idm.User authenticateUser String user_id, String authProperty, char[] passwd public oracle.security.idm.User authenticateUser User user, char[] passwd