{"id":738,"date":"2019-08-22T07:16:30","date_gmt":"2019-08-22T14:16:30","guid":{"rendered":"http:\/\/dragonwarz.net\/?p=738"},"modified":"2019-12-06T15:33:20","modified_gmt":"2019-12-06T23:33:20","slug":"https-enabled","status":"publish","type":"post","link":"https:\/\/dragonwarz.net\/?p=738","title":{"rendered":"HTTPS Enabled!"},"content":{"rendered":"\n<p>I am now using HTTPS instead of HTTP.  I even have self-signed certificates generate automatically if they are not present in the ssl_files folder.  This allows 3 things. <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>If you don&#8217;t have your own certificates, it creates them when the program launches, creating a user-friendly experience.  If they are already in the folder, it simply loads them. <\/li><li>You can replace the certificate files in the ssl_files folder with your own to get the nice green bar in your browser.  <\/li><li>Simply delete all the files in the ssl_files folder, reboot the sensor and you have new certificates that are good for 5 years. <\/li><\/ol>\n\n\n\n<p>Initially, I thought that incorrect time on the sensor would not allow you to connect to the sensor through SSL, but I modified the time by 17 hours and it still connected just fine.  So that&#8217;s good, as I was worried when the Pi&#8217;s reboot or shut down for a bit, the time would drift without internet and you would be unable to configure it after that.  I&#8217;m glad I was wrong!  <\/p>\n\n\n\n<p>Now the sensors are actually decently secure!  With HTTP authentication and unique SSL generation per sensor, you can rest assured your commands and logins will not be &#8216;sniffed&#8217; off the network.  <\/p>\n\n\n\n<p>One last thing I wanted to do is redirect any HTTP traffic to HTTPS, but I&#8217;m not sure how to make that happen with the webserver module I&#8217;m using in Python (gevent&#8217;s pywsgi).  <\/p>\n\n\n\n<p>I have now started to work on updating documentation since a lot has changed.  Once that&#8217;s done, I&#8217;ll probably release another version.  <\/p>\n\n\n\n<p>On another note, I used chromes developer console to see the difference of page delivery sizes with gzip enabled.  It really helped on the plotly graph&#8217;s, as it cut the download size to 1\/4 and since they are usually about 4MBs, it makes a difference.   <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am now using HTTPS instead of HTTP. I even have self-signed certificates generate automatically if they are not present in the ssl_files folder. This allows 3 things. If you don&#8217;t have your own certificates, it creates them when the &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/dragonwarz.net\/?p=738\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,27,26,3],"tags":[33],"class_list":["post-738","post","type-post","status-publish","format-standard","hentry","category-programming","category-project","category-python","category-random","tag-kootnet-sensors"],"_links":{"self":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts\/738","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=738"}],"version-history":[{"count":1,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts\/738\/revisions"}],"predecessor-version":[{"id":739,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts\/738\/revisions\/739"}],"wp:attachment":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}