Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7240 Scaling HDFS
  3. HDFS-12693

Ozone: Enable XFrame options for KSM/SCM web ui

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • HDFS-7240
    • HDFS-7240
    • ozone
    • None
    • Reviewed

    Description

      According to the discussion about security checklist on dev list I started to check the security features of the existing HttpServer2 and found that by default the XFrame option headers are disabled. This patch enables it by default for SCM/KSM server similar to the Namenode/Datanode webui.

      (Note: Even if the only form on the SCM/KSM ui-s is the standard LogLevel form, I think it's a good practice to enable it by default.)

      Test:

      Without the patch (clean build, SCM ui):

       curl -v localhost:9876/jmx -o /dev/null                                                                                                                                       * TCP_NODELAY set
      * Connected to localhost (::1) port 9876 (#0)
      > GET /jmx HTTP/1.1
      > Host: localhost:9876
      > User-Agent: curl/7.55.1
      > Accept: */*
      > 
      < HTTP/1.1 200 OK
      < Date: Sat, 21 Oct 2017 19:54:43 GMT
      < Cache-Control: no-cache
      < Expires: Sat, 21 Oct 2017 19:54:43 GMT
      < Date: Sat, 21 Oct 2017 19:54:43 GMT
      < Pragma: no-cache
      < Content-Type: application/json; charset=utf8
      < Access-Control-Allow-Methods: GET
      < Access-Control-Allow-Origin: *
      < Transfer-Encoding: chunked
      

      With the patch:

      curl -v localhost:9876/jmx -o /dev/null                                                                                                                                     * Connected to localhost (::1) port 9876 (#0)
      > GET /jmx HTTP/1.1
      > Host: localhost:9876
      > User-Agent: curl/7.55.1
      > Accept: */*
      > 
      < HTTP/1.1 200 OK
      < Date: Sat, 21 Oct 2017 19:55:07 GMT
      < Cache-Control: no-cache
      < Expires: Sat, 21 Oct 2017 19:55:07 GMT
      < Date: Sat, 21 Oct 2017 19:55:07 GMT
      < Pragma: no-cache
      < Content-Type: application/json; charset=utf8
      < X-FRAME-OPTIONS: SAMEORIGIN
      < Access-Control-Allow-Methods: GET
      < Access-Control-Allow-Origin: *
      < Transfer-Encoding: chunked
      

      Note: X-FRAME-OPTIONS header exists at the second case.

      Attachments

        Activity

          People

            elek Marton Elek
            elek Marton Elek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: