J. Nick Koston and GitHub
578d4a9b6a
Make the frontend available sooner (Part 1 of 2) ( #36263 )
...
* Part 1 of 2 (no breaking changes in part 1).
When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.
This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.
Frontend Changes (home-assistant/frontend#6068 )
* Address review comments
* bump timeout to 1800s, adjust comment
* bump timeout to 4h
* remove timeout failsafe
* and the test
2020-06-02 13:54:11 -05:00
Paulus Schoutsen and GitHub
acbffb511d
Fix base_url extract stack ( #36331 )
...
* Fix base_url extract stack
* Fix tests
2020-06-01 11:44:45 -07:00
Pascal Vizeli and GitHub
ed014e3c96
Revert "Ensure frontend is available if integrations fail to start - Part 1 of 2 ( #36093 )" ( #36251 )
...
This reverts commit fbe7b4ddfa .
2020-05-29 10:18:39 +02:00
fbe7b4ddfa
Ensure frontend is available if integrations fail to start - Part 1 of 2 ( #36093 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io >
2020-05-28 21:09:07 -07:00
Franck Nijhof and GitHub
e3e3a113e9
async_get_url -> get_url ( #35382 )
2020-05-08 21:53:28 +02:00
Franck Nijhof and GitHub
e56dd8ed50
Detect use of deprecated base_url ( #35353 )
...
* Detect use of deprecated base_url
* Update get_url helper
* Update core migration
* Migrate all tests
2020-05-08 17:52:32 +02:00
Franck Nijhof and GitHub
2223592486
Add get_url helper, deprecate base_url ( #35224 )
2020-05-08 02:29:47 +02:00
Paulus Schoutsen and GitHub
2af984917e
Use asynctest-mock in most places ( #35109 )
...
* Use asynctest-mock in most places
* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Paulus Schoutsen and GitHub
76f392476b
Use a future for mock coro ( #34989 )
2020-04-30 16:31:00 -07:00
Paulus Schoutsen and GitHub
ec47216388
Use built-in test helpers on 3.8 ( #34901 )
2020-04-30 13:29:50 -07:00
springstan and GitHub
bc26be3c11
Add and use HTTP_FORBIDDEN constant ( #33839 )
2020-04-09 17:41:17 +02:00
c3decc6531
Do not ban supervisor ip if set ( #33781 )
...
* Use asynctest patch instead of mock_coro
* Add test for supervisor ip ban
* Do not ban supervisor ip if set
* Extract supervisor ip helper
* Check supervisor ip before banning
* Remove added blank line
* Clean up get supervisor ip
Co-Authored-By: Pascal Vizeli <pvizeli@syshack.ch >
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch >
2020-04-08 10:31:44 -07:00
Franck Nijhof and GitHub
d7e9959442
String formatting improvements for tests (2) ( #33666 )
2020-04-05 00:33:07 +02:00
Paulus Schoutsen and GitHub
33361f8580
Fix HTTP config serialization ( #31319 )
2020-01-30 09:47:16 -08:00
Paulus Schoutsen and GitHub
5fdc60e067
Add Safe Mode ( #30723 )
...
* Store last working HTTP settings
* Add safe mode
* Fix tests
* Add cloud to safe mode
* Update logging text
* Fix camera tests leaving files behind
* Make emulated_hue tests not leave files behind
* Make logbook tests not leave files behind
* Make tts tests not leave files behind
* Make image_processing tests not leave files behind
* Make manual_mqtt tests not leave files behind
2020-01-14 13:03:02 -08:00
Bas Nijholt and Franck Nijhof
3d10bb3647
Sort imports according to PEP8 for http ( #29679 )
2019-12-09 11:59:38 +01:00
Paulus Schoutsen and GitHub
3231e22ddf
Remove direct authentication via trusted networks or API password ( #27656 )
...
* Remove direct authentication via trusted networks and API password
* Fix tests
2019-10-14 14:56:45 -07:00
Paulus Schoutsen and Pascal Vizeli
57f84cbbaa
Update HTTP defaults ( #25702 )
...
* Update HTTP defaults
* Fix tests
2019-08-05 08:24:54 +02:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Paulus Schoutsen
0df1bb5029
Fix python 3.5 test
2019-07-26 16:15:46 -07:00
Paulus Schoutsen and Pascal Vizeli
fae3546910
Allow cors for static files ( #25468 )
2019-07-25 13:52:27 +02:00
Paulus Schoutsen and GitHub
6f903db8c4
Fix cors on the index view ( #24283 )
2019-06-03 11:43:13 -07:00
Jason Hu and Paulus Schoutsen
fe1840f901
Deprecate http.api_password ( #21884 )
...
* Deprecated http.api_password
* Deprecated ApiConfig.api_password
GitHub Drafted PR would trigger CI after changed it to normal PR.
I have to commit a comment change to trigger it
* Trigger CI
* Adjust if- elif chain in auth middleware
2019-03-10 19:55:36 -07:00
Paul Bottein and Paulus Schoutsen
4d9cf15c45
Fix authorization header in cors ( #21662 )
...
* Fix authorization headers in cors
* Use aiohttp authorization header instead of custom const
2019-03-09 10:00:10 -08:00
Louis Matthijssen and Anders Melchiorsen
d39784906b
Fix HTTP login attempts check triggering too late ( #20431 )
2019-01-26 03:13:44 +01:00
Andrew Sayre and Fabian Affolter
bb21cb6c89
Remove trailing slash from base_url and added ability to generate webhook path. ( #20295 )
2019-01-21 20:50:41 +01:00
Paulus Schoutsen and Pascal Vizeli
d1a621601d
No more opt-out auth ( #18854 )
...
* No more opt-out auth
* Fix var
2018-12-02 16:32:53 +01:00
Paulus Schoutsen and Pascal Vizeli
df21dd21f2
RFC: Call services directly ( #18720 )
...
* Call services directly
* Simplify
* Type
* Lint
* Update name
* Fix tests
* Catch exceptions in HTTP view
* Lint
* Handle ServiceNotFound in API endpoints that call services
* Type
* Don't crash recorder on non-JSON serializable objects
2018-11-30 21:28:35 +01:00
Paulus Schoutsen and GitHub
d014517ce2
Always set hass_user ( #18844 )
2018-11-30 17:32:47 +01:00
Paulus Schoutsen and Pascal Vizeli
a2386f871d
Forbid float NaN in JSON ( #18757 )
2018-11-28 13:25:23 +01:00
Paulus Schoutsen and GitHub
c2f8dfcb9f
Legacy api fix ( #18733 )
...
* Set user for API password requests
* Fix tests
* Fix typing
2018-11-27 10:41:44 +01:00
Paulus Schoutsen and GitHub
1341ecd2eb
Use proper signals ( #18613 )
...
* Emulated Hue not use deprecated handler
* Remove no longer needed workaround
* Add middleware directly
* Dont always load the ban config file
* Update homeassistant/components/http/ban.py
Co-Authored-By: balloob <paulus@home-assistant.io >
* Update __init__.py
2018-11-21 20:55:21 +01:00
Paulus Schoutsen and Pascal Vizeli
312d49caec
Allow creating signed urls ( #17759 )
...
* Allow creating signed urls
* Fix parameter
* Lint
2018-10-25 16:44:57 +02:00
Ville Skyttä and Paulus Schoutsen
dd9d53c83e
Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 ( #14557 )
...
* Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0
* Pydocstyle D401 fixes
2018-08-24 10:28:43 +02:00
Ville Skyttä and Fabian Affolter
dbd0763f83
Grammar and spelling fixes ( #16065 )
2018-08-19 22:29:08 +02:00
Paulus Schoutsen and GitHub
e776f88eec
Use JWT for access tokens ( #15972 )
...
* Use JWT for access tokens
* Update requirements
* Improvements
2018-08-14 21:14:12 +02:00
Paulus Schoutsen and GitHub
6540d2e073
Switch to intermediate Mozilla cert profile ( #15957 )
...
* Allow choosing intermediate SSL profile
* Fix tests
2018-08-14 08:20:17 +02:00
Jason Hu and Paulus Schoutsen
272be7cdae
Remove remote.API from core.Config ( #15951 )
...
* Use core.ApiConfig replace remote.API in core.Config
* Move ApiConfig to http
2018-08-13 09:26:20 +02:00
Jason Hu and Paulus Schoutsen
6f2000f5e2
Make sure use_x_forward_for and trusted_proxies must config together ( #15804 )
...
* Make sure use_x_forward_for and trusted_proxies must config together
* Fix unit test
2018-08-03 13:52:34 +02:00
Paulus Schoutsen and GitHub
169c8d793a
Fix CORS duplicate registration ( #15670 )
2018-07-25 11:36:44 +02:00
Jason Hu and Paulus Schoutsen
f1286f8e6b
Reset failed login attempts counter when login success ( #15564 )
2018-07-20 12:09:48 +02:00
Paulus Schoutsen and GitHub
2a76a0852f
Allow CORS requests to token endpoint ( #15519 )
...
* Allow CORS requests to token endpoint
* Tests
* Fuck emulated hue
* Clean up
* Only cors existing methods
2018-07-19 08:37:00 +02:00
Paulus Schoutsen and GitHub
70fe463ef0
User management ( #15420 )
...
* User management
* Lint
* Fix dict
* Reuse data instance
* OrderedDict all the way
2018-07-13 15:31:20 +02:00
Paulus Schoutsen and GitHub
b6ca03ce47
Reorg auth ( #15443 )
2018-07-13 11:43:08 +02:00
Jason Hu and Paulus Schoutsen
f874efb224
By default to use access_token if hass.auth.active ( #15212 )
...
* Force to use access_token if hass.auth.active
* Not allow Basic auth with api_password if hass.auth.active
* Block websocket api_password auth when hass.auth.active
* Add legacy_api_password auth provider
* lint
* lint
2018-06-30 22:31:36 -04:00
Colin O'Dell and Paulus Schoutsen
fd38caa287
X-Forwarded-For improvements and bug fixes ( #15204 )
...
* Use new trusted_proxies setting for X-Forwarded-For whitelist
* Only use the last IP in the header
Per Wikipedia (https://en.wikipedia.org/wiki/X-Forwarded-For#Format ):
> The last IP address is always the IP address that connects to the last proxy,
> which means it is the most reliable source of information.
* Add two additional tests
* Ignore nonsense header values instead of failing
2018-06-29 16:27:06 -04:00
Colin O'Dell and Paulus Schoutsen
19f2bbf52f
Only use the X-Forwarded-For header if connection is from a trusted network ( #15182 )
...
See https://github.com/home-assistant/home-assistant/issues/14345#issuecomment-400854569
2018-06-28 09:16:11 -04:00
Paulus Schoutsen and Pascal Vizeli
cdd45e7878
Foundation for users ( #13968 )
...
* Add initial user foundation to Home Assistant
* Address comments
* Address comments
* Allow non-ascii passwords
* One more utf-8 hmac compare digest
* Add new line
2018-05-01 18:20:41 +02:00
Paulus Schoutsen and Pascal Vizeli
89a19c89a7
Fix aiohttp deprecation warnings ( #13240 )
...
* Fix aiohttp deprecation warnings
* Fix Ring deprecation warning
* Lint
2018-03-15 21:49:49 +01:00
Paulus Schoutsen and Fabian Affolter
0a2e949e0a
Remove crazy JSON encoding things that are no longer used ( #13029 )
...
Catch JSON encoding errors in HTTP view
2018-03-12 23:22:08 +01:00