<div dir="ltr"><div>Hi Ed,</div><div><br></div><div>I made the changes suggested by you. But in building the system, I am getting some configuration error. Please find the following log data.<br></div><div><br></div><div>Log data follows:<br>| DEBUG: Executing shell function do_configure<br>| CMAKE_MODULE_PATH=/home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/bmcweb/1.0+gitAUTOINC+f4c4dcf438-r0/git/cmake<br>| -- The CXX compiler identification is GNU 7.3.0<br>| -- The C compiler identification is GNU 7.3.0<br>| -- Check for working CXX compiler: /home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/bmcweb/1.0+gitAUTOINC+f4c4dcf438-r0/recipe-sysroot-native/usr/bin/arm-openbmc-linux-gnueabi/arm-openbmc-linux-gnueabi-g++<br>| -- Check for working CXX compiler: /home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/bmcweb/1.0+gitAUTOINC+f4c4dcf438-r0/recipe-sysroot-native/usr/bin/arm-openbmc-linux-gnueabi/arm-openbmc-linux-gnueabi-g++ -- works<br>| -- Detecting CXX compiler ABI info<br>| -- Detecting CXX compiler ABI info - done<br>| -- Detecting CXX compile features<br>| -- Detecting CXX compile features - done<br>| -- Check for working C compiler: /home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/bmcweb/1.0+gitAUTOINC+f4c4dcf438-r0/recipe-sysroot-native/usr/bin/arm-openbmc-linux-gnueabi/arm-openbmc-linux-gnueabi-gcc<br>| -- Check for working C compiler: /home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/bmcweb/1.0+gitAUTOINC+f4c4dcf438-r0/recipe-sysroot-native/usr/bin/arm-openbmc-linux-gnueabi/arm-openbmc-linux-gnueabi-gcc -- works<br>| -- Detecting C compiler ABI info<br>| -- Detecting C compiler ABI info - done<br>| -- Detecting C compile features<br>| -- Detecting C compile features - done<br>| -- Boost version: 1.64.0<br>| -- Found OpenSSL: /home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/bmcweb/1.0+gitAUTOINC+f4c4dcf438-r0/recipe-sysroot/usr/lib/libcrypto.so (found version "1.0.2n")<br>| OPENSSL_INCLUDE_DIR /home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/bmcweb/1.0+gitAUTOINC+f4c4dcf438-r0/recipe-sysroot/usr/include<br>| CMAKE_BUILD_TYPE=<br>| -- Found ZLIB: /home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/bmcweb/1.0+gitAUTOINC+f4c4dcf438-r0/recipe-sysroot/usr/lib/libz.so (found version "1.2.11")<br>| -- Performing Test PAM_MESSAGE_CONST<br>| -- Performing Test PAM_MESSAGE_CONST - Success<br>| -- Found PAM: /home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/bmcweb/1.0+gitAUTOINC+f4c4dcf438-r0/recipe-sysroot/lib/libpam.so;/home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/bmcweb/1.0+gitAUTOINC+f4c4dcf438-r0/recipe-sysroot/usr/lib/libdl.so<br>| -- Configuring done<br>| CMake Error in CMakeLists.txt:<br>|  <b> Imported target "boost-dbus" includes non-existent path<br>| <br>|     "/home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/boost-dbus/1.0+gitAUTOINC+70f79f4d66-r0/recipe-sysroot/usr/include/dbus-1.0"</b><br>| <br>|   in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:<br>| <br>|   * The path was deleted, renamed, or moved to another location.<br>| <br>|   * An install or uninstall procedure did not complete successfully.<br>| <br>|   * The installation package was faulty and references files it does not<br>|   provide.<br>| <br>| <br>| <br>| CMake Error in CMakeLists.txt:<br>|  <b> Imported target "boost-dbus" includes non-existent path<br>| <br>|     "/home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/boost-dbus/1.0+gitAUTOINC+70f79f4d66-r0/recipe-sysroot/usr/include/dbus-1.0"</b><br>| <br>|   in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:<br>| <br>|   * The path was deleted, renamed, or moved to another location.<br>| <br>|   * An install or uninstall procedure did not complete successfully.<br>| <br>|   * The installation package was faulty and references files it does not<br>|   provide.<br>| <br>| <br>| <br>| -- Generating done<br>| CMake Warning:<br>|   Manually-specified variables were not used by the project:<br>| <br>|     CMAKE_INSTALL_BINDIR<br>|     CMAKE_INSTALL_DATAROOTDIR<br>|     CMAKE_INSTALL_INCLUDEDIR<br>|     CMAKE_INSTALL_LIBDIR<br>|     CMAKE_INSTALL_LIBEXECDIR<br>|     CMAKE_INSTALL_LOCALSTATEDIR<br>|     CMAKE_INSTALL_SBINDIR<br>|     CMAKE_INSTALL_SHAREDSTATEDIR<br>|     CMAKE_INSTALL_SYSCONFDIR<br>| <br>| <br>| -- Build files have been written to: /home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/bmcweb/1.0+gitAUTOINC+f4c4dcf438-r0/build<br>| WARNING: exit code 1 from a shell command.<br>| ERROR: Function failed: do_configure (log file is located at /home/akash/Pictures/openbmc/build/tmp/work/armv6-openbmc-linux-gnueabi/bmcweb/1.0+gitAUTOINC+f4c4dcf438-r0/temp/log.do_configure.17054)</div><div><br></div><div><br></div><div><br></div><div>Thanks and Regards,</div><div><br></div><div>Akash G J<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 7, 2018 at 7:54 PM, Tanous, Ed <span dir="ltr"><<a href="mailto:ed.tanous@intel.com" target="_blank">ed.tanous@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="EN-US">
<div class="m_8273620602523987487WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">This a security measure in bmcweb to prevent cross site scripting.  If you’re running phosphor-webui from another machine, you’re essentially running cross site
 scripting as a development measure, which is exactly what the BMC sees, and the browser squashes the request as a suspected XSS attack.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">The easiest way to make this work for testing is to go to this file:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://github.com/openbmc/bmcweb/blob/master/include/security_headers_middleware.hpp" target="_blank">https://github.com/openbmc/<wbr>bmcweb/blob/master/include/<wbr>security_headers_middleware.<wbr>hpp</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">and comment out lines 42-44, which set headers to prevent the bmc squashing the request.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">It’s been a while since I’ve developed like that, but you likely also need to add a couple headers as well<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">req.addHeader(“Access-Control-<wbr>Allow-Origin”, “*”);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">req.addHeader(“Access-Control-<wbr>Allow-Methods”, “GET, POST, PUT, PATCH”);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I know you’re not the first person to hit this unexpectedly.  If you get a header recipe that allows development, it would be great if you could codify it into
 an option called BMC_INSECURE_ALLOW_XSS, add it to the build configuration, and put it up for a gerrit review;  I’m fairly certain it would help others.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">-Ed<u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_8273620602523987487__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><a name="m_8273620602523987487______replyseparator"></a><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> AKASH G J [mailto:<a href="mailto:akashgj91@gmail.com" target="_blank">akashgj91@gmail.com</a>]
<br>
<b>Sent:</b> Tuesday, August 7, 2018 3:13 AM<br>
<b>To:</b> Tanous, Ed <<a href="mailto:ed.tanous@intel.com" target="_blank">ed.tanous@intel.com</a>><br>
<b>Cc:</b> <a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a><br>
<b>Subject:</b> Re: Phosphor Web-ui: Server unreachable<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hi Ed,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Sorry for the late reply. I was on leave for last week.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I am hosting phosphor-webui on a different machine and trying to connect the BMC board using its IP address. I am using bmcweb platform. When I tried to login, the following message appeared in browser console.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at
<a href="https://%3cBMC-IP%3e/login" target="_blank">https://<BMC-IP>/login</a>. (Reason: CORS request did not succeed).<br>
<unavailable> activity-stream.bundle.js:<wbr>3170:9<br>
CSI/tbsd_ cb=gapi.loaded_0:458:127<br>
CSI/_tbnd cb=gapi.loaded_0:458:127<br>
CSI/tbsd_ cb=gapi.loaded_0:458:127<br>
CSI/_tbnd cb=gapi.loaded_0:458:127<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks and Regards,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Akash<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Jul 30, 2018 at 11:06 PM, Ed Tanous <<a href="mailto:ed.tanous@intel.com" target="_blank">ed.tanous@intel.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">On 07/30/2018 05:04 AM, AKASH G J wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Hi Team,<br>
<br>
I added phosphor-webui into the Linux image and set up client side of the web interface. In the client side of web interface I could able to give the IP address, username and password. After entering all those details, it is showing "server unreachable". But
 I could able to ping the server board and ssh into the system. Please someone help to resolve the problem.<br>
<br>
<br>
<br>
Thanks and Regards,<br>
<br>
Akash G J<u></u><u></u></p>
</blockquote>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal">We need some basic information to help you troubleshoot.  You might also find faster responses on irc;  Most of the people involved in the web infrastructure are online there.<br>
<br>
1. What platform are you using?<br>
2. If not one of the upstream platforms, which web server is your platform using?  (probably one of phosphor-rest, bmcweb, or phosphor-rest+nginx)<br>
3. When you open up the debugger window in your chosen browser (usually the F12 key) then go to the network tab and attempt to log in, what do you see?  You should see an attempt to get to the /login url, with some kind of error code (maybe 401, maybe 500,
 maybe something else).  We'll need that to help troubleshoot.<br>
4. Is there anything else strange about your setup that you might think would contribute to your issue?<br>
5. Are you hosting phosphor-webui from a different machine from the BMC.  Depending on what server you are using, there are likely security settings preventing cross site scripting that are blocking you.<u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div>