| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
PidControllers should display setpoint.
Tested-by: Saw setpoint in web-browser
Change-Id: I76ee50d832200e39f55312c0a41c91aa13e65af9
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Return a method_not_allowed response when the path for a
DELETE is invalid. This matches what the phosphor-rest
server did.
Change-Id: I6db577d25d92bdbee9e97355ff11a15a5c68288b
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the following fixes to the image upload code
to make it behave like the phosphor-rest implementation,
which should work for both UBI and non-UBI image formats.
1) Subscribe to an intefacesAdded signal on
/xyz/openbmc_project/software upon invocation.
2) If the signal callback happens within 10s, check that the
xyz.openbmc_project.Software.Version interface was created,
and if it was read the version ID from the last segment of
the object path in the signal data and return it in the
call response.
3) If the callback doesn't occur within 10s, return a 400
error.
Resolves openbmc/bmcweb#30
Change-Id: Ic9572488c13cadfb19c0d57a97833a627cf45df5
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit moves content security policy to use the modern header, not
a header begining with X.
Requires the content-security-policy patch series to function correctly.
Tested by:
Launched phosphor-webui, and observed webui launch, and no warnings in
debug tools.
Change-Id: I14a422d8a4047d0b05c937a31a5845f8eeb858c6
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, bmcweb was utilitizing the "mozilla compatibility" cipher
suites. This is overly lenient on broken ciphers and can cause some
issues with security reviews. In researching this, it looks like we
never actually documented that we follow Mozilla ciphers, aside from the
statement "The OpenBMC webserver shall follow the latest OWASP recommendations for
authentication, session management, and security." Considering that
we're moving _to_ OWASP recommendations, this commit is simply making us
follow the advice we already document, although this commit also updates
the documentation to be more clear.
Tested By:
Loaded on a BMC, opened web page in browser, and observed phosphor-webui
loaded correctly.
Change-Id: I912b35d378ce955c1472b2d54f1a365f6efea160
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
| |
Another thing I point people to a lot as a starting point
for their redfish work
Change-Id: I679dc12287bfa7d12f6e791ef0f31b1480d8190a
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
| |
More and more developers are starting to work with bmcweb and I keep
repeating a lot of the same information to them. Figured getting it down
in this doc would help others get up and going.
Change-Id: I536d0319cc278662f633761b1c38fe5820690a25
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To determine /redfish/v1/Chassis/<ChassisID> don't look for
xyz.openbmc_project.Inventory.Item.System which is currently
implemented at /xyz/openbmc_project/inventory/system.
Inventory.Item.System (/xyz/openbmc_project/inventory/system)
is not a Chassis.
Inventory.Item.System is used to determine
/redfish/v1/Systems/<SystemID>.
https://gerrit.openbmc-project.xyz/#/c/openbmc/bmcweb/+/16528/
Change-Id: I6b7be374ea997d22598c0e7144a65428fba2fdbc
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a possibility that a method may be implemented
by either different services or interfaces, and 1 or more
of them may return data.
In the unlikely case that is encountered, attempt to handle
that by first setting the final response data to the first
data back from a method, and then on future method responses
that return data:
* If the new and old responses are both dictionaries,
add the new keys/values to the original ones.
* If the new and old responses are both arrays,
add the new array elements to the original array.
* If the new data is of a different type than the
previous data, convert the overall response into
an array and add the new and original responses
as array elements.
Change-Id: I23edc3d9f8154aba1ba4276112cde6ecb4345fdf
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Variants are in their own container. In order to
get the type of the data contained in the variant,
the peek API needs to be used.
Resolves openbmc/bmcweb#24
Change-Id: I085064a8eabe2f57cfa0f1977fe7b9c19baa80e2
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
| |
A struct is in its own sd_bus_message container,
and the output JSON looks like an array.
Change-Id: Ie8e5848a5fa9bc9605f5dda06dc1b5d7be4dea3c
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for returning arrays and dictionaries
from methods.
Note that a dictionary can only be seen inside of
an array, and every key/value pair is in its own
sd_bus_message container.
Change-Id: I4f8ff671f7c4403d83443482e7db0487bdc03ff1
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
When converting a bool from JSON into D-Bus, a
dereference was missing causing the code to always
output a 1 since since it checked the address value
and not the actual bool value.
Change-Id: I521418c25bd23c64b59d599f5c5298d8b89cd67c
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Fixed some numbering and tried to make the spacing between
redfish sections consistent.
Change-Id: Icda3ae4183d52a6f9fedf0e639a4111dabec3c40
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for returning the basic D-Bus types,
such as int, string, etc, from methods.
It does this by using the sd_bus_message_read_basic
API to pull the data out of the method response message,
and then converts it to JSON.
Future commits will add array/dict/variant support.
Change-Id: I937d22330a9c2df443942ea84e45d894244388ff
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a method has an output argument in the introspection
data, it has data that should be returned in the response JSON.
This code finds the output type in the introspection
data, and adds two function stubs: one to convert the output
data in the sd_bus message to JSON, and another to handle
combining the possible multiple method responses (from
different services or interfaces) into 1 output.
It also adds some logic on what to do if multiple methods
are called and only a subset fail or return data.
That logic can be summarized as:
* if any method passes, consider it a success
* return all the data that comes back, though the
merging is done in a future commit.
Change-Id: Ic50a3a88bb9d83672f7aed2b832217122e182048
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
All of the useful code in this function is in an else leg
after an error check. Add a return statement in the error
check so the else statement can be removed, to reduce the
level of indent as the code already indents several
additional levels.
Change-Id: Ia664ae2af31a5d72e322dd6c3c83ea8961931e22
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Add a missing return statement to convertJsonToDbus.
The function did appear to still work before, but it
fixes a compile warning.
Change-Id: Ib6b15c822fa6b56c9d9fdaca704bc9c53024fa76
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Add ability to set stepwise controllers through redfish.
Also convert all pid control to use readJson.
Tested-by: Set different values using python requests api
Change-Id: Ifa31db7dce3338ec033426641a0185dd3d56b4bc
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add stepwise configuration information into the oem
redfish configuration. Also move the basic configuration
information into the above loop to not set it multiple
times. Only implemented GET thus far, PATCH will be in
follow-on commit.
Tested-by: Navigated to redfish/v1/Managers/bmc/ and saw
Stepwise configuration.
Change-Id: Id4fdf7b6c6708edc56c1ede717b79c50de2b1c94
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the schema required for stepwise controllers.
JSON is auto-created based on XML using redfish csdl to
json script.
Tested-by: Ran redfish validator and verified it passed
Change-Id: Id933d248f55c98d858a7dccffa974f95b98b554e
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function dbusArgSplit() was missing the return statement
at the end, which was causing a warning in the bitbake
compile logs.
The function apparently still worked fine without it, but
one wouldn't think it would just by looking at it.
Change-Id: Ifcd1f742de995eb19685d0ef37036860ebbf8b95
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
boost::asio::io_service is removed in leiu of io_context, which is a
closer match to the networking TS. Move us to that implementatio.
This was an automated move using the following command:
git grep -l 'io_service' | xargs sed -i 's/io_service/io_context/g'
Change-Id: I46605521c01f79f86f6901ddf69ddc8c4bc24103
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use 400, which is a client error, for errors when
deciphering method call arguments as opposed to
a server error, 500. The robot testcases expect this
and it also makes sense since the client must have
passed in a bad argument.
Only the error that results from a method call failing
will be 500.
Resolves openbmc/bmcweb#25
Change-Id: I9504905992fee3bc0119ff7cae8512eba899daa4
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
| |
sed replacing filesystem should not have happened in
this file.
Change-Id: I3411d655b563edd52cd980bd56277f16fa6f7ac5
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When using Legacy Boot Mode in Intel platforms, HTML5 SOL console will
be disconnected when host start.
When host start, BIOS will send some non UTF-8 data to SOL console,
then SOL console will be disconnected. Changing to binary format can
make WSS protocol work correctly with non UTF-8 data.
Change-Id: I9a440220f16eb07d800dc291897ab3106cd40c32
Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Resolves openbmc/bmcweb#12
Testing: Verified this with system booted against
redfish/v1/Systems/motherboard:
"PowerState": "On",
"Status": {
"State": "Enabled"
},
and this with system powered off:
"PowerState": "Off",
"Status": {
"State": "Disabled"
},
Change-Id: I0acbf0992d730e4a5189d9af962370277f59eaaa
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the obmc-console-server binding to the correct socket, this is not
needed.
Abstract unix sockets start with the nul-charater, but are not nul
terminated. In fact, the nul-character has no meaning in the path.
According to the man page unix(7),
abstract: an abstract socket address is distinguished (from a pathname
socket) by the fact that sun_path[0] is a null byte ('\0').
The socket's address in this namespace is given by the
additional bytes in sun_path that are covered by the
specified length of the address structure. (Null bytes in
the name have no special significance.)
This means that when calling bind/connect, the size of the sockaddr
structure is not sizeof(sockaddr_un), it is sizeof(sockaddr_un) -
sizeof(sun_path) + (path_len)
Change-Id: I2b19d0b9aa8e8ded9162890503c46cad95a6c7b6
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
| |
Splice it into standard for gcc8
Change-Id: I584206dd737c9d90cf93bfa8541980fdd8f6d39b
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update Schema versions for:
* ComputerSystem
* Processor
* Memory
Tests:
* Service Validator did not have any regression
Change-Id: I3fb900b464013588ac0b08c0157404c8ababddb2
Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Redfish schema 2018.2 was released on September 20th, 2018. While there
aren't any plans to utilize any of the new services, it makes sense to
keep up to date with the latest static data.
This commit was largely done automatically using the update_schemas.py
script.
Change-Id: Ieaa9f1ab2a47244ef201cfe9a064744d7d156745
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
| |
The ethernet interface previous hardcoded error handling patterns for
the interfaces shown. This commit moves it to the generic ReadJson
mechanisms for error handling
Change-Id: I710188c808ee62c5797059d7ee8f9876bf872a11
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Technically, if multiple dump files existed, we could get a double end()
called loading each file. Avoid that by returning.
Tested By:
Downloading a file from dump, using the /dump url. File downloads
correctly.
Change-Id: Icd71a2fbbe365557daa1a7e24c5563f3749a748d
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
| |
The Redfish UI isn't presented properly with the latest security changes
because the MIME type wasn't explicitly set. This resolves it, by
adding an MIME type to redfish.
Change-Id: Ic1b0c0bd6fb2b8b6b4d9393127e3e606ad7cb655
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added RoleCollection by retriving information
from dbus user object and Role properties support.
Test:
Tested RoleCollection and Role redfish URI's by cross
validaing with dbus user object properties.
Change-Id: I519972f645c7a4d0486e64ae5a403a3009aa26f5
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Getting and Setting AccountService properties
like MinPasswordLengh, AccountLockoutThreshold,
AccountLockoutDuration.
Test:
Tried get and set of redfish requests on
above specified properties and cross validated
with dbus calls.
Change-Id: I68f110b706109a1083f38158c09e9e13032ec401
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Adding boolean support in json_utils.
Test:
Validated by sending redfish POST/PATCH
request with boolean value in data.
Change-Id: Iddc7daebb3507a468cbb2187806908f821bd6da7
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the below issues in rest actions
- Fetching dbus signature from xml arg elements.
- Double iterator increament, while reading array
of strings 'as'.
Test:
Verified rest API's with actions(POST).
Change-Id: I52ca938bae54c882da2f9f445ea0b4e605a5f8c3
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Somehow we got the content type wrong on javascript files, which became
apparent when the content security patches were coming out.
This patchset corrects the string.
Tested By:
Opened webui in chrome, and inspected the javascript files. content
type was correct.
Change-Id: I9ba706d5b919bf4c6365d01853c978b1616913d4
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
| |
Add support of reading floating point numbers.
Tested-by: Successfully unpacked doubles
Change-Id: I9cf5e33dbb99367a53013be28b8f905eae2e4518
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
| |
Add std::array support to readJson.
Change-Id: I32bb28908f195fd3443556c40b71eaabd105db25
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Related to patchset here. This patchset implements the bmc side of
redirecting the users URL after login correctly.
https://gerrit.openbmc-project.xyz/#/c/openbmc/phosphor-webui/+/15925
Change-Id: Idf42f4cecd29fb0c6088721eb5e10fb39e1168e7
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Because we should always be posting the correct mime type on all of our
pages, add a "nosniff" flag, to improve our protection against injection
attacks.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
Change-Id: I4a311948e5e157b4071effddff577c73b65d7af1
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
| |
When in cross site scripting mode, delete should be allowed, along with
PATCH, PUT, and POST, to delete values.
Change-Id: If59594b6a01794c843c0290249bd397b9e305a3e
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
UUID got broken with a botched commit here:
0f74e643ec246c333ef4724af1ecd5adeb1b6658
This should resolve #10
Change-Id: Ic9ff631b56ab02525fadab1ef8013904d36d71c8
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In certain cases, redfish wants to unpack specialized types that might
be more complex than just simple structs. This commit adds the ability
to unpack a nlohman json object directly, and moves the ethernet schema
over to the new api
Change-Id: Ib3c25e6c4d8f0a163647092adfb454355d329170
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
| |
SessionService had the wrong @odata.id.
Redfish-Service-Validator found this.
Change-Id: Idf67b46b69b6ad770062ea3146996d100c424eea
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes Memory Size an optional parameter.
On X86 platforms, MemorySizeInKB is coming from the MDR daemon.
For other platforms it is undefined. Still some work to do here,
but this commit fixes the internal error in
/redfish/v1/Systems/{ComputerSystemId}/Memory/{MemoryId} on non-X86
systems.
Resolves: openbmc/bmcweb#19
curl -k -H "X-Auth-Token: $bmc_token" -X GET \
https://${bmc}/redfish/v1/Systems/motherboard/Memory/dimm9
{
"@odata.context": "/redfish/v1/$metadata#Memory.Memory",
"@odata.id": "/redfish/v1/Systems/motherboard/Memory/dimm9",
"@odata.type": "#Memory.v1_2_0.Memory",
"Id": "dimm9",
"Name": "DIMM Slot",
"Status": {
"Health": "OK",
"State": "Enabled"
}
}
Change-Id: Ib2b558ba2299674edab0132a21dc6109e4b81732
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for the DELETE verb. This verb will cause the
Delete method on the xyz.openbmc_project.Object.Delete interface
to be called on the specified object path. An error will be
returned if that interface/method doesn't exist on that path.
The code is similar to the method handling code, except it
doesn't need to parse any argument JSON, and it is looking only
at a specific interface. It does share the code path that
introspects the object to find a method and call it.
Tested: Used it to delete error logs.
Change-Id: Ica90b0d80049e6bc59fe2b8456948696054f4a8b
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
| |
This handler is used for setting a D-Bus property.
Return failures as a JSON response.
Change-Id: Ie18abbc78d77d23d3194d76b60d42e877ac54bec
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|