<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bmcweb/crow, branch master</title>
<subtitle>OpenBMC Web server</subtitle>
<id>https://git.raptorcs.com/git/bmcweb/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/bmcweb/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bmcweb/'/>
<updated>2019-10-18T16:20:11+00:00</updated>
<entry>
<title>Make references to crow less obvious</title>
<updated>2019-10-18T16:20:11+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>ed.tanous@intel.com</email>
</author>
<published>2019-10-10T22:39:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bmcweb/commit/?id=c94ad49bc747e7a7170287b9f4c859e3638cf432'/>
<id>urn:sha1:c94ad49bc747e7a7170287b9f4c859e3638cf432</id>
<content type='text'>
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 &lt;ed.tanous@intel.com&gt;
Change-Id: Iceb57b26306cc8bdcfc77f3874246338864fd118
</content>
</entry>
<entry>
<title>Fix a bunch of warnings</title>
<updated>2019-10-10T23:25:26+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>ed.tanous@intel.com</email>
</author>
<published>2019-07-09T23:24:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bmcweb/commit/?id=271584ab78b4c1926f766aa26ddfde7da329059f'/>
<id>urn:sha1:271584ab78b4c1926f766aa26ddfde7da329059f</id>
<content type='text'>
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 &lt;ed.tanous@intel.com&gt;
Change-Id: I588c26440e5a97f718a0f0ea74cc84107d53aa1e
</content>
</entry>
<entry>
<title>Fix role map persistence</title>
<updated>2019-10-02T20:16:04+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>ed.tanous@intel.com</email>
</author>
<published>2019-09-19T18:53:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bmcweb/commit/?id=ca0c93bb09587903a6dd43926799a967f10bafcd'/>
<id>urn:sha1:ca0c93bb09587903a6dd43926799a967f10bafcd</id>
<content type='text'>
Now that we have a live role map, there's no need to track the users
role in the session object, we have the ability to get it every time.

This issue manifests itself in a fairly nefarious situation:
1. Log in, user is assigned a session, with role
2. BMC reboots.  Session is persisted and restored, but role is removed.
3. User now has a valid session, but isn't authorized to do anything,
which results in a 403.  In the webui, this results in an inability to
log out.

Tested (TODO):
Log in and log out functions.  Reboot BMC, verify that webui doesn't log
back out or return 403.

Signed-off-by: Ed Tanous &lt;ed.tanous@intel.com&gt;
Change-Id: I9bbf682d062150aa1c877217f037221471e58e9f
</content>
</entry>
<entry>
<title>Don't throw if no-content is provided</title>
<updated>2019-09-16T22:29:42+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>ed.tanous@intel.com</email>
</author>
<published>2019-09-03T17:11:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bmcweb/commit/?id=6295becabb9edba2edb53a3c0dddc13d2ffac8dd'/>
<id>urn:sha1:6295becabb9edba2edb53a3c0dddc13d2ffac8dd</id>
<content type='text'>
In a perfect world, we would implement all no-content cases correctly,
and never set a no-content return code, then provide content.  In
practice, in an async context, this is difficult to manage, as has been
proven a couple times to be beyond what we're able to review.  This
error should be made less fatal, and still return a response to the
user, rather than throwing and closing the connection entirely.

This patchset implements a corrective action where the content is
dropped in the connection if the handler sets the no-content code.

Tested:
Still need to test.  In theory, not possible without a unit test for a
buggy handler.

Signed-off-by: Ed Tanous &lt;ed.tanous@intel.com&gt;
Change-Id: Ie6fea0c3fef107578b855b7c43a634d51b2064de
</content>
</entry>
<entry>
<title>Fix SSL-disabled build</title>
<updated>2019-09-16T14:45:25+00:00</updated>
<author>
<name>Jason M. Bills</name>
<email>jason.m.bills@linux.intel.com</email>
</author>
<published>2019-09-13T15:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bmcweb/commit/?id=e3e2961881040e7632bd139dcf722c2afa8408f1'/>
<id>urn:sha1:e3e2961881040e7632bd139dcf722c2afa8408f1</id>
<content type='text'>
This fixes a build error when BMCWEB_INSECURE_DISABLE_SSL is set to
ON.

Tested:
Set BMCWEB_INSECURE_DISABLE_SSL to On and built successfully.

Change-Id: Iabacff92098fff61c902b2c40873d66987811773
Signed-off-by: Jason M. Bills &lt;jason.m.bills@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Redfish(Authorization): Map the user role with the Redfish privileges</title>
<updated>2019-07-11T01:29:29+00:00</updated>
<author>
<name>Ratan Gupta</name>
<email>ratagupt@linux.vnet.ibm.com</email>
</author>
<published>2019-04-03T05:09:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bmcweb/commit/?id=6f3595683739a6528e98b38cc82afbc60f9fda34'/>
<id>urn:sha1:6f3595683739a6528e98b38cc82afbc60f9fda34</id>
<content type='text'>
This commit gets the role of the user from the session object and
map it with the redfish privileges and then allow/reject the asked
operation depending on the userprivileges and the entity privileges.

Change-Id: I40be06c28e80b47fe76891cacf863f8495bace88
Signed-off-by: Ratan Gupta &lt;ratagupt@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>Add __FILE__ and __LINE__ to log prints</title>
<updated>2019-07-09T16:39:17+00:00</updated>
<author>
<name>James Feist</name>
<email>james.feist@linux.intel.com</email>
</author>
<published>2019-07-08T17:26:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bmcweb/commit/?id=a0dba0f7987d88898eae3fa253bd068fc8b9dc67'/>
<id>urn:sha1:a0dba0f7987d88898eae3fa253bd068fc8b9dc67</id>
<content type='text'>
Some error prints are nondescriptive and this helps
tell where the error happened

Tested: Compiled with debug and saw error prints with
filename and line number.

Jul 08 18:52:26 intel-obmc bmcweb[1348]: (2019-07-08 18:52:26) [INFO "webserver_main.cpp":95] bmcweb (Jul  8 2019: 19:24:43)
Jul 08 18:52:26 intel-obmc bmcweb[1348]: (2019-07-08 18:52:26) [INFO "webserver_main.cpp":34] attempting systemd socket activation
Jul 08 18:52:26 intel-obmc bmcweb[1348]: (2019-07-08 18:52:26) [INFO "webserver_main.cpp":38] Starting webserver on socket handle 3
Jul 08 18:52:28 intel-obmc bmcweb[1348]: (2019-07-08 18:52:28) [INFO "http_server.h":182] Building SSL Context file="/etc/ssl/certs/https/server.pem"
Jul 08 18:52:28 intel-obmc bmcweb[1348]: Checking certs in file /etc/ssl/certs/https/server.pem
Jul 08 18:52:28 intel-obmc bmcweb[1348]: Found an EC key
Jul 08 18:52:28 intel-obmc bmcweb[1348]: (2019-07-08 18:52:28) [INFO "app.h":186] app::ssl context use_count=2
Jul 08 18:52:28 intel-obmc bmcweb[1348]: (2019-07-08 18:52:28) [INFO "http_server.h":157] iBMC server is running, local endpoint [::]:443
Jul 08 18:52:28 intel-obmc bmcweb[1348]: (2019-07-08 18:52:28) [DEBUG "http_connection.h":267] 0xb43b48 Connection open, total 1

Change-Id: I9838d1863bcdd2d8401d3237729a8e7f134bfd07
Signed-off-by: James Feist &lt;james.feist@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Response for insufficient privileges to 403</title>
<updated>2019-06-20T16:39:35+00:00</updated>
<author>
<name>Gunnar Mills</name>
<email>gmills@us.ibm.com</email>
</author>
<published>2019-06-18T12:39:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bmcweb/commit/?id=961c9d9cb05b8da1e4fa8f8e04872dad3b234879'/>
<id>urn:sha1:961c9d9cb05b8da1e4fa8f8e04872dad3b234879</id>
<content type='text'>
Currently, if the user does not have sufficient privileges
a 401 (Unauthorized) is returned.

A 403 (Forbidden) should be returned instead.
This change does this.

The Web Interface forces the user to reauthenticate on a 401.
https://github.com/openbmc/phosphor-webui/blob/e364faa0314c8c98a31260bf69df78a104b106a1/app/common/services/apiInterceptor.js#L50

Maybe not the best policy but a 401 roughly means
"Not or incorrectly authenticated, please reauthenticate".

A 403 roughly means "As this user you don't have permission".

See
https://stackoverflow.com/questions/3297048/403-forbidden-vs-401-unauthorized-http-responses
and
http://www.dirv.me/blog/2011/07/18/understanding-403-forbidden/index.html

Tested: None.
Change-Id: I07a89dc542002c6aeb66da96822fdb466528c383
Signed-off-by: Gunnar Mills &lt;gmills@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>Redfish: Add certificate service to manage HTTPS certificates</title>
<updated>2019-06-12T22:53:05+00:00</updated>
<author>
<name>Marri Devender Rao</name>
<email>devenrao@in.ibm.com</email>
</author>
<published>2019-01-21T16:27:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bmcweb/commit/?id=5968caee7ccf978755a9a63d225965101a0c0378'/>
<id>urn:sha1:5968caee7ccf978755a9a63d225965101a0c0378</id>
<content type='text'>
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/rhMrdC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OAi9TVbs\nRGlIHBl38oSwKUayXBTY/vVeSLls90giUAOjswoRbBBQZvKyfEuFpc1zUsrhGLDC\n/6DuRt9l0DWcMcmP6Yh3jePIIwTr3bpxBGrwNLly8fPf16q4bWRIAcI3ZgLOhsrN\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 &lt;devenrao@in.ibm.com&gt;
Signed-off-by: Ed Tanous &lt;ed.tanous@intel.com&gt;
</content>
</entry>
<entry>
<title>Add security headers to websockets</title>
<updated>2019-05-29T21:16:49+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>ed.tanous@intel.com</email>
</author>
<published>2019-05-22T21:28:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bmcweb/commit/?id=fe5b216f3bd0dde507aeedd4f5ad7b001dc6de04'/>
<id>urn:sha1:fe5b216f3bd0dde507aeedd4f5ad7b001dc6de04</id>
<content type='text'>
websocket connections are by definition temporal, and cannot be cached.
Unfortunately, certain security scanners don't see it that way, and flag
errors on lack of CSP, XSS, and Content-Type headers when giving a
websocket upgrade response.

This commit adds the:
Strict-Transport-Security
Pragma
Cache-Control
Content-security-policy
X-XSS-Protection
X-Content-Type-Options

Headers to the response when an upgrade occurs, to make the security
scanners happy.

Tested:
Opened the main application, obseved the /subscribe api.

Signed-off-by: Ed Tanous &lt;ed.tanous@intel.com&gt;
Change-Id: If76dc54f6501b3eb2caf44913d254a8b32d3fd30
</content>
</entry>
</feed>
