(file) Return to README CVS log (file) (dir) Up to [Pegasus] / pegasus / test / TestProviders / CIMOMSample

File: [Pegasus] / pegasus / test / TestProviders / CIMOMSample / README (download)
Revision: 1.1, Tue Feb 17 14:51:21 2004 UTC (20 years, 4 months ago) by s.soni
Branch: MAIN
CVS Tags: pegasus25BeforeLicenseUpdate, STABLE, SLPPERFINST-root, SLPPERFINST-branch, RELEASE_2_5_0-RC1, RELEASE_2_5_0, RELEASE_2_4_FC_CANDIDATE_1, RELEASE_2_4_3, RELEASE_2_4_2, RELEASE_2_4_1-BETA3, RELEASE_2_4_1-BETA2, RELEASE_2_4_1-BETA1, RELEASE_2_4_1, RELEASE_2_4_0-RC3, RELEASE_2_4_0-RC2, RELEASE_2_4_0, RELEASE_2_4-root, RELEASE_2_4-branch, RELEASE_2_3_2-branch-freeze, PEP244_ServerProfile-root, PEP244_ServerProfile-branch, PEP233_EmbeddedInstSupport-root, PEP217_PRE_BRANCH, PEP217_POST_BRANCH, PEP217_BRANCH, PEP214ROOT, PEP214BRANCH, PEP214-root, PEP214-branch, PEP213_SIZE_OPTIMIZATIONS, PEP-214B-root, PEGASUS_2_5_0_PerformanceDev-string-end, PEGASUS_2_5_0_PerformanceDev-rootlt, PEGASUS_2_5_0_PerformanceDev-root, PEGASUS_2_5_0_PerformanceDev-r2, PEGASUS_2_5_0_PerformanceDev-r1, PEGASUS_2_5_0_PerformanceDev-lit-end, PEGASUS_2_5_0_PerformanceDev-buffer-end, PEGASUS_2_5_0_PerformanceDev-branch, PEGASUS_2_5_0_PerformanceDev-AtomicInt-branch, PEG25_IBM_5_16_05, NPEGASUS_2_5_0_PerformanceDev-String-root, NNPEGASUS_2_5_0_PerformanceDev-String-branch, MONITOR_CONSOLIDATION_2_5_BRANCH, IBM_241_April1405, CQL_2_5_BRANCH, CHUNKTESTDONE_PEP140, BUG_4225_PERFORMANCE_VERSION_1_DONE
Branch point for: PEP233_EmbeddedInstSupport-branch
Test provider for pegasus as defined in PEP#121

This directory contains the source programs implementing the Sample Provider 
for testing the UserIdentity change from inside the provider method.

CIMOMHandle Testcase Sample Provider
------------------------------------

The provider calling the CIMOMHandle sets a UserIdentity into the 
OperationContext. It is possible for a provider to call the CIMOMHandle with a 
user name that is different than the end-user on the client who sent in the 
original request.For example, a provider could set "root" into the 
UserIdentity, effectively promoting itself to root authority when calling the 
CIMOMHandle. Nothing in the current Pegasus design checks the authority of the
caller to CIMOMHandle, so having this testcase now would be to set up for the 
future.

Provider Module Name = CIMOMSampleProviderModule
Provider Class = CIMOMSampleProviderClass

Scripts
-------

1. rebuild

This script performs the following operations:
Cleaning the provider lib., provider compilation, populating the repository,
provider registration, and finally restarting the cimserver.

2. clitests <Auth-Flag>

It runs the CLI command for the following CIM operations without any kind of
namespace authorization: [By Default its NoAuth execution]
enumerateInstances, 
enumerateInstanceNames, 
enumerateClasses, 
enumerateClassNames

If its invoked as: clitests 1	(The arg. 1 is nothing but to tell the script
that I need authentication to be enabled and namespace authorization to be
enbaled)
It runs the CLI command for the following CIM operations, with the different 
combinations of valid and invalid users (specifying user= and password=)
enumerateInstances, 
enumerateInstanceNames, 
enumerateClasses, 
enumerateClassNames

3. cli_select
CLI is run for different users authentication and user specifies CIM operation
to be executed, as an argument to the script.

CIMOMHandle Authentication Test [when Namespace authorization is enabled]
-------------------------------

The following commands were run to check the authentication while running the
CLI test program. There are 2 users who are given the 'read' permission for the
namespace root/SampleProvider by running the following:

cimauth -a subodh -n root/SampleProvider 
cimauth -a guest -n root/SampleProvider

Pre-requisites: 
1. The user for whom authentication is being added should be a valid CIM user 
   [added by running cimuser -a .....]
2. The configuration parameter "enableAuthentication" should be set to TRUE. 
   If we restart cimserver after configuring it for no authentication all the 
   following cases will execute successfully
   [run "cimserver enableAuthentication=true]

The results of running testclient "CLI enumerateinstances" on the CIMOMSample 
Class are:

#1. CLI ni -n root/SampleProvider CIMOMSample

Output: 
CLI Pegasus Exception: Authentication failed.. Cmd = ni Object = CIMOMSample
Reason:
[No user information]

#2. CLI ni -n root/SampleProvider CIMOMSample -u subodh -p soni

Output: 
Entry to CIMOMSampleProvider
 CIMOMSampleProvider::initialize
 CIMOMSampleProvider::enumerateInstanceNames
 className = CIMOMSample
 CIMOMSample.Id=187
Reason: [User name and password valid]

#3. CLI ni -n root/SampleProvider CIMOMSample -u guest -p guest

Output:
 Entry to CIMOMSampleProvider
  CIMOMSampleProvider::initialize
  CIMOMSampleProvider::enumerateInstanceNames
  className = CIMOMSample
  CIMOMSample.Id=187
Reason: [User name and password valid]

#4. CLI ni -n root/SampleProvider CIMOMSample -u guest -p nothing

Output:
CLI Pegasus Exception: Authentication failed.. Cmd = ni Object = CIMOMSample
Reason: [User name is valid but password is wrong]

Miscellaneous
-------------
Logfiles for all the cim operations executed are also generated. The naming
convention of the log files is <CIM Operation abbr>-auth.log (for example 
ni-auth.log).
The file "expected.out" contains the correct results on test being successful.

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2