openbmc / bmcweb

A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Apache License 2.0
148 stars 130 forks source link

Redfish SessionService/Sessions POST returns empty string for Role #280

Closed edtanous closed 2 weeks ago

edtanous commented 3 weeks ago

Is this the right place to submit this?

Bug Description

When POSTing to SessionCollection, Role is being returned empty:

❯ curl --insecure -H "Content-Type: application/json" -X POST -D headers.txt https://192.168.7.2/redfish/v1/SessionService/Sessions -d    '{"UserName":"root", "Password":"0penBmc"}'
{
  ......
  "Roles": [
    ""
  ],
}%

Subsequent requests to the newly created URI produce the Role correctly.

Version

BMCWEB commit ce22f6099e7e28ae26591348bf484ebedbc1ed42 appears to have added this regression.

https://gerrit.openbmc.org/c/openbmc/bmcweb/+/71771

Additional Information

No response

gtmills commented 3 weeks ago

BMCWEB commit ce22f6099e7e28ae26591348bf484ebedbc1ed42 appears to have added this regression.

ce22f60 (https://gerrit.openbmc.org/c/openbmc/bmcweb/+/71771/2//COMMIT_MSG) added roles, but it sounds like it only worked in some situations?

gtmills commented 3 weeks ago

https://gerrit.openbmc.org/c/openbmc/bmcweb/+/72421 is the fix