Software Links
Getting Started
- A Globus Primer
- Globus Is Modular!
- Quickstart
- Installing GT
- Platform Notes
- GT Developer's Guide
- GT User's Guide
- Migrating Guides
Reference
Manuals
Common Runtime
Security
- GSI C
- GSI Java
- Java WS A&A
- C WS A&A (coming soon)
- CAS
- Delegation Service
- MyProxy
- GSI-OpenSSH
- SimpleCA
Data Mgt
WS MDS
Execution Mgt
Table of Contents
CAS has two sets of tests, one for the back end database access module and another set to test the service itself. To install both tests, install the CAS test package (gt4-cas-delegation-test-$version;-src_bundle.tar.gz) using GPT. FILLME: instructions into GLOBUS_LOCATION.
Assumptions:
- A back end database has been set up and configured. By default Derby is set up and configured.
- The CAS service and tests are installed in $GLOBUS_LOCATION.
The sample commands assume:
- The container is started up on localhost and port 8443.
- The default Derby database configuration is used, i.e database name is casDatabase and user is casAdmin
Run:
cd $GLOBUS_LOCATION
Populate the file
etc/globus_cas_unit_test/casTestPropertieswith the database configuration information shown in the following table.Table 1. Test database properties
dbDriver The JDBC driver to be used dbConnectionURL The JDBC connection url to be used to connect to the database dbUsername The user name to use when connecting to the database dbPassword The password corresponding to the user name If default Derby configuration is required,
Uncomment the lines in
etc/globus_cas_unit_test/casTestPropertiesfollowing the comment # Uncomment below for Derby Embedded Driver..Edit dbConnectionURL to replace GLOBUS_LOCATION with path to your installation. For example, if your GLOBUS_LOCATION is /temp/globus, then the property should look like dbConnectionURL=jdbc:derby:/temp/globus/var/casDatabase
Comment out all other occurances of these properties
The database needs to be empty for these tests to work and will be deleted by this target. Run:
set GLOBUS_LOCATION=C:\globus ant -f share/globus_cas_unit_test/cas-test-build.xml testDatabase- Test reports are placed in
$GLOBUS_LOCATION/share/globus_cas_unit_test/cas-test-reports.
![]() | Important |
|---|---|
The database bootstrap needs to be done again for the server to be ready to receive client requests. |
These tests can be set up so as to be able to test multiple user scenarios or they can be configured to run as just a single identity. The first set of tests are used to test admin functionality and set up the database for a second user. As the second user the permissions and queries are tested to ensure that the setup worked.
As with the previous any database backend can be used for testing. If the default Derby database is used, it needs to be configured in network mode since these tests require that both the tested CAS server and the tests use the database. Two files need to be modified for configuring these tests and they are described below.
The
etc/globus_cas_unit_test/casTestPropertiesneeds to be configured with appropriate database information and service information.The database information is configured similar to previous test, but for the default Derby installation, the network driver needs to be used.
Uncomment the lines in
etc/globus_cas_unit_test/casTestPropertiesfollowing the comment # Uncomment below for Derby Network Driver..Edit dbConnectionURL to replace GLOBUS_LOCATION with path to your installation. For example, if your GLOBUS_LOCATION is /temp/globus, then the property should look like dbConnectionURL=jdbc:derby:/temp/globus/var/casDatabase
Comment out all other occurances of these properties.
Now edit the server specific information as shown below:
Table 2. Test properties
user1SubjectDN The DN of the user running the first set of tests. user2SubjectDN The DN of the user running the second set of tests. This DN has to be different from the value specified for user1SubjectDN. Note: Both tests can be run as the same user as long as the DN of the certificate being used to run the tests matches the value specified in user1SubjectDN. In this case, the value of user2SubjectDN can be set to a arbitrary string. maxAssertionLifetime Should match the value set in the service configuration as shown in Configuration Information. host Host on which the CAS service is running. port Port on which the CAS service is running. securityType This is an optional parameter indicating the security type to use. Can be set to messagefor Secure Message orconversationfor Secure Conversation ortransportfor Secure Transport (the default configuration).protType This is an optional parameter indicating the protection type to use. Can be set to signaturefor integrity protection (the default configuration) orencryptionfor privacy protection.Edit The
etc/globus_cas_unit_test/jndi-config.xmlto replace GLOBUS_LOCATION with the actual Globus Location of your install.
Steps for testing:
Run:
cd $GLOBUS_LOCATION
Source
$GLOBUS_LOCATION/etc/globus-devel-env.shor$GLOBUS_LOCATION/etc/globus-devel-env.cshor$GLOBUS_LOCATION/etc/globus-devel-env.batas appropriate for your environment.In the test properties file, set
user2SubjectDNto the subject in your regular proxy. The following returns the appropriate string:casadmin$ java org.globus.tools.CertInfo -subject -globus
Generate an independent proxy using the following command:
casadmin$ java org.globus.tools.ProxyInit -independent
Set the identity in the proxy generated from the above step as user1SubjectDN in the test properties file. The following command will return the relevant string:
casadmin$ java org.globus.tools.ProxyInfo -subject -globus
- Start the container on the port and host configured in CAS Test Properties.
The following command runs the tests for self permissions and sets up the database for a user with subjectDN user2SubjectDN:
casadmin$ ant -f share/globus_cas_unit_test/cas-test-build.xml user1TestService
To test as the second user, generate a proxy for the subject DN specified for the second user:
casadmin$ java org.globus.tools.ProxyInit
Now run the following:
casadmin$ ant -f share/globus_cas_unit_test/cas-test-build.xml user2TestService
- Test reports are placed in
$GLOBUS_LOCATION/share/globus_cas_unit_test/cas-test-reports. After these tests, the CAS database needs to be reset and all entries need to be deleted.
ant -f share/globus_cas_unit_test/cas-test-build.xml testDatabase
![]() | Important |
|---|---|
The database bootstrap needs to be done again for the server to be ready to receive client requests. |
![[Important]](/docbook-images/important.gif)