(file) Return to HTTPAuthenticatorDelegator.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Server

Diff for /pegasus/src/Pegasus/Server/HTTPAuthenticatorDelegator.cpp between version 1.82 and 1.83

version 1.82, 2008/03/11 17:33:17 version 1.83, 2008/04/29 20:40:25
Line 78 
Line 78 
 static const String _CONFIG_PARAM_ENABLEAUTHENTICATION = "enableAuthentication"; static const String _CONFIG_PARAM_ENABLEAUTHENTICATION = "enableAuthentication";
  
 HTTPAuthenticatorDelegator::HTTPAuthenticatorDelegator( HTTPAuthenticatorDelegator::HTTPAuthenticatorDelegator(
     Uint32 operationMessageQueueId,      Uint32 cimOperationMessageQueueId,
     Uint32 exportMessageQueueId,      Uint32 cimExportMessageQueueId,
     CIMRepository* repository)     CIMRepository* repository)
     : Base(PEGASUS_QUEUENAME_HTTPAUTHDELEGATOR, MessageQueue::getNextQueueId()),     : Base(PEGASUS_QUEUENAME_HTTPAUTHDELEGATOR, MessageQueue::getNextQueueId()),
       _operationMessageQueueId(operationMessageQueueId),        _cimOperationMessageQueueId(cimOperationMessageQueueId),
       _exportMessageQueueId(exportMessageQueueId),        _cimExportMessageQueueId(cimExportMessageQueueId),
         _wsmanOperationMessageQueueId(PEG_NOT_FOUND),
       _repository(repository)       _repository(repository)
 { {
     PEG_METHOD_ENTER(TRC_HTTP,     PEG_METHOD_ENTER(TRC_HTTP,
Line 1190 
Line 1191 
         }         }
  
         //         //
         // Search for "CIMOperation" header:          // Determine the type of this request:
         //         //
           //   - A "CIMOperation" header indicates a CIM operation request
           //   - A "CIMExport" header indicates a CIM export request
           //   - A "/wsman" path in the start message indicates a WS-Man request
           //
   
         String cimOperation;         String cimOperation;
  
         if (HTTPMessage::lookupHeader(         if (HTTPMessage::lookupHeader(
Line 1203 
Line 1209 
                  cimOperation));                  cimOperation));
  
             MessageQueue* queue =             MessageQueue* queue =
                 MessageQueue::lookup(_operationMessageQueueId);                  MessageQueue::lookup(_cimOperationMessageQueueId);
  
             if (queue)             if (queue)
             {             {
Line 1237 
Line 1243 
                 "HTTPAuthenticatorDelegator - CIMExport: $0 ",cimOperation);                 "HTTPAuthenticatorDelegator - CIMExport: $0 ",cimOperation);
  
             MessageQueue* queue =             MessageQueue* queue =
                 MessageQueue::lookup(_exportMessageQueueId);                  MessageQueue::lookup(_cimExportMessageQueueId);
  
             if (queue)             if (queue)
             {             {
Line 1247 
Line 1253 
                 deleteMessage = false;                 deleteMessage = false;
             }             }
         }         }
           else if ((_wsmanOperationMessageQueueId != PEG_NOT_FOUND) &&
                    ((requestUri == "/wsman") ||
                     ((requestUri == "/wsman-anon") && !enableAuthentication)))
           {
               // Note: DSP0226 R5.3-1 specifies if /wsman is used,
               // unauthenticated access should not be allowed.  This "should"
               // requirement is not implemented here, because it is difficult
               // for a client to determine whether enableAuthentication=true.
   
               // DSP0226 R5.3-2 specifies if /wsman-anon is used, authenticated
               // access shall not be required.  Unauthenticated access is
               // currently not allowed if enableAuthentication=true.  When
               // support for wsmid:Identify is added, it will be necessary to
               // respond to that request without requiring authentication,
               // regardless of the CIM Server configuration.
   
               MessageQueue* queue =
                   MessageQueue::lookup(_wsmanOperationMessageQueueId);
   
               if (queue)
               {
                   httpMessage->dest = queue->getQueueId();
   
                   try
                   {
                       queue->enqueue(httpMessage);
                   }
                   catch (const bad_alloc&)
                   {
                       delete httpMessage;
                       _sendHttpError(
                          queueId,
                          HTTP_STATUS_REQUEST_TOO_LARGE,
                          String::EMPTY,
                          String::EMPTY,
                          closeConnect);
                       PEG_METHOD_EXIT();
                       deleteMessage = false;
                       return;
                   }
                   deleteMessage = false;
               }
           }
         else         else
         {         {
             // We don't recognize this request message type             // We don't recognize this request message type


Legend:
Removed from v.1.82  
changed lines
  Added in v.1.83

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2