Commit Graph

93 Commits (da8994e4b5d66aebdcd669f68c2587275a03db63)

Author SHA1 Message Date
Daniel Høyer Iversen 11c07440fe Accept login from approved ips without password (#3427) 2016-09-18 10:20:19 -07:00
Fabian Affolter 26a118e75d Upgrade cherrypy to 8.1.0 (#3334) 2016-09-13 22:51:55 -07:00
Fabian Affolter 85baebb23b Upgrade Werkzeug to 0.11.11 (#3220) 2016-09-06 08:55:23 -06:00
Fabian Affolter ed7a227035 Fix typo (#3108) 2016-09-01 22:30:20 -06:00
Robbie Trencheny 7882ce1afd Add CORS fixes to support OPTIONS preflight requests. (#2773)
* Add CORS fixes to support OPTIONS preflight requests.

* Add CORS tests

* Fix formatting
2016-08-13 11:49:44 -07:00
Paulus Schoutsen 640a8b5a7f Limit dependencies of HA core (#2762) 2016-08-08 20:21:40 -07:00
Paulus Schoutsen 9a575eb6d6 Link prefetch panels (#2748)
* Add link=prefetch to index.html

* Improve http request logging
2016-08-08 17:35:27 -07:00
Fabian Affolter ca1cf44194 Upgrade cherrypy to 7.1.0 (#2682) 2016-07-31 13:47:34 -07:00
Paulus Schoutsen 1620680127 Use local timezone for log and history dates (#2622)
* Use local timezone for log and history dates

* home-assistant-js fix

* Submodule updates not included so travis can build

* Separate Date and DateTime http validators

* Include submodule reference

* Update frontend
2016-07-27 20:43:46 -07:00
Fabian Affolter 64d5a328f3 Upgrade cherrypy to 6.1.1 (#2538) 2016-07-17 13:06:41 -07:00
AlucardZero 2b8dfb2a0e check for OP_NO_COMPRESSION support before trying to use it (#2423) 2016-07-02 10:03:49 -07:00
Paulus Schoutsen d1f4901d53 Migrate to cherrypy wsgi from eventlet (#2387) 2016-06-30 09:02:12 -07:00
AlucardZero 31d2a5d2d1 Reenable TLS1.1 and 1.2 while leaving SSLv3 disabled (#2385) 2016-06-28 16:48:25 -07:00
Fabian Affolter 592c599488 Upgrade Werkzeug to 0.11.10 (#2380) 2016-06-27 17:39:44 -07:00
Dan fb3e388f04 Depreciate ssl2/3 (#2375)
* Depreciate ssl2/3

Following the best practices as defind here:
https://mozilla.github.io/server-side-tls/ssl-config-generator/

* Updated comment with better decription

Links to the rational rather than the config generator; explains link.

* add comment mentioning intermediate
2016-06-26 11:49:46 -07:00
Fabian Affolter 3349bdc2bd Log successful and failed login attempts (#2347) 2016-06-23 12:34:13 +02:00
Paulus Schoutsen a564fe8286 Fix error log (#2349) 2016-06-21 22:26:40 -07:00
Josh Wright 3fcc07af04 Add a default OPTIONS handler for wsgi (#2301)
When a browser makes a CORS request, it often makes a 'preflight'
options request in order to make sure the resource is valid, and that
it has the right CORS access. This adds a default OPTIONS handler for
all views. If a view needs to customize the OPTIONS handler for some
reason, it's free to, but this way CORS will work.
2016-06-14 19:44:12 -07:00
Robbie Trencheny 59a0005e5c Add CORS to WSGI (#2209)
* Add CORS support to WSGI

* Remove X-HA-Access as a CORS header, because as @JshWright so elegantly put it: "CORS controls access to response headers, not request headers"
2016-06-03 12:53:43 -07:00
Josh Wright fe4d971427 Re-add config validation for the http component (#2186)
This commit adds back the config validation for the http component. It
was removed during the WSGI shuffle. This is just a direct copy of what
@robbiet480 added in ab294d12f7 (with some testing to verify it still
works).
2016-05-31 14:00:12 -07:00
Paulus Schoutsen bfdb51a558 Bugfixes for urls with dates 2016-05-28 10:37:22 -07:00
Paulus Schoutsen e10b00f341 Update frontend 2016-05-27 21:45:38 -07:00
Paulus Schoutsen 415cfc2537 WSGI: Hide password in logs (#2164)
* WSGI: Hide password in logs

* Add auth + pw in logs tests
2016-05-24 23:19:37 -07:00
Josh Wright 712c51e283 Fix TLS with eventlet (#2151)
* Fix TLS with eventlet

This fixes a simple error on my part when implementing the WSGI stuff.

eventlet.wrap_ssl() returns a wrapped socket, it does not modify the
object passed to it. We need to grab the returned value and use that.

* Fix style issue
2016-05-23 17:39:55 -07:00
Paulus Schoutsen 98de7c9287 Upgrade eventlet to 0.19 2016-05-22 20:14:46 -07:00
Paulus Schoutsen 2ed135439a Remove gzip API 2016-05-21 15:01:35 -07:00
Paulus Schoutsen 1750b22e59 Gzip all the things 2016-05-21 15:01:35 -07:00
Paulus Schoutsen 9aa9e57890 Cleanup 2016-05-21 15:01:35 -07:00
Paulus Schoutsen 794ff20987 Get EventStream working 2016-05-21 15:01:34 -07:00
Paulus Schoutsen fe794d7fd8 Access camera images using access token 2016-05-21 15:01:34 -07:00
Paulus Schoutsen 585fbb1c02 Cache files in static folder for a year 2016-05-21 15:01:34 -07:00
Paulus Schoutsen 5aa0158761 Add url validators 2016-05-21 15:01:34 -07:00
Paulus Schoutsen 4d7555957c Fix camera 2016-05-21 15:01:34 -07:00
Josh Wright aa34fe15b2 Friendlier exceptions for misconfigured views
If a view is missing a url or name attribute, this will result
in a more actionable exception being raised.
2016-05-21 15:01:34 -07:00
Paulus Schoutsen 1096232e17 More WIP 2016-05-21 15:01:34 -07:00
Josh Wright 54ecab7590 Improve view registration comments
Clarify that HomeAssistantWSGI.register_view() can handle either instantiated or uninstantiated view classes.
2016-05-21 15:01:33 -07:00
Paulus Schoutsen 15e329a588 Tons of fixes - WIP 2016-05-21 15:01:33 -07:00
Robbie Trencheny 952d1c796e Add CORS (Cross Origin Resource Sharing) support to HTTP (#2000) 2016-05-07 12:21:28 -07:00
Paulus Schoutsen 7d4b11f4ec Fix wrong merge 2016-04-19 22:59:29 -07:00
Paulus Schoutsen 4abbbf0f50 Merge remote-tracking branch 'origin/master' into dev
Conflicts:
	homeassistant/bootstrap.py
	homeassistant/components/frontend/version.py
	homeassistant/const.py
2016-04-19 22:53:26 -07:00
Jan Harkes 2c665ca3e4 Do not propagate api password (#1797)
* Do not propagate API password in service requests.

It makes service validation fail. The choice is to either handle it as an
optional key in every service handler and make sure it doesn't end up in event
stream and notifications, or to strip it as early as possible.

* Some places still need a forwarded api password.

- Event forwarding/remote api uses the local api password to
  authenticate against the remote instance.
- The generated index.html at '/' embeds the api password.
2016-04-11 19:48:16 -07:00
Jan Harkes 4857117dda Do not propagate api password (#1797)
* Do not propagate API password in service requests.

It makes service validation fail. The choice is to either handle it as an
optional key in every service handler and make sure it doesn't end up in event
stream and notifications, or to strip it as early as possible.

* Some places still need a forwarded api password.

- Event forwarding/remote api uses the local api password to
  authenticate against the remote instance.
- The generated index.html at '/' embeds the api password.
2016-04-11 19:37:15 -07:00
Josh Wright 80d6e9f08f Use constant time comparison for http authentication (#1804)
In order to prevent a potential timing attack, it's important to make
sure the password check takes the same amount of time, regardless of
how many characters in the candidate password match the real password.

This commit does increase the verbosity of the authentication check.
Generally it is a good idea for authentication logic to be very clear,
even if that requires some extra verbosity.
2016-04-11 19:36:25 -07:00
Andrew McClure c99617d6e5 Ensure server_host is respected in configuration.yaml 2016-04-06 18:45:40 -07:00
Fabian Affolter 24b7a7b964 Add source ip to log entry 2016-04-03 00:46:05 -07:00
Paulus Schoutsen 7cb69ae9d9 Make sure we always sent content-length header 2016-03-27 12:15:41 -07:00
Paulus Schoutsen 4cbd49921f Use HTTP 1.1 2016-03-26 19:03:16 -07:00
Fabian Affolter bb658412c4 Revert "Allow encrypted passwords"
This reverts commit 505b3b198e.
2016-03-19 22:19:08 +01:00
Fabian Affolter 505b3b198e Allow encrypted passwords 2016-03-19 22:15:23 +01:00
Fabian Affolter c865ff852d Log failed login attempts 2016-03-15 23:40:24 +01:00