(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.34 and 1.35

version 1.34, 2004/05/18 14:58:07 version 1.35, 2004/05/21 20:57:00
Line 241 
Line 241 
     httpMessage->parse(startLine, headers, contentLength);     httpMessage->parse(startLine, headers, contentLength);
  
     //     //
       // Check if the request was received on the export connection.
       // Do not accept CIMOperation requests on the export connection.
       // Username-password authentication is not done for CIMExport requests
       // received on the export connection. Instead the client is
       // authenticated by client certificate verification.
       //
       if ( httpMessage->authInfo->isExportConnection() )
       {
           //
           // Do not accept CIMOperation requests on the export connection
           //
           String operation;
   
           if ( HTTPMessage::lookupHeader(
                headers, "CIMOperation", operation, true) )
           {
               //
               //  CIMOperation requests are not supported on the export connection
               //
               MessageLoaderParms msgParms(
                   "Pegasus.Server.HTTPAuthenticatorDelegator.CIMOPERATIONS_NOT_SUPPORTED",
                   "CIMOperation request not supported on this port.");
               String msg(MessageLoader::getMessage(msgParms));
   
               PEG_METHOD_EXIT();
               _sendHttpError(queueId,
                          HTTP_STATUS_FORBIDDEN,
                          String::EMPTY,
                          msg);
           }
   
           //
           // Do not require user-password authentication for CIMExport requests
           // received on the export connection. Instead verify that the client
           // is authenticated by client certificate verification.
           //
           if ( HTTPMessage::lookupHeader(
                headers, "CIMExport", operation, true) )
           {
               PEG_TRACE_STRING(TRC_HTTP, Tracer::LEVEL3,
                       "CIMExport request received on export connection");
   
               //
               // Client may have already authenticated by verifying peer
               // certificate (in SSLSocket) during SSL handshake.
               // In this case, no further attempts to authenticate the client are made
               //
               if ( httpMessage->authInfo->isAuthenticated() )
               {
                   PEG_TRACE_STRING(TRC_HTTP, Tracer::LEVEL4,
                       "httpMessage->authInfo->isAuthenticated() is true");
   
                   Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
                       "HTTPAuthenticatorDelegator - CIMExport: $0 ", operation);
   
                   MessageQueue* queue =
                       MessageQueue::lookup(_exportMessageQueueId);
   
                   if (queue)
                   {
                       httpMessage->dest = queue->getQueueId();
                       queue->enqueue(httpMessage);
                       deleteMessage = false;
                   }
               }
               else
               {
                   //
                   // This condition is expected to be handled early on during
                   // peer certificate verification and it should never come here.
                   // We will treat this as a bad request if it does come here.
                   //
                   PEGASUS_ASSERT(0);
                   PEG_METHOD_EXIT();
                   _sendHttpError(queueId, HTTP_STATUS_BADREQUEST);
               }
               PEG_METHOD_EXIT();
               return;
           }
       }
   
       //
     // Handle authentication:     // Handle authentication:
     //     //
     ConfigManager* configManager = ConfigManager::getInstance();     ConfigManager* configManager = ConfigManager::getInstance();


Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2