opencomputeproject / HWMgmt-DeviceMgr-DeviceManager

Device Manager collects device data and notifications from each device, and make the data available on a predetermined output bus for consumers.
Apache License 2.0
23 stars 12 forks source link

Missing BasicAuth in API requests #8

Closed ehaligow closed 2 years ago

ehaligow commented 2 years ago

Requests send from DeviceMgr have no basicAuthCredentials provided, which gives UNAUTHORIZED error.

"method" : "POST", 
  "body" : "{\"Password\":\"admin\",\"UserName\":\"admin\"}", 
  "url" : "/redfish/v1/SessionService/Sessions/", 
  "headers" : { 
    "User-Agent" : "Go-http-client/1.1", 
    "Connection" : "close", 
    "Host" : "192.168.40.204:8888", 
    "Accept-Encoding" : "gzip", 
    "Content-Length" : "39" 
  }, 
  "queryParams" : { }, 
  "queryString" : null, 
  "basicAuthCredentials" : null, 
  "json" : { 
    "Password" : "admin", 
    "UserName" : "admin" 
  }, 
  "expandLevels" : 1, 
  "expandType" : "NONE" 
}, response: { 
  "code" : "UNAUTHORIZED", 
  "body" : "", 
  "headers" : { 
    "WWW-Authenticate" : [ "Basic realm=\"BMC Simulator\"" ] 
  }, 
  "location" : null, 
  "json" : { } 
} 
JasonscHuang commented 2 years ago

Now, it does not support HTTP Basic-Authetication. You could use the HTTP Token-Based to perform your test.

jcleung5549 commented 2 years ago

Jason, how was the fix added? It should have been done via a pull request.

taskin-ucpinar commented 2 years ago

Edgecore will fix this by early next week.

ehaligow commented 2 years ago

The issue is resolved.