To use the login dialog with OracleAS JAAS Provider and the embedded OC4J server, the following configurations are required before running the JClient form.
Note: If you prefer not to use OracleAS JAAS Provider, you can modify the generated login dialog to work with a JDBC connection.
To configure an ADF Business Components client to use SSO authentication:
jbo.security.enforce.
Must to enable full authentication.
To enable the login provider for JClient forms:
<jdev_install
>/jdk/jre/lib/security/java.security in your editor and
insert this ADF Business Components security configuration definition:
login.configuration.provider=oracle.security.jazn.spi.LoginConfigProvider
Otherwise an error message will get displayed when using the logon dialog. The BC4J Security library contains the JAR files required to use JAAS within the project.
To run in OC4J:
Make sure that at least one data control exists for the login form (for example, based on an ADF Business Components project) by dragging and dropping a component from the Data Control Palette onto the form or a panel.
When creating an application with an empty JClient form, no data control is created by default. The ADF data control provides the data binding context for the application.
Navigate to the <jdev_install>/j2ee/home
directory and open a command prompt window.
Type the following command to start OC4J:
java -jar oc4j.jar
If this doesn't start OC4J, then the java command may
not be in the path. Add the bin directory of your JRE
installation to the system path if this happens. The OC4J container
must be started to allow the JAZN provider to serve as the logon
module.
User accounts are stored in the jazn-data.xml file located
in the <jdev_install>/j2ee/home/config
directory. One of the default names in here is SCOTT/TIGER (note,
uppercase). To test your logon dialog, use the default names.
The jazn-data.xml file encrypts the password the first time
OC4J gets started after an account is added. To make sure a password is
encrypted, add an '!' in front of the password. For
example, to encrypt the password WELCOME, define it as
!WELCOME.
To further work with the username/credential pair for your users, use the following code in your application:
Hashtable h =
panelBinding.getBindingContext().getDefaultDataControl().
getApplicationModule().getSession().getEnvironment();
String username = h.get(JboContext.SECURITY_PRINCIPAL);
String
credential = h.get(JboContext.SECURITY_CREDENTIALS);
About the JClient Login Dialog
Modifying the JClient Login Dialog for JDBC
Copyright © 1997, 2004, Oracle. All rights reserved.