summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix issue with dbus interfaces and compatibilityEd Tanous2018-06-291-32/+53
| | | | | Change-Id: I3fb40defd978e87aad8c7294d5aab1aa72561fa2 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Fix issue with basic auth and the bmcwebEd Tanous2018-06-292-6/+49
| | | | | | | | | This fixes a bug where the webserver requests a resource that doesn't exist, which triggers a www-authenticate, and causes the browser to show the wrong thing. Change-Id: I65643a50eb269b0a7c76dcb0c65c4e7db2165c88 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Boost beastEd Tanous2018-06-298-183/+175
| | | | | | | | This commit is the beginings of attempting to transition away from crow, and toward boost::beast. Unit tests are passing, and implementation appears to be slightly faster than crow. Change-Id: Ic8d946dc7a04f514c67b1098f181eee1ced69171
* Move thermal interfaces to new schemaEd Tanous2018-06-291-2/+2
| | | | | | | | With the change to entity manager, move the thermal componets to the proper inventory manager interfaces Change-Id: I520e65b1df53ca8d3fbc12253882ae69b708bbbf Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Move bmcweb over to sdbusplusEd Tanous2018-06-296-153/+182
| | | | | | | | | | | | | | | | | | | | | | | | This patchset moves bmcweb from using boost-dbus over entirely to sdbusplus. This has some nice improvements in performance (about 30% of CPU cycles saved in dbus transactions), as well as makes this project manuver closer to the upstream way of thinking. Changes to bmcweb are largely ceremonial, and fall into a few categories: 1. Moves async_method_call instances to the new format, and deletes any use of the "endpoint" object in leiu of the sdbusplus style interface 2. sdbus object_path object doesn't allow access to the string directly, so code that uses it moves to explicit casts. 3. The mapbox variant, while attempting to recreate boost::variant, misses a T* get<T*>() method implementation, which allows using variant without exceptions. Currently, there is an overload for mapbox::get_ptr implementation which replecates the functionality. Tested by: Booting the bmcweb on a target, iterating through redfish basic phosphor-webui usage, and websockets usage Change-Id: I2d95882908d6eb6dba00b9219a221dd96449ca7b Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Fix an issue with directory permissionsEd Tanous2018-04-221-0/+2
| | | | | | | | directory includes need to manage both the routes, just just the one ending in slash Change-Id: I1ba0e9021b212e88861aa720bb5a9d7610b72a9c Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Make middleware try other auth types on auth failureEd Tanous2018-04-221-14/+20
| | | | | | | | | | | This commit makes the authentication middleware attempt other auth mechanisms if available from the user. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Tested By: Phosphor webui launches and logs in. Redfish endpoints now work with a cookie present. Change-Id: I7c11d4b5eb3c32c8e2b9ba348b70a55bfb72bd4e
* Change order of authorization typesEd Tanous2018-04-221-20/+20
| | | | | | | | | | | Basic authentication is very slow by virtue of the fact that it has to call into pam. THis commit rearranges the flow to accomplish 2 things. 1. If a non-basic auth mechanism is provided, prefer that. 2. Check the whitelist first, before attempting to authenticate the user. Change-Id: Icfe5a218c00a2aeb53acd1ab00bb8cc568424d1d Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Implement pretty printing json to HTMLEd Tanous2018-04-221-0/+2
| | | | | Change-Id: Ibe3cdc2cd53470ccd437b1b6e21bc7dd29c4b85e Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Clean up async dbus endpointEd Tanous2018-04-221-134/+190
| | | | | | | | | This commit makes the webui more compatible with the dbus backend, and cleans up the backend to support multiple concurrent transactions, as well as support for the "enumerate" keyword. Change-Id: I66144904b5c9b2ce7d1b1147cc80dfd356beb0bc Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Minor fixes to make redfish pass compliance testsEd Tanous2018-04-221-29/+66
| | | | | | | | | | | | 1. Role members needs to be an array, not an object 2. Fix accounts schema to use the new user manager 3. Remove "status" field hardcodes 4. Hardcode chassisType to rackmount for now 5. Work around bug in get sub routes 6. Add ID to SessionService Schema Change-Id: Ibb13d6ace747ac028e840638868c3a01d65dedfa Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Adding Chassis and ChassisCollection Schemas to RedfishRapkiewicz, Pawel2018-04-221-28/+0
| | | | | | | | | | | | | | | | | This commit: * removes previous redfish_v1 Chassis implementation * Adds Chassis and ChassisCollection implementation as Node way * Adds Chassis Provider class for retrieving data from EntityManager It was tested: * Wolfpass run, to see if previous functionality was not broken * Service Validator, which did not unveil any regression, and did verified that implemented schemas are complient. Change-Id: I75a9545a0abd8b85d6ce72329c523fc076affc28 Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com> Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com>
* Add full index support to static files loaderEd Tanous2018-04-201-30/+19
| | | | | | | | ... and remove file spcific check for redfish $metadata. This allows the $metadata to be pre-gzip compressed if we choose. Change-Id: I697bd7f8a8f5dc1a7b448d699b2daf93a296c248 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Remove the last couple uses of json get<>Ed Tanous2018-03-271-17/+22
| | | | | | | ... and replace with the nothrow equivalent of get_ptr Change-Id: I2d2b83f757d06e8b088e62c6474003ca5cd53de5 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Redfish Manager and ManagerCollectionBorawski.Lukasz2018-03-271-53/+0
| | | | | | | Node version of the Manager and ManagerCollection implementation. Change-Id: I693fa57add670fb0ecfc0cf0046e06142571c543 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* Redfish SessionServiceBorawski.Lukasz2018-03-272-24/+7
| | | | | | | | | - added node version of the SessionService implementation - added a default timeout member and a get timeout method to the SessionStore class Change-Id: I532080789b3d687208510f8b748402735ed888d8 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* Redfish NetworkProtocolBorawski.Lukasz2018-03-271-57/+0
| | | | | | | Node version of the NetworkProtocol implementation. Change-Id: I6f52dca4e530917a5b815a32f1222b481059aa23 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* Improved Refish subroutesBorawski.Lukasz2018-03-271-0/+24
| | | | | | | | | | - getSubroutes() is now a method of the Node class - getSubroutes() is called only once per node at construction time, not at each GET request - template parameter removed from the Node class Change-Id: Ie4eb8766717aae566c13c295458fe0dba8ab84c0 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* AccountServiceLewanczyk, Dawid2018-03-271-23/+0
| | | | | | | Initial version moved to separate node. Change-Id: I3fe4e2eb00bcb754ea81de0a0656f4de9eb9156c Signed-off-by: Lewanczyk, Dawid <dawid.lewanczyk@intel.com>
* Reimplement presistent data loading in no-throw wayKowalski, Kamil2018-03-062-21/+73
| | | | | | | | | | | Reimplemented persistent data file loading in no-throw approach to avoid errors during startup when bmcweb_persistent_data.json has been corrupted. Additionally this will allow to turn off all exceptions in the project (removed try-catch). Change-Id: I9bf863ebfd7ce9125d1e7e948f7ac739db94e009 Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Refactor static asset loadingEd Tanous2018-03-061-38/+39
| | | | | | | | | | 1. Remove extra copy in loading body 2. Add gif and ico to the supported list 3. Log an error if the system fails to look up a content-type 4. Remove commented out caching code Change-Id: Ib079bb6f0eeacdcd60553af70b391e4b5150fb99 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* RolesLewanczyk, Dawid2018-03-061-36/+0
| | | | | | | | Move roles and roles collection to new class based implementation Change-Id: I70f39bf8289fb45483a1e7f2c4eb3dbc1c7a7090 Signed-off-by: Lewanczyk, Dawid <dawid.lewanczyk@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Remove unused g3log fileEd Tanous2018-03-061-13/+0
| | | | | | | g3log is no longer used. Remove references to it. Change-Id: I5c9be513a0f688ca5d5ad8411f9a61d2e331b5cd Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Session and SessionCollectionKowalski, Kamil2018-02-055-322/+233
| | | | | | | | | | | New Redfish-Core nodes added (removed from redfish_v1.hpp) - Session and SessionCollection. Tested manually on x86 VM and Wolfpass Platform. Behavior almost identical to what was before - differences: - SessionCollection - now only returns TIMEOUT presistence sessions, not SINGLE - Aquiring sessions from session storage now applies timeouts Change-Id: I68bf4fa7fa1c8371216a7d4daa30bbfb653cfa72 Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com>
* Fix off by one error in cookie authenticationEd Tanous2018-02-051-1/+1
| | | | | | | sizeof(const char*) will include the size of the null terminator at the end. Fix that. Change-Id: Ia7c5ce4788bf0d2a5240d9df9684a2d93f791e58
* Service RootBorawski.Lukasz2018-01-241-21/+0
| | | | | Change-Id: Ibf9d463802d77014852a92ecfcb8096324f3670f Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* Add the function to process the "PUT" method from client.shiyilei2018-01-221-35/+142
| | | | | | | | The request URL starts with "/xyz/openbmc_project/..." which follows the rule of IBM The "PUT" function will help process "hostpoweron","hostpoweroff"... functions from WebUI Change-Id: Ibe86295507764c8192b34726ae36b21ad01ac0d4 Signed-off-by: shiyilei <yilei.shi@intel.com>
* Middleware prepared for Redfish integrationBorawski.Lukasz2018-01-172-101/+205
| | | | | | | | | | | | | | | | | This is adapted from Lukasz patchset, and fixes minor errors in how basic authentication was processed. Tested by: 1. Logging into the webui, and ensuring that cookie auth completes (by looking at the chrome debugger) 2. Checked that basic auth works by accessing the redfish accounts schema using the following command: wget -d https://localhost:18080/redfish/v1/SessionService/Sessions/ --user=root --password=<password> --no-check-certificate Change-Id: I21920a56c52288a74a2b7d587b7c2d7eeeae8d6f Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Fix include statementBorawski.Lukasz2018-01-171-2/+1
| | | | | Change-Id: Icb92e9df233ebd5a47e458b071bad9e00248a317 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* Fix merge error introduced with base64.hpp deletionEd Tanous2018-01-123-3/+3
| | | | Change-Id: If1e194009cec31c593e4a0f89c875a3e3bd84110
* Remove unused base64 componentEd Tanous2018-01-031-7/+0
| | | | | | Base 64 is no longer used in the auth module, so this is dead code Change-Id: Ieafe522249fd8dfe0058ba63798ff5263b4b9027
* Update crow to improve securityEd Tanous2017-11-073-5/+10
| | | | Change-Id: I86146edde21bac89e6cc30afdd79690e2b0adadd
* Update get_routes to use trie for efficiencyEd Tanous2017-10-301-4/+5
| | | | | | | | | | | | | | | | | This commit updates the behavior of request_routes to actually use the trie data structure to find the appropriate routes. This function was originaly intended for debugging, but now with redfish, it is being used to look up routes. Also, update the prototype so it returns a string pointer to the main route in the trie instead of copying the whole list of stings. A future optimization should also give the ability to pick a "stop at" character, or a depth so that users can decide how deep into the tree they want to iterate, instead of getting the whole subtree and filtering after the fact. Change-Id: I8b98fb3f19f59a043ae6aa583ed62ab89be10eb8
* Refactor session key storageEd Tanous2017-10-273-81/+166
| | | | | | | | | Refactor session key storage to actually have an interface that isn't map, and provide reasonable lookup functions, as well as update the consumers of those functions. This also implements session timeouts. Change-Id: Ica46716805782cfbb7c4ee5569bc7e468c260bc3
* Implement Managers interface for redfishEd Tanous2017-10-261-3/+126
| | | | | | | This commit implements the manager interface schema for redfish, as well as the manager collection. Change-Id: Ide6d6b500b8758dc693d65bad5f263baac9f529f
* Add the redfish static files to the buildEd Tanous2017-10-242-255/+17
| | | | | | | ...And delete the old webserver static files from the repo. Move $metadata to a static file, as that's really where it belongs. Change-Id: I2caeee7cd779b7c07cfc10cd693459105656671f
* Update WebserverEd Tanous2017-10-247-6765/+9177
| | | | | | | | | | | | | | | | | | | | | | | | Upate get_routes to use the correct constness for its use case crow to set json_mode if json value is populated Delete std::array bytes API due to major efficiency issues. To be replaced with span API in near future Implement a catch block for handlers that can throw exceptions Implement direct handling of routes that end with / to better support redfish. /foo and /foo/ now invoke the same handler insead of issuing a 301 redirect Update nlohmann to latest version Implement one nlohmann endpoint with exceptions disabled Implement first pass at a IBM style rest-dbus interface Fix pam authentication to call dropbear auth methods Implements first pass at redfish interface. Shemas avaialble pass redfish validation 100% Use response json object rather than request json object. Update authorization middleware to be redfish compliant UPdate random token generation to be more efficient, and not base64 bytes, generate bytes directly Change-Id: I63cc2005c1a21f5c2f5168777a4e09f3c965a34f
* Large updates to webserverEd Tanous2017-10-1118-421/+1206
| | | | | | Do not merge yet Change-Id: I38c56844c1b0e3e8e5493c2705e62e6db7ee2102
* Lots of updates to webserver.Ed Tanous2017-08-085-131/+13111
| | | | | | | | | | | Make ssl keys consistent (and write to the correct location) Make sessions keyed by connection id Clean up logging frameworks Add new static files, and make firmware update work Make sensors work again Add better json handling Change-Id: I531a0fd7d583e049949cf27aa71544808fd7642d
* incrementalEd Tanous2017-06-225-30/+27
|
* incrementalEd Tanous2017-06-123-7/+225
|
* incrementalEd Tanous2017-06-061-2/+3
|
* IncrementalEd Tanous2017-05-231-1/+1
|
* incrementalEd Tanous2017-05-181-2/+2
|
* inrementalEd Tanous2017-05-121-7/+5
|
* incrementalEd Tanous2017-04-262-58/+123
|
* incrementalEd Tanous2017-04-251-9/+9
|
* upgrade hunter and pin version of opensslEd Tanous2017-04-251-34/+27
|
* incrementalEd Tanous2017-04-245-110/+115
|
* incrementalEd Tanous2017-04-183-15/+7
|
OpenPOWER on IntegriCloud