summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix authorization for LDAP usersRAJESWARAN THILLAIGOVINDAN2019-12-171-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modified the code to make an asynchronous call to GetUserInfo to get the user role for authorization. For local users, DBus matches are used to store user role map hot in memory. Hence, bmcweb has to know whether a user is a local user or LDAP user to get the role. To avoid this, removed the existing DBus matches and modified the code to call GetUserInfo to get the role of local users as well as LDAP users. Tested: - Created a local user having admin privilege and verified that he is able to restart the system /redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' - Created a local user having user privilege and verified that he is unauthorized to restart the system /redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' - Created a remote user having admin privilege and verified that he is able to restart the system /redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' - Created a remote user having user privilege and verified that he is unauthorized to restart the system /redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' - Tested Redfish ConfigureSelf privilege Signed-off-by: RAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com> Change-Id: Ic3e46a0c0aff2cf456c98048350e58e302011c57
* Revert "Fix authorization for LDAP users"James Feist2019-12-101-0/+4
| | | | | | | | | | | | | | | | This reverts commit 5e931ae994307babe6c3520cbaca6a7139acc81d. Reason for revert: Causing build failures /bmcweb/redfish-core/include/node.hpp: In member function ‘bool redfish::Node::isAllowedWithoutConfigureSelf(const crow::Request&)’: /bmcweb/redfish-core/include/node.hpp:182:36: error: ‘crow::persistent_data::UserRoleMap’ has not been declared crow::persistent_data::UserRoleMap::getInstance().getUserRole( When 900f949773795141266271107219ea019f2839cd was merged first this patch was not successfully rebased. Change-Id: I947d96362c7dadea5572888468a11fac5ee361d4 Signed-off-by: James Feist <james.feist@linux.intel.com>
* Fix authorization for LDAP usersRAJESWARAN THILLAIGOVINDAN2019-12-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modified the code to make an asynchronous call to GetUserInfo to get the user role for authorization. For local users, DBus matches are used to store user role map hot in memory. Hence, bmcweb has to know whether a user is a local user or LDAP user to get the role. To avoid this, removed the existing DBus matches and modified the code to call GetUserInfo to get the role of local users as well as LDAP users. Tested: - Created a local user having admin privilege and verified that he is able to restart the system /redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' - Created a local user having user privilege and verified that he is unauthorized to restart the system /redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' - Created a remote user having admin privilege and verified that he is able to restart the system /redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' - Created a remote user having user privilege and verified that he is unauthorized to restart the system /redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType": "GracefulRestart"}' Signed-off-by: RAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com> Change-Id: Ifd813e1af4dfcb7aeaba18e04b6c9767d2a5e95a
* Implement nbd-proxy as a part of bmcwebIwona Klimaszewska2019-11-211-0/+9
| | | | | | | | | | | | | | | | | Nbd-proxy is responsible for exposing websocket endpoint in bmcweb. It matches WS endpoints with unix socket paths using configuration exposed on D-Bus by Virtual-Media. Virtual-Media is then notified about unix socket availability through mount/unmount D-Bus methods. Currently, this feature is disabled by default. Tested: Integrated with initial version of Virtual-Media. Change-Id: I9c572e9841b16785727e5676fea1bb63b0311c63 Signed-off-by: Iwona Klimaszewska <iwona.klimaszewska@intel.com> Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
* Make references to crow less obviousEd Tanous2019-10-184-4/+4
| | | | | | | | | | | | | | | | | Recently, a number of people in the community have made the (admittedly easy) mistake that we use a significant portion of crow. Today, we use crow for the router, and the "app" structure, and even those have been significantly modified to meet the bmc needs. All other components have been replaced with Boost beast. This commit removes the crow mentions from the Readme, and moves the crow folder to "http" to camouflage it a little. No code content has changed. Tested: Code compiles. No functional change made to any executable code. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: Iceb57b26306cc8bdcfc77f3874246338864fd118
* Fix a bunch of warningsEd Tanous2019-10-102-3/+1
| | | | | | | | | | | | | | | using the list of warnings from here: https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100 Seems like a good place to start, and would improve things a bit type-wise. This patchset attempts to correct all the issues in one shot. Tested: It builds. Will test various subsystems that have been touched Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I588c26440e5a97f718a0f0ea74cc84107d53aa1e
* Redfish(Authorization): Add the privilege in the user session object.Ratan Gupta2019-07-091-0/+4
| | | | | | | | | This commit fetches the user privilege during creation of the session by making D-bus call and add the privilege in the user session object. Change-Id: I0e9da8a52df00fc753b13101066ce6d0be9e2ce3 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* Redfish: Add certificate service to manage HTTPS certificatesMarri Devender Rao2019-06-121-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements CertificateService schema to list the actions available. Implements CertificateLocations schema to list the certificates present in the system. Implements CertificateCollection schema to upload/list existing HTTPS certificates Implements Certificate schema to view existing HTTPS certificate Cater for reloading the SSL context after a certificate is uploaded. Fix Certificate signature validation failure At present bmcweb uses the certificate from "/home/root/server.pem" the same is modified to "/etc/ssl/certs/https/server.pem" as phosphor-certificate-manager uses the specified path to install/replace certificates. Bmcweb creates a self-signed certificate when certificate is not present. Catered for creating "/etc/ssl/certs/https/" direcotry structure so that self signed certificate is created in the path. Implements ReplaceCertificate action of Certificate Service for replacing existing HTTPS certificates Cleanup of older self-signed certificate at /home/root/server.pem 1. Tested schema with validator and no issues 2. Privilege map for certificate service is not yet pubished 2. GET on /redfish/v1/CertificateService/ "CertificateService": { "@odata.id": "/redfish/v1/CertificateService" }, 3. GET on /redfish/v1/CertificateService/CertificateLocations/ "@odata.context": "/redfish/v1/$metadata#CertificateLocations.CertificateLocations", "@odata.id": "/redfish/v1/CertificateService/CertificateLocations", "@odata.type": "#CertificateLocations.v1_0_0.CertificateLocations", "Description": "Defines a resource that an administrator can use in order to locate all certificates installed on a given service", "Id": "CertificateLocations", "Name": "Certificate Locations" 4.POST on /redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates { Returns contents of certificate "@odata.context": "/redfish/v1/$metadata#Certificate.Certificate", "@odata.id": "/redfish/v1/AccountService/LDAP/Certificates/1", "@odata.type": "#Certificate.v1A_0_0.Certificate", "Id": "1", "Issuer": { ... ... } 5.GET on /redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/ { "@odata.context": "/redfish/v1/$metadata#CertificateCollection.CertificateCollection", "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates", "@odata.type": "#CertificateCollection.CertificatesCollection", "Description": "A Collection of HTTPS certificate instances", "Members": [ { "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1" } ], "Members@odata.count": 1, "Name": "HTTPS Certificate Collection" } 6.GET on /redfish/v1/CertificateService/CertificateLocations/ { "@odata.context": "/redfish/v1/$metadata#CertificateLocations.CertificateLocations", "@odata.id": "/redfish/v1/CertificateService/CertificateLocations", "@odata.type": "#CertificateLocations.v1_0_0.CertificateLocations", "Description": "Defines a resource that an administrator can use in order to locate all certificates installed on a given service", "Id": "CertificateLocations", "Links": { "Certificates": [ { "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1" } ], "Certificates@odata.count": 1 }, "Name": "Certificate Locations" } 7.GET on /redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1 { "@odata.context": "/redfish/v1/$metadata#Certificate.Certificate", "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1", "@odata.type": "#Certificate.v1_0_0.Certificate", "CertificateString": "-----BEGINCERTIFICATE-----\n....\n-----ENDCERTIFICATE-----\n", "CertificateType": "PEM", "Description": "HTTPS Certificate", "Id": "1", "Issuer": { } 8. Verified SSL context is reloaded after a certificate is installed. 9.curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -X POST https://${bmc}/redfish/v1/CertificateService/Actions/CertificateService.ReplaceCertificate/ -d @data_https.json { "@odata.context": "/redfish/v1/$metadata#Certificate.Certificate", "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1", "@odata.type": "#Certificate.v1_0_0.Certificate", "CertificateString": "-----BEGIN CERTIFICATE----END CERTIFICATE-----\n", "Description": "HTTPS certificate", "Id": "1", "Issuer": { } 4. data_https.json file contents { "CertificateString": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDClW1COSab2O0W\nW0SgTzLxQ1Igl4EpbEmTK8CAQ+wI7loTDZ7sZwYdf6yc9TAs/yNKjlJljgedGszv\nbC7sPNpH4FA63kaM6TbBBKTRshwZ3myXiBOOkOBs6w6V7+c7uEPcMFge6/4W1VXD\nReMi016cnPWZsmQyGzpmPM49YNEDZBfdKZ/pLuCYc9L9t706U7FrUSGfM7swB+mC\n8NH9qMixMuWAV9SBvzUWI6p4OCmN8a/F+4lOdbPMVEUqQ0hCBCjGM4qmiy/5Ng6y\n6rKeJlUdmOSTk8ojrNGcOXKh0nRafNEQFkIuoPHt8k5B/Yw2CX6s2BoGwvF+hS03\n+z3qVSw3AgMBAAECggEBAKpe92kybRGr3/rhMrdCYRJJpZEP1nGUdN89QbGMxxAS\n0h84n9vRYNNXRKWxMNtVEWtoLdDpiNUP8Dv59yO1LFIen2DL2e3rDJv4Gu/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P6Yh3jePIIwTr3bpxBGrwNLly8fPf16q4bWRIAcI3ZgLOhsrN\nLfD2kf56oYViM44d54Wa0qjuCfeTnJ46x/lo6w2kB9IzF7lwpipMU7+AG8ijDdaQ\nn8t0nADpv6tNNargLcOTTfJ0/P2PaKxwA1B88NhjlymBnNbz4epIn4T3KyysgS62\nzwqs66LPWoDerzc=\n-----END CERTIFICATE-----", "CertificateType": "PEM", "CertificateUri": { "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1" } } Change-Id: I2acbf8afa06bbf7d029d4971f7ab3b3988f5f060 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* vm_websocket: Add websocket handlerAdriana Kobylak2019-05-211-0/+5
| | | | | | | | | | | | | | | | | | | On receiving a websocket request on endpoint /vm/0/0, connect to the nbd-proxy app and send/receive stdio. Tested: Verified that the host could see the virtual media usb device, mounted it manually and checked the contents of the iso file used for the test were there. To test, used the html and js script: https://github.com/openbmc/jsnbd/tree/master/web and an Ubuntu iso image file. Verified that it worked after closing the websocket (using the stop function from the html file), to check that the processes were cleaned up and freed up for a subsequent request. Change-Id: I0b070310b070c086d67d0ae3e2c165551d6b87cc Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Implement KVM websocket proxy in bmcwebEd Tanous2019-02-212-81/+2
| | | | | | | | | | | | | | | | | | | This patchset implements a KVM websocket proxy designed to interoperate with phosphor-webui and KVM. in short, IP address 127.0.0.1:5900 is proxied to the websocket. This allows someone to connect from a browser session. Requires patchset here for the phosphor-webui side: https://gerrit.openbmc-project.xyz/#/c/openbmc/phosphor-webui/+/10268/ and requires the kvm patches here: https://gerrit.openbmc-project.xyz/#/c/openbmc/meta-phosphor/+/13536/ Tested By: Launched webui, observed KVM. Moved mouse, and typed on keyboard, changes appeared on host system. Change-Id: I407488f4b16be208b188a0abc19954a0243af173 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* bmcweb: Remove deprecatd ASIO interfacesEd Tanous2019-01-126-18/+18
| | | | | | | | | | | 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>
* bmcweb: Fix header includes to be more specificEd Tanous2018-12-041-1/+1
| | | | | | | | | | | | | In a lot of cases, the header include patterns were really bad. For example, pulling in all of boost asio via boost/asio.hpp, rather than pulling in the lesser equivalents. This should reduce the build times, although I have no data on that at the moment. Tested By: Code still compiles Change-Id: I0f4656d35cf6d7722d1b515baaccbfc27cf98961 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Use target_compile_definitions() for build flagsJason M. Bills2018-11-161-1/+0
| | | | | | | | | | | | | | This change moves the bmcweb build flags out of settings.hpp and into the CMakeLists.txt file as target_compile_definitions(). This makes it so it is no longer required to #include settings.hpp to use build flags in the source. Tested: Enabled and disabled some Redfish flags and confirmed that the desired components were added and removed. Change-Id: Ibeedb4fc8f3dcc286c73843823693a04c55c0615 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* cleanup: close open filesPatrick Venture2018-10-162-0/+2
| | | | | | | | | | Clean up missing fclose calls. [src/getvideo_main.cpp:77]: (error) Resource leak: fp [src/ast_video_puller_test.cpp:56]: (error) Resource leak: fp Change-Id: I4d460e861a6275bfa6c02a319894d3154aec8ee7 Signed-off-by: Patrick Venture <venture@google.com>
* Fix merge conflict, and enable SOLEd Tanous2018-10-161-0/+5
| | | | | | | | | | A merge conflict caused the SOL websocket code to get removed from master. This resolves the merge conflict, and reenables SOL in bmcweb. Tested By: Launched SOL console in phosphor-webui, and observed appropriate behavior. Change-Id: I88116fdfb488b6c41aa859e4904b38e918111d04
* Move to clang-format-6.0Ed Tanous2018-09-0514-1689/+1899
| | | | | | | | This commit moves the codebase to the lastest clang-format file from upstream, as well as clang-format-6.0. Change-Id: Ice8313468097c0c42317fbb9e10ddf036e8cff4c Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Change _PHOSPHOR_WEBUI to _STATIC_HOSTINGAndrew Geissler2018-08-141-1/+1
| | | | | | | | Changing this config option to better represent what it does, which is to host the static files from /usr/share/www/ Change-Id: Iaf785666f59f937567b6d0319c884c8ed29d2844 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Move over to upstream c++ styleEd Tanous2018-07-2612-313/+315
| | | | | | | | | | | | | | | | | | This patchset moves bmcweb over to the upstream style naming conventions for variables, classes, and functions, as well as imposes the latest clang-format file. This changeset was mostly built automatically by the included .clang-tidy file, which has the ability to autoformat and auto rename variables. At some point in the future I would like to see this in greater use, but for now, we will impose it on bmcweb, and see how it goes. Tested: Code still compiles, and appears to run, although other issues are possible and likely. Change-Id: If422a2e36df924e897736b3feffa89f411d9dac1 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Make SessionStore a proper singletonBorawski.Lukasz2018-07-252-16/+33
| | | | | | | | | | | | | | | - SessionStore class now has a proper singleton structure - session_storage_singleton.hpp is removed - from_json(..) function for SessionStore is changed to a specialized template - minor cosmetic fixes added - Move the template class usages of Crow App over to a non-template parameter Change-Id: Ic9effd5b7bac089a84c80a0caa97bd46d4984416 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Implement actions interfaceEd Tanous2018-06-291-0/+51
| | | | | | | | | | | This commit implements the actions interface, and cleans up some compatibility issues between phosphor rest and bmcweb. This should be considered WIP, as it requires patches to some of the dependent libraries to build (mostly sdbuspplus). Change-Id: Ida91461b0a0aff5d2d962e9e4053f056f4732af6 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Implement feature selection in bmcwebEd Tanous2018-06-291-3/+16
| | | | | | | | | This patchsets implements feature selection in BMCWEB using compile time macros. This allows certain features, security implementations, and other things to be selected at compile time. Change-Id: Ic14343d36d82830e6cf51311ca886a90749ae6a7 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Make bmcweb image upload compatible with upstream.Ed Tanous2018-06-291-3/+4
| | | | | | | | This change moves the image upload logic out of the intel oem namespace, and makes it 1:1 compatible with phosphor rest dbus. This is to allow a seamless transition in the future. Change-Id: I243237357a672934c05bf072e7ff1a5955af0f5e
* Boost beastEd Tanous2018-06-297-378/+74
| | | | | | | | 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 bmcweb over to sdbusplusEd Tanous2018-06-291-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Introduce Thermal schemaLewanczyk, Dawid2018-05-181-1/+3
| | | | | | | | | | | | | | | | | | | Changes: -redfish.hpp add thermal node installation -thermal.hpp add thermal schema for chassis -sensor.hpp add support for retrieving: temperature, and fan Verification: -web server: no regression -RSV: pass -build on x86 and ASPEED This patchset builds on Dawids original. Change-Id: Ia8e40edff3c722fa02a161248bcdf602e36e3e62 Signed-off-by: Lewanczyk, Dawid <dawid.lewanczyk@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Remove hunter and submodulesEd tanous2018-04-241-0/+1
| | | | | | | And use external project instead. This should make it easier to keep our systems up to date with yocto. Change-Id: Id2c9f3e474eebf2194eaf58b0c572f7a1421def6
* Remove multithreaded code, and make crow use a single threadEd Tanous2018-04-221-2/+3
| | | | | Change-Id: I39e9ba84ab3464cf75b5bba82badb729525bf3b9 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Disable logging when in release modeEd Tanous2018-04-221-2/+0
| | | | | | | This increases the performance of the webserver quite a bit. Change-Id: I20714d89163cf30c65afd18d16f4fd16c06824d5 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Improved Refish subroutesBorawski.Lukasz2018-03-271-4/+2
| | | | | | | | | | - 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>
* Redfish privilegesBorawski.Lukasz2018-03-271-1/+1
| | | | | | | | | | | | Redfish privilege authorization subsystem controlled by the privilege_registy.json configuration file. PropertyOverrides, SubordinateOverrides and ResourceURIOverrides are not yet implemented. Change-Id: I4d5670d557f4da172460ada3512e015830dab667 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Session and SessionCollectionKowalski, Kamil2018-02-051-1/+3
| | | | | | | | | | | 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>
* Allow for systemd socket activationVernon Mauery2018-02-051-3/+26
| | | | | | | | If spawned via systemd's socket activation mechanism, use that socket instead of opening a new one to listen on. Change-Id: Ia35110902b30b08355edf2fe4041e8377582e72c Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Service RootBorawski.Lukasz2018-01-241-0/+3
| | | | | Change-Id: Ibf9d463802d77014852a92ecfcb8096324f3670f Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
* Remove unused base64 componentEd Tanous2018-01-031-67/+0
| | | | | | Base 64 is no longer used in the auth module, so this is dead code Change-Id: Ieafe522249fd8dfe0058ba63798ff5263b4b9027
* Remove g3logEd Tanous2017-10-301-13/+0
| | | | Change-Id: Id82dcc2e9743482e3df72796f43b1a5cf4aaf504
* Update get_routes to use trie for efficiencyEd Tanous2017-10-301-4/+9
| | | | | | | | | | | | | | | | | 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
* Update WebserverEd Tanous2017-10-242-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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-118-285/+91
| | | | | | Do not merge yet Change-Id: I38c56844c1b0e3e8e5493c2705e62e6db7ee2102
* Add System Configuration PageFeist, James2017-08-221-0/+15
| | | | | | Parses json file and writes entites to page. Change-Id: I486070deb48e0b447c904542148dbc3721f1facf
* Turn auth back onEd Tanous2017-08-091-2/+1
| | | | Change-Id: I9080032e8863f7c12778e02e08632d51587fbed9
* Lots of updates to webserver.Ed Tanous2017-08-082-112/+74
| | | | | | | | | | | 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
* update sensor pageEd Tanous2017-06-281-23/+27
|
* Make dbus connections allow multiple connectionsEd Tanous2017-06-261-33/+19
| | | | Fix static dependencies
* incrementalEd Tanous2017-06-222-192/+74
|
* incrementalEd Tanous2017-06-126-285/+54
|
* incrementalEd Tanous2017-06-123-594/+38
|
* incrementalEd Tanous2017-06-062-28/+115
|
* Disable file loggingEd Tanous2017-05-231-4/+3
|
* Re-enable SSLEd Tanous2017-05-181-1/+1
|
* testEd Tanous2017-05-161-2/+2
|
OpenPOWER on IntegriCloud