![]() |
![]() |
BEA WebLogic Enterprise 4.2 Developer Center |
![]() HOME | SITE MAP | SEARCH | CONTACT | GLOSSARY | PDF FILES | WHAT'S NEW |
||
![]() GETTING STARTED | TABLE OF CONTENTS | PREVIOUS TOPIC | NEXT TOPIC | INDEX |
The chapter discusses the following topics:
Refer to The Security sample application enhances the Basic sample application by adding application-level security to the Weblogic Enterprise (WLE) application. Application-level security requires each student to have an ID and a password. Therefore, the concept of a Student is added to the Security sample application.
The following functionality is added to the Basic sample application:
Readme.txt
in the \security
directory for troubleshooting information and the latest information about using the Security sample application.
How the Security Sample Application Works
Figure 4-1 illustrates how the Security sample application works.
This section describes the development process required when adding security to WLE client and server applications. These steps are in addition to the development steps outlined in Chapter 3, "The Basic Sample Application."
Note:
The steps in this section have been done for you and are included in the Security sample application.
During the development process, you would define the During the development process, you would add the following code to your client application:
Figure 4-1 The Security Sample Application
The Development Process for the Security Sample Application
OMG IDL
StudentDetails
struct and the get_student_details()
operation in Object Management Group (OMG) Interface Definition Language (IDL).
The Client Application
For the Security sample application, this code has already been added for you.For information about adding security to client applications, see Getting Started.
During the development process, you would write the method implementation for the In the WLE software, security levels are defined for the configuration by the system administrator. The system administrator defines the security for the WLE domain by setting the No changes to the Implementation Configuration File (ICF) are required.
Perform the following steps to build the Security sample application:
The Server Application
get_student_details()
operation. For information about writing method implementations, see Creating C++ Server Applications.
The UBBCONFIG File
SECURITY
parameter RESOURSES
section of the UBBCONFIG
file to the desired security level. In the Security sample application, the SECURITY
parameter is set to APP_PW
for application-level security. For information about adding security to a WLE domain, see Administration Guide.
The ICF File
Building the Security Sample Application
The following sections describe these steps.
Note: Before you can build or run the Security sample application, you need to perform the steps in Chapter 2, "Setting Up Your Environment."
The files for the Security sample application are located in the following directories:
Windows NT
drive
:\
WLEdir
\samples\corba\university
\security
UNIX
/usr/
WLEdir
/samples/corba/university
/security
In addition, you need to copy the utils
directory into your work directory. The utils
directory contains files that set up logging, tracing, and access to the University database.
You will use the files listed in Table 4-1 to create the Security sample application.
During the installation of the WLE software, the sample application files are marked read-only. Before you can edit the files or build the files in the Security sample application, you need to change the protection of the files you copied into your work directory, as follows:
Windows NT
prompt>attrib -r drive:\
workdirectory
\*.*
UNIX
prompt>chmod u+rw /
workdirectory
/*.*
Use the following command to set the environment variables used to build the client and server applications in the Security sample applications:
Windows NT
prompt>setenvs
UNIX
prompt>/bin/ksh
prompt>. ./setenvs.sh
Use the following command to initialize the University database used with the Security sample application:
Windows NT
prompt>nmake -f makefiles.nt initdb
UNIX
prompt>make -f makefiles.mk initdb
Use the following command to load the UBBCONFIG
file:
Windows NT
prompt>tmloadcf -y ubb_s.nt
UNIX
prompt>tmloadcf -y ubb_s.mk
The build process for the UBBCONFIG
file prompts you for an application password. This password will be used to log on to the client applications. Enter the password and press Enter. You are then prompted to verify the password by entering it again.
During the development process, you would use the buildobjclient
and buildobjserver
commands to build the client and server applications. However, for the Security sample application, this step has been done for you.
The directory for the Security sample application contains a makefile
that builds the client and server sample applications.
Use the following commands to build the CORBA C++ client and server applications in the Security sample application:
Windows NT
prompt>nmake -f makefiles.nt
UNIX
prompt>make -f makefiles.mk
To build the CORBA Java client application:
Windows NT
prompt>nmake -f makefiles.nt javaclient
UNIX
prompt>make -f makefiles.mk javaclient
For information about starting the ActiveX client application, see "Starting the ActiveX Client Application."
For more information about the buildobjclient
and buildobjserver
commands, see the C++ Programming Reference.
Perform the following steps to run the Security sample application:
These steps are explained in the following sections.
Start the system and sample application server applications in the Security sample application by entering the following command:
prompt>tmboot -y
This command starts the following server processes:
TMSYSEVT
The BEA TUXEDO system event broker.
TMFFNAME
The transaction management services, including the NameManager and the FactoryFinder services.
TMIFSRVR
The Interface Repository server process. This server process is used only by ActiveX client applications.
univs_server
Before using another sample application, enter the following command to stop the system and sample application server processes:
Start the CORBA C++ client application in the Security sample application by performing the following steps:
prompt>tmshutdown
Starting the CORBA C++ Client Application
prompt>univs_client
Enter student id:
prompt, enter any number between 100001 and
100010.
Before you can start the CORBA Java client application, you need to change the values of the Port
and Host
parameters in UnivSApplet.html
to match the host name and port number specified in the ISL
parameter in the UBBCONFIG
file. For example:
<param name=port value=2500>
<param name=host value=BEANIE>
Start the CORBA Java client application in the Security sample application by performing the following steps:
A logon window appears.
prompt>appletviewer UnivSApplet.html
UBBCONFIG
file in the
Domain Password
field.
Note:
For the University sample applications, the task of loading the OMG IDL for the CORBA interfaces into the Interface Repository is automated by the makefile
.
Before you can start the ActiveX client application, you must use the Application Builder to create ActiveX bindings for the CORBA interfaces.
To create an ActiveX binding for a CORBA interface:
The IIOP Listener window appears.
ISL
parameter in the UBBCONFIG
file . You must match exactly
the capitalization used in the UBBCONFIG
file.
The Logon window appears.
UBBCONFIG
file.
The Application Builder window appears. All the CORBA interfaces loaded in the Interface Repository appear in the Services window of the Application Builder.
A confirmation window appears.
The Application Builder creates the following:
DI
modulename_interfacename
. For example, the binding for the Registrar
interface is named DIUniversityS_Registrar
.
\WLEdir\TypeLibraries.
The type library file is named DI
modulename_interfacename
.tlb.
Perform the following steps to run the ActiveX client application:
The IIOP Listener window appears.
ISL
parameter in the UBBCONFIG
file. You must match exactly
the capitalization used in the UBBCONFIG
file.
The Logon window appears.
UBBCONFIG
file.
The following sections briefly explain how to use the client applications in the Security sample application.
The CORBA C++ client application in the Security sample application has the following additional option:
<L> List your registered courses
This option displays the list of courses registered under the student ID that was used to log on to the CORBA C++ client application.
No additional functionality is added to the CORBA Java client application in the Security sample application.
No additional functionality is added to the ActiveX client application in the Security sample application.