Age | Commit message (Collapse) | Author | Files | Lines |
|
Removes all warnings and errors for VirtualMedia
- rework for OemVirtualMedia
- minor adjustments for jsons
Tested:
Redfish Service Validator ran with no errors and/or warnings
Change-Id: Ic027166153a807a8bd3a6c04f042969f16e0dc6a
Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
|
|
Supports offloading a dump to the client
Tested-By:
* curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Managers/bmc/LogServices/
Dump/attachment/<dump-id>
* curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/system/LogServices/
Dump/attachment/<dump-id>
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I99bbb50bc171408273744f89220a46bfe64ba4c4
|
|
Free memory during failed case inside
pamFunctionConversation() function.
Tested:
- Pam authentication works as normal.
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Change-Id: I81c06a3d674b0806c96e5847cda6f208795bd02c
|
|
ActiveSoftwareImage was added to Manager in v1_6_0.
It is a Readwrite property.
This supports only switching the BMC running image.
This assumes the BMC updater is
xyz.openbmc_project.Software.BMC.Updater.
This assumes the switch is Immediate and calls a BMC
reboot after setting the priority to 0.
Patch set 1 had a new Redfish.Settings for the Manager at
/redfish/v1/Managers/bmc/Settings and a new setting,
ActiveSoftwareImageApplyTime.
This was removed due to complexity.
A future commit could add support to allow this Setting to be
exposed and PATCHed.
From https://redfish.dmtf.org/schemas/v1/Manager.v1_9_0.json
"ActiveSoftwareImage": {
...
"description": "The link to the software inventory resource that
represents the active firmware image for this manager.",
"longDescription": "This property shall contain a link to a resource
of type SoftwareInventory that represents the active firmware image for
this manager.",
"readonly": false,
"versionAdded": "v1_6_0"
Tested: Validator passes
curl -k -X PATCH -d \
'{ "Links": { "ActiveSoftwareImage": { "@odata.id":"/redfish/v1/UpdateService/FirmwareInventory/82d3ec86"}}}' \
https://$bmc/redfish/v1/Managers/bmc
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"Message": "Successfully Completed Request",
Change-Id: Id9d29af5332f9e76ec172e1e4351980a6772477c
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
This pulls more information from the dimm interface,
and the persistent memory interface.
Tested: Ran validator, verified interfaces were there
Change-Id: I1083c78d6ab758fb94e4f145c7c5aff3a43b1683
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
Regions come from the new partition interface.
Tested: Validator passed. Saw new properties.
Change-Id: Ifbfddc69187ab1612d759d12165f0c3fdfda5dca
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
When redfish log file(/var/log/redfish) is recreated
by rsyslog daemon, EventService stops sending events
to subscribers.
The rsyslog service take redfish log files to back up
as per design. EventService has inotify on redfish log
file modifications. It needs to be removed from inotify
watcher list and added with new File descriptor.
Corrected code to handle remove & add of new descriptor.
Also corrected code to properly handle last event timestamp.
Tested:
- Ran stress test on redfish log file to create multiple
backup files and events sends to clients properly, in
all switching scenarios.
Change-Id: Ic0378edfc2cae86d1f69f6df4c429d07c2744bdf
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
|
|
The metric reports are not sending when user configures
the MetricReportDefinitions filter. This is of odata json
object type. Corrected code to properly handle odata type
object and store it as string array to make filters faster.
Tested:
- Created metric report EventService subscription type
with MetricReportDefinitions and events properly sent to
Event listener.
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Change-Id: If96564219da7d38a2ee5e415b89824ba25cd686d
|
|
This commit implements the broadcast of the messages from one
connected client to other connected clients via BMC. When the
management console creates a subscription on the BMC, they will
be provided with the broadcast message service.
Tested by: (Used https://github.com/DMTF/Redfish-Event-Listener)
1. Create a subscription
POST -D headers.txt https://${bmc}/redfish/v1/EventService/Subscriptions
-d '{"Destination":"https://<host:port>","Protocol":"Redfish"}'
2. Send the message
POST https://${bmc}/ibm/v1/HMC/BroadcastService -d '{"Message":"<msg>"}'
3. Verify the event is generated and posted to the subscriber:
bodydata: {"Message":"<The message from HMC to be forwarded>",
"Name":"Broadcast Event","OriginOfCondition":
"/ibm/v1/HMC/BroadcastService",
"Timestamp":"2020-07-15T12:03:30+00:00"}
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: Ib36b4f25505cf66251adc5aeda282312996c25af
|
|
The commit implements the sending of push style events to the IBM's management client
when a configFile is updated.
Tested-By:
1. Create a subscription by passing "ResourceTypes" as ["IBMConfigFile"]
POST -D headers.txt https://${bmc}/redfish/v1/EventService/Subscriptions
-d '{"Destination" : "https://<host:port>,"ResourceTypes":["IBMConfigFile"],"Protocol":"Redfish"}'
2. Update an existing ConfigFile
PUT https://${bmc}/ibm/v1/Host/ConfigFiles/<filename> --data-binary "@<local_path>"
3. Verify the event is generated and posted to the subscriber as the following example:
bodydata: {
"@odata.type":"#Event.v1_4_0.Event",
"Events":[
{
"EventId":1,
"EventTimestamp":"2020-06-26T08:40:04+00:00",
"EventType":"ResourceChanged",
"MemberId":0,
"Message" :"One or more resource properties have changed.",
"MessageArgs":null,
"MessageId":"ResourceEvent.1.0.3.ResourceChanged",
"OriginOfCondition":"/ibm/v1/Host/ConfigFiles/<filename>",
"MessageSeverity":"OK"
}
],
"Id":1,
"Name":"Event Log"
}
4. Verified the event is sent to the subscriber when the resourceType list is empty.
5. Verified the client subscribes for other resource - not ConfigFile ; then
the event is not sent to the subscriber.
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I785c2a5a6e4e721cf722e94693db3a832f69fa50
|
|
QueryString is an error-prone library that was
leftover from crow. Replace it with boost::url,
a header only library based and written by the
one of the authors of boost beast.
Tested: Verified logging paging still worked
as expected
Change-Id: I47c225089aa7d0f7d2299142f91806294f879381
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
This commit contains changes that replaces the error messages
in the response's body with the appropriate one.
This change was made based on the comment in the following commit:
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/32033/35/
redfish-core/lib/log_services.hpp#501
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I56a63f1cde27776b86d588695ce9505bf38d7f38
|
|
The method 'getTimestampStr' is not used elsewhere in the code,
hence it is removed and replaced by 'crow::utility::getDateTime'
method.
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I094fe8ca741bf36755a722e72fadd14ed8df7287
|
|
This implements the sendEvent when the IBM management console
creates the ConfigFile at BMC using the PUT operation on the
url /ibm/v1/Host/ConfigFiles
Tested by: (Used https://github.com/DMTF/Redfish-Event-Listener)
1. Create a subscription by passing "ResourceTypes" as ["IBMConfigFile"]
POST -D headers.txt https://${bmc}/redfish/v1/EventService/Subscriptions
-d '{"Destination" : "https://<host:port>,"ResourceTypes":["IBMConfigFile"],"Protocol":"Redfish"}'
2. Create a ConfigFile
PUT https://${bmc}/ibm/v1/Host/ConfigFiles/<filename> --data-binary "@<local_path>"
3. Verify the event is generated and posted to the subscriber as below example
bodydata: {
"@odata.type":"#Event.v1_4_0.Event",
"Events":[
{
"EventId":1,
"EventTimestamp":"2020-06-26T08:40:04+00:00",
"EventType":"ResourceAdded",
"MemberId":0,
"Message":"The resource has been created successfully.",
"MessageArgs":null,
"MessageId":"ResourceEvent.1.0.3.ResourceCreated",
"OriginOfCondition":"/ibm/v1/Host/ConfigFiles/<filename>",
"MessageSeverity":"OK"
}
],
"Id":1,
"Name":"Event Log"
}
4. Verified the event is sent to the subscriber when the resourceType list is empty.
5. Verified the client subscribes for other resource - not ConfigFile ; then
the event is not sent to the subscriber.
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Change-Id: Ic9b195266fe2df67a3160197d03d9ac155ef0cd1
|
|
This commit adds support to set the DHCP configuration
on the Hypervisor's Ethernet Interface
Tested By:
Configure the DHCPEnabled parameter and check the value is set.
1. curl -k -H "X-Auth-Token: $bmc_token" -X PATCH
-d '{"DHCPv4": {"DHCPEnabled": true}}'
https://${bmc}/redfish/v1/Systems/hypervisor/EthernetInterfaces/eth0
2. curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/hypervisor/EthernetInterfaces/eth0
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Change-Id: Ie1ac5659ef6af0f29cd91bda96574424a86fd095
|
|
Add an event log in redfish when fw completed writing to staging area
during firmware update.
Tested:
Update BMC firmware
POST: https://<BMC_IP>/redfish/v1/UpdateService/
with <BMC_Update_Capsule> binary file
After BMC reboots with successful update check for Event log in
Redfish
Command: GET: https://<BMC_IP>/redfish/v1/Systems/system/LogServices/
EventLog/Entries
Response:
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/
Entries/1595803968",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2020-07-26T22:52:48+00:00",
"EntryType": "Event",
"Id": "1595803968",
"Message": "BMC firmware update to version 00.74 staged
successfully.",
"MessageArgs": [
"BMC",
"00.74"
],
"MessageId": "OpenBMC.0.1.FirmwareUpdateStaged",
"Name": "System Event Log Entry",
"Severity": "OK"
},
Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
Change-Id: I62aad007c7fc8d311a351d1c5ec4e84d6b4a77ad
|
|
strncpy has range checks, which reduce the possibility of overrunning
the buffer in the case of a bug.
Tested: clang-tidy cert check now passes. Needs functional testing.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I2fab19ca40f97cc0574146883ee19b573285a59c
|
|
We use std::filesystem now, so use that directly instead of having the
using at the top of the file.
Tested: Code compiles. No functional change.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: Iab977f08a2a61dcc9f2c82c705e5bcc55304e81a
|
|
This commit adds support to GET the DHCP configuration
details on the Hypervisor's Ethernet Interface
Tested by:
Set the DHCPEnabled property on /xyz/openbmc_project/network/hypervisor/eth0
Run the redfish GET command below to check the value set.
GET https://${bmc}/redfish/v1/Systems/hypervisor/EthernetInterfaces/eth0
Successfully ran the Redfish Validator
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Change-Id: Iacfc2b975fc6e4b759082419aa8f0b9c193d7787
|
|
Change-Id: I241d260209090dc4a01a96449657b270649d6643
Signed-off-by: Adam Stankiewicz <sheerun@sher.pl>
|
|
This reverts commit afd77a536ce84c934f56eae4f69d831fbd238d9a.
Reason for revert: Broke basic auth
Change-Id: I6510a3f8e1df95daba68b8124e2825c05e923b15
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
Handle the case if "Functional" and/or "Present" properties are
not sent by the host
Test: Tested on a witherspoon which has all 6 GV cards attached.
alpana07> curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Systems/system/Processors/gv100card0 {
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "gv100card0",
"Name": "Processor",
"ProcessorType": "Accelerator",
"Status": {
"Health": "OK",
"State": "Enabled"
}
}
"State" --> Enabled, interprets "Present" --> true
"Health"--> OK, interprets either "Functional" not present OR present&true.
Change-Id: If967623d1c85f837195c88c2b3704f326d371c13
Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
|
|
This commit supports sending the ResourceTypes list while subscribing
to the events. The "Task" resource is added as a supported type to receive
the task life cycle events.
For IBM's management console along with the Task resource, the support
is provided to subscribe to the "IBMConfigFile" ResourceType to receive
events while creating/updating the ConfigFiles.
Tested by:
1. GET https://${bmc}/redfish/v1/EventService
2. Create subscription :
POST https://${bmc}/redfish/v1/EventService/Subscriptions
-d '{"Destination" : <>, "Protocol":"Redfish", "ResourceTypes": ["Task"]}'
3. GET https://${bmc}/redfish/v1/EventService/Subscriptions/<id>
3. Redfish validator was run successfully
Signed-off-by: Sunitha Harish <sunharis@in.ibm.com>
Change-Id: Ibaf3f4f5f005a1beedf0a1cd049ae11d93a3af36
|
|
Use size_t type and check for out of bounds when index
into static const decodingData.
Tested:
Build with change and BMC web run as before.
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: Ib891d36f79f80b579423b40da493ae6749db5a54
|
|
This commit adds new files for DMTF resource registry
and corresponding json message definitions.
Tested by:
1. GET https://${bmc}/redfish/v1/Registries
2. GET https://${bmc}/redfish/v1/Registries/ResourceEvent
3. GET https://${bmc}/redfish/v1/Registries/ResourceEvent/ResourceEvent
4. Redfish Validator passed ( giving out messages as == Severity:
The given property is deprecated by revision: This property has been deprecated
in favor of MessageSeverity, which ties the values to the enumerations defined
for the Health property within Status.)
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Change-Id: Iacbedaeca85c0dcfc955bcf9b10973c0d47c98e0
|
|
MTLS Auth was not in the authenticate header,
making it authenticate too late now (in handle) as
we now authenticate before reading the headers.
Move it to the authenticate header.
Tested: MTLS in Chrome and via scripting allowed
GETs on resources
Change-Id: Ia765efd5c588b497de010605b474f6bb886a9dd1
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
Clears the BMC dump entry collection
Tested-By:
* curl -k -H "X-Auth-Token: $bmc_token" -X POST
https://${bmc}/redfish/v1/Managers/bmc/LogServices/
Dump/Actions/LogService.ClearLog
* curl -k -H "X-Auth-Token: $bmc_token" -X POST
https://${bmc}/redfish/v1/Systems/system/LogServices/
Dump/Actions/LogService.ClearLog
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: Iffe9b62d52bc28ccbeae3efdb34d30b2b750ab2c
|
|
This commit supports creation of a BMC dump entry.
After initiation of the dump creation, a task is
created that listens to "InterfaceAdded" signal over
"/xyz/openbmc_project/dump" path. Once the task is
completed, it returns the created BMC dump entry ID,
as a part of the task's message args as well as in
the task's http header.
Tested-By:
* curl -k -H "X-Auth-Token: $bmc_token" -X POST
https://${bmc}/redfish/v1/Managers/bmc/LogServices/
Dump/Actions/Oem/OemLogService.CollectDiagnosticData
-d '{"DiagnosticDataType" : "Managers",
"OEMDiagnosticDataType": ""}'
* curl -k -H "X-Auth-Token: $bmc_token" -X POST
https://${bmc}/redfish/v1/Systems/system/LogServices/
Dump/Actions/Oem/OemLogService.CollectDiagnosticData
-d '{"DiagnosticDataType" : "OEM", "OEMDiagnosticDataType":
"System"}'
<Returns a Task>
* curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/TaskService/Tasks/<task-id>
<Returns Dump ID on completion>
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: Ide44b6abda797d738851123f06696558bab05ce0
|
|
This commit supports adding a BMC dump entry under /redfish/
v1/Managers/bmc/LogServices/Dump
* Removed the option for enabling each dump separately. Instead
introduced one common option to enable dump.
* Defined few methods that are common for both BMC and System dumps.
* Compilation flag DBMCWEB_ENABLE_REDFISH_DUMP_LOG must be enabled.
Tested-By:
* curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/
redfish/v1/Managers/bmc/LogServices/
* curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/
redfish/v1/Managers/bmc/LogServices/Dump
* curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/
redfish/v1/Managers/bmc/LogServices/Dump/Entries
* curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/
redfish/v1/Managers/bmc/LogServices/Dump/Entries/<dump-id>
* curl -k -H "X-Auth-Token: $bmc_token" -X DELETE https://${bmc}/
redfish/v1/Managers/bmc/LogServices/Dump/Entries/<dump-id>
Redfish Validator passed.
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: Iac9daa8242154e249fad66609b837cf7d2b16091
|
|
In this commit, CollectDiagnisticData action in
OemLogService schema is updated with two parameters.
It also includes dereferencing the unused namespace
in metadata xml file.
Tested-By:
Redfish Validator - Passed
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I093ddaef9fa786767b2853e235571a4664ee759c
|
|
ActiveSoftwareImage was added to Bios in v1_1_0 and Manager in v1_6_0.
What Redfish calls active is the functional or running image in
OpenBMC.
Reused getActiveFwVersion which means less D-Bus calls when
calling from Manager.
From https://redfish.dmtf.org/schemas/v1/Manager.v1_9_0.json
"ActiveSoftwareImage": {
...
"description": "The link to the software inventory resource that
represents the active firmware image for this manager.",
"longDescription": "This property shall contain a link to a resource
of type SoftwareInventory that represents the active firmware image for
this manager.",
"readonly": false,
"versionAdded": "v1_6_0"
PATCH support will come later.
Tested: Validator passes
Manager:
...
"FirmwareVersion": "2.9.0-dev-515-g92efac612-dirty",
...
"Links": {
"ActiveSoftwareImage": {
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/82d3ec86"
},
"ManagerForChassis": [
{
"@odata.id": "/redfish/v1/Chassis/chassis"
}
],
...
System:
"BiosVersion": "IBM-witherspoon-OP9-v2.3-rc2-3.28",
Bios:
"ActiveSoftwareImage": {
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/9f75c5ad"
}
},
Change-Id: Ia3583b4cb513bf36942a9dcbc4588615275bb2ad
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
This fixes a problem we are seeing in CI.
Was removed in 3909dc82a003893812f598434d6c4558107afa28.
Change-Id: If50b5fcf4e6106bf82be5c410fabe8211c9dec72
Tested: Code update via CI works.
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Subscribing for events using SSE subscription
type is crashing the bmcweb. Add nullptr check
around the connection object which is created for
'Push Style Events', to avoid the crash in case
of SSE.
Tested:
- SSE subscription works fine and crash goes way.
- 'Push style event' works fine.
Change-Id: I8ad5b63ca5a82d7ffe41054eee5f4ab6dcb9d72f
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
|
|
Now websocket client receives a proper reason from a server.
Removed filling asyncResp from onopen() method from nbdproxy.h
because it was redundant. Websocket does not response to client
using asyncResp.
Removed close from NbdProxyServer destructor because it is always
called in onclose() method.
Tested:
- Mounted and unmounted virtual media using proxy mode few times
as administrator with success.
- Mounted virtual media using proxy mode as operator and receives
proper reason on client side.
- Verify if errors are received properly on client side when
mounting operation fails.
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Change-Id: If3b1cc9782de71a0975416872bc2fe8e3824148a
|
|
If CPUInfo interface is available, populate SerialNumber
and Model for processor/cpu.
Tested:
Verfied /redfish/v1/Systems/system/Processors/cpu0
{
"@odata.id": "/redfish/v1/Systems/system/Processors/cpu0",
"@odata.type": "#Processor.v1_7_0.Processor",
"Id": "cpu0",
"MaxSpeedMHz": 4000,
"Model": "QQQQ",
"Name": "Central Processor",
"ProcessorType": "CPU",
"SerialNumber": "6122cca2e8a2d5c",
...
Redfish Validator passed together with this patch
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/31294/
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: I0e14d414e06c40062239a0673d2c55e706cc1b30
|
|
Add it back so that slow connections can upload images.
Tested: Firmware update still works.
Change-Id: Ib674252b68297ad473de038069962e9c3202b486
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
OCP mandate the ResetActionInfo for convey the
parameter requirements and allowable values on
parameters for actions. So add ResetActionInfo
uri for below URI's.
/redfish/v1/Systems/system/ResetActionInfo
/redfish/v1/Managers/bmc/ResetActionInfo
/redfish/v1/Chassis/<id>/ResetActionInfo
Tested:
- All action uri's show correct @Redfish.ActionInfo
"Actions": {
"#ComputerSystem.Reset": {
"@Redfish.ActionInfo": "/redfish/v1/Systems/system/ResetActionInfo",
"target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset"
}
}
- All /ResetActionInfo uri's show correct allowable
values.
{
"@odata.id": "/redfish/v1/Systems/system/ResetActionInfo",
"@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
"Id": "ResetActionInfo",
"Name": "Reset Action Info",
"Parameters": {
"AllowableValues": [
"On",
"ForceOff",
"ForceOn",
"ForceRestart",
"GracefulRestart",
"GracefulShutdown",
"PowerCycle",
"Nmi"
],
"DataType": "String",
"Name": "ResetType",
"Required": true
}
}
- Ran redfish validator and its successful.
Change-Id: I656163dde300d97fe1923f1d58fa6d104c702d27
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
|
|
After doWrite we are no longer in a context where
the user can keep the connection open. Cancel the timer.
Tested: On a slow connection, still get responses
Change-Id: I75a5bb32ccaaae173bb37fe9717b3e63e85c7131
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
Default implementation for GET, POST, PATCH and DELETE returns 403
if user does not have right to perform action on a resource.
Access right was verified even if method was not implemented
(which is good).
PUT was lacking this behavior, and returned 405 (method not allowed)
for unpriviledged user if it was not supported by resource.
This change makes PUT method behaving the same way as the other in this
scenario, making behavior of all basic REST methods consistent.
Testing:
- verified that calling PUT for unpriviledged user on resource, that
doesn't implement it, returns 403 instead of 405
Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>
Change-Id: I91ffb88755093b2d5d19f073407df6ede026d720
|
|
While a cool example of how to do string matching in constexpr space,
the set of verbs available to HTTP has been fixed for a very long time.
This was ported over to beast a while back, but we kept the API for....
mediocre reasons of backward compatibility. Remove that, and delete the
now unused code.
Tested: Built and loaded on a Witherspoon. Validator passes.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: Iaf048e196f9b6e71983189877203bf80390df286
Signed-off-by: James Feist <james.feist@linux.intel.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Currently we parse the whole message before authenticating,
allowing an attacker the ability to upload a large image,
or keep a connection open for the max amount of time easier
than it should be. This moves the authentication to the
earliest point possible, and restricts unauthenticated users
timeouts and max upload sizes. It also makes it so that
unauthenticated users cannot keep the connection alive
forever by refusing to close the connection.
Tested:
- login/logout
- firmware update
- large POST when unauthenticated
- timeouts when unauthenticated
- slowhttptest
Change-Id: Ifa02d8db04eac1821e8950eb85e71634a9e6d265
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
This implements the MessageSeverity property which tools and users
should use instead of the deprecated Severity property.
Since the registries use common infrastructure, easiest if just
bumped together and now allows grabbing the latest when implementing
a new registry, e.g. ResourceEvent.
Implement this new required property, MessageSeverity, in the openbmc
registry. Follow Redfish registries in having both MessageSeverity
and Severity.
Modified parse_registries.py to look at latest Base and
TaskEvent registries and ran parse_registries.py.
Tested: Built and validator passes. See new registries:
curl -k https://$bmc/redfish/v1/Registries/Base
{
"@odata.id": "/redfish/v1/Registries/Base",
"@odata.type": "#MessageRegistryFile.v1_1_0.MessageRegistryFile",
"Description": "DMTF Base Message Registry File Location",
"Id": "Base",
"Languages": [
"en"
],
"Languages@odata.count": 1,
"Location": [
{
"Language": "en",
"PublicationUri": "https://redfish.dmtf.org/registries/Base.1.8.1.json",
"Uri": "/redfish/v1/Registries/Base/Base"
}
],
...
curl -k https://$bmc/redfish/v1/Registries/Base/Base
{
"@Redfish.Copyright": "Copyright 2014-2020 DMTF. All rights reserved.",
"@odata.type": "#MessageRegistry.v1_4_0.MessageRegistry",
"Description": "This registry defines the base messages for Redfish",
"Id": "Base.1.8.1",
"Language": "en",
"Messages": {
"AccessDenied": {
"Description": "Indicates that while attempting to access, connect to or transfer to/from another resource, the service denied access.",
"Message": "While attempting to establish a connection to %1, the service denied access.",
"MessageSeverity": "Critical",
"NumberOfArgs": 1,
"ParamTypes": [
"string"
],
"Resolution": "Attempt to ensure that the URI is correct and that the service has the appropriate credentials.",
"
...
Change-Id: I6495af0e02036ea527036d942d6b6b5f55178bb2
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Before:
iBMC server is running, local endpoint [::]:443
Tested: None.
Change-Id: I69eae1b34ac2070e7fcbea2d15e21c9a00112c6f
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Moving to clang-format-10 causes no changes to the registry files.
Tested: Ran parse_registries.py
Change-Id: Iac80c5ca784a08eecc206ed302b33b2d96caa7f6
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
These spelling errors were found using
https://github.com/codespell-project/codespell
Tested: Built and ran against validator.
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Change-Id: I214fe102550295578cfdf0fc58305897d261ce55
|
|
These spelling errors were found using
https://github.com/codespell-project/codespell
Tested: Top commit (along with this) was built and ran against
validator.
Change-Id: Ic9dce27b1de8567eedf7753164ef564d3aedf8ca
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Tested: Top commit (along with this) was built and ran against
validator.
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Change-Id: Ie5af15941250b795215cee87e757e56cce26c46e
|
|
Change-Id: Iafbd209fe2cb4503df995536587d8a80bd887a74
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Tested: Top commit (along with this) was built and ran against
validator.
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Change-Id: I1ae238769e7907b44cce8eae0ab5fe4d6faf88f6
|
|
Tested: Top commit (along with this) was built and ran against
validator.
Change-Id: I294783208b5016732fde56467ed5629dd5352a3d
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|