version 1.83, 2008/04/29 20:40:25
|
version 1.84, 2008/05/12 09:14:57
|
|
|
// Process M-POST and POST messages: | // Process M-POST and POST messages: |
// | // |
| |
PEG_LOGGER_TRACE(( |
PEG_TRACE_CSTRING( |
Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
TRC_HTTP, |
"HTTPAuthenticatorDelegator - HTTP processing start")); |
Tracer::LEVEL3, |
|
"HTTPAuthenticatorDelegator - HTTP processing start"); |
| |
| |
httpMessage->parse(startLine, headers, contentLength); | httpMessage->parse(startLine, headers, contentLength); |
|
|
return; | return; |
} | } |
| |
PEG_LOGGER_TRACE(( |
PEG_TRACE_CSTRING( |
Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
TRC_AUTHENTICATION, |
"HTTPAuthenticatorDelegator - Authentication processing start")); |
Tracer::LEVEL2, |
|
"HTTPAuthenticatorDelegator - Authentication processing start"); |
| |
// | // |
// Handle authentication: | // Handle authentication: |
|
|
} | } |
else | else |
{ | { |
Logger::put( |
PEG_TRACE_CSTRING( |
Logger::ERROR_LOG, |
TRC_HTTP, |
System::CIMSERVER, |
Tracer::LEVEL3, |
Logger::TRACE, |
|
"HTTPAuthenticatorDelegator - Bailing, no " | "HTTPAuthenticatorDelegator - Bailing, no " |
"username is registered to this " | "username is registered to this " |
"certificate."); | "certificate."); |
|
|
} | } |
else | else |
{ | { |
Logger::put( |
// TBD-7646 |
Logger::ERROR_LOG, |
PEG_TRACE_CSTRING( |
System::CIMSERVER, |
TRC_HTTP, |
Logger::TRACE, |
Tracer::LEVEL2, |
"HTTPAuthenticatorDelegator - Bailing, " | "HTTPAuthenticatorDelegator - Bailing, " |
"the certificate used for " | "the certificate used for " |
"authentication is not valid."); | "authentication is not valid."); |
|
|
MessageLoaderParms msgParms( | MessageLoaderParms msgParms( |
"Pegasus.Server.HTTPAuthenticatorDelegator." | "Pegasus.Server.HTTPAuthenticatorDelegator." |
"BAD_CERTIFICATE", | "BAD_CERTIFICATE", |
|
|
// on the server was deleted openssl would not pick | // on the server was deleted openssl would not pick |
// up the deletion but we would pick it up here | // up the deletion but we would pick it up here |
// when we went to look it up in the repository | // when we went to look it up in the repository |
Logger::put( |
|
Logger::ERROR_LOG, |
// TBD-7646 |
System::CIMSERVER, |
PEG_TRACE_CSTRING( |
Logger::TRACE, |
TRC_HTTP, |
|
Tracer::LEVEL2, |
"HTTPAuthenticatorDelegator - Bailing, the " | "HTTPAuthenticatorDelegator - Bailing, the " |
"certificate used for authentication is " | "certificate used for authentication is " |
"not valid."); | "not valid."); |
|
|
| |
httpMessage->authInfo->setAuthenticatedUser(certUserName); | httpMessage->authInfo->setAuthenticatedUser(certUserName); |
| |
PEG_TRACE_STRING( |
PEG_TRACE(( |
TRC_HTTP, | TRC_HTTP, |
Tracer::LEVEL3, |
Tracer::LEVEL2, |
"User name for certificate is " + certUserName); |
|
Logger::put( |
|
Logger::STANDARD_LOG, |
|
System::CIMSERVER, |
|
Logger::TRACE, |
|
"HTTPAuthenticatorDelegator - The trusted client " | "HTTPAuthenticatorDelegator - The trusted client " |
"certificate is registered to $0.", |
"certificate is registered to %s.", |
certUserName); |
(const char*) certUserName.getCString())); |
} // end AuthenticationInfoRep::AUTH_TYPE_SSL | } // end AuthenticationInfoRep::AUTH_TYPE_SSL |
| |
#ifdef PEGASUS_OS_ZOS | #ifdef PEGASUS_OS_ZOS |
|
|
| |
} //end enableAuthentication | } //end enableAuthentication |
| |
PEG_LOGGER_TRACE(( |
PEG_TRACE_CSTRING( |
Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
TRC_AUTHENTICATION, |
"HTTPAuthenticatorDelegator - Authentication processing ended")); |
Tracer::LEVEL2, |
|
"HTTPAuthenticatorDelegator - Authentication processing ended"); |
| |
| |
#ifdef PEGASUS_KERBEROS_AUTHENTICATION | #ifdef PEGASUS_KERBEROS_AUTHENTICATION |
|
|
if (HTTPMessage::lookupHeader( | if (HTTPMessage::lookupHeader( |
headers, _HTTP_HEADER_CIMOPERATION, cimOperation, true)) | headers, _HTTP_HEADER_CIMOPERATION, cimOperation, true)) |
{ | { |
PEG_LOGGER_TRACE( |
PEG_TRACE(( |
(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
TRC_HTTP, |
"HTTPAuthenticatorDelegator - CIMOperation: $0 ", |
Tracer::LEVEL3, |
cimOperation)); |
"HTTPAuthenticatorDelegator - CIMOperation: %s ", |
|
(const char*) cimOperation.getCString())); |
| |
MessageQueue* queue = | MessageQueue* queue = |
MessageQueue::lookup(_cimOperationMessageQueueId); | MessageQueue::lookup(_cimOperationMessageQueueId); |
|
|
else if (HTTPMessage::lookupHeader( | else if (HTTPMessage::lookupHeader( |
headers, _HTTP_HEADER_CIMEXPORT, cimOperation, true)) | headers, _HTTP_HEADER_CIMEXPORT, cimOperation, true)) |
{ | { |
Logger::put( |
PEG_TRACE(( |
Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
TRC_AUTHENTICATION, |
"HTTPAuthenticatorDelegator - CIMExport: $0 ",cimOperation); |
Tracer::LEVEL3, |
|
"HTTPAuthenticatorDelegator - CIMExport: %s ", |
|
(const char*) cimOperation.getCString())); |
| |
MessageQueue* queue = | MessageQueue* queue = |
MessageQueue::lookup(_cimExportMessageQueueId); | MessageQueue::lookup(_cimExportMessageQueueId); |