Marc Mueller
a6068dcdf2
Update import locations in tests ( #122216 )
2024-07-20 11:16:04 +02:00
epenet
5e39faa9f8
Improve type hints in auth tests ( #120655 )
2024-06-28 10:01:53 +01:00
Robert Resch
9f4bf6f11a
Create repair when HA auth provider is running in legacy mode ( #119975 )
2024-06-26 09:00:33 +02:00
Robert Resch
641507a45a
Add change username endpoint ( #109057 )
2024-06-24 18:51:19 +02:00
Robert Resch
bae008b0e2
Remove legacy_api_password auth provider ( #119976 )
2024-06-19 22:46:30 +02:00
epenet
38a6e666a7
Add missing return type to some test functions ( #119665 )
2024-06-14 08:26:45 +02:00
epenet
0b4f1cff98
Use issue_registry fixture in core tests ( #118042 )
2024-05-24 15:26:32 +02:00
J. Nick Koston
4341b21a61
Migrate auth to use async_import_module to avoid blocking I/O in the event loop ( #113387 )
2024-03-14 10:44:36 +01:00
Marc Mueller
a6b842f818
Add empty line after module docstring (2) [other] ( #112738 )
2024-03-08 19:16:38 +01:00
Marc Mueller
19ab3d6daf
Add empty line after module docstring [helpers + other] ( #112707 )
2024-03-08 10:36:11 -05:00
J. Nick Koston
ec15b0def2
Always load auth storage at startup ( #108543 )
2024-01-20 16:16:43 -10:00
Robert Resch
cf9b0e804f
Deprecate legacy api auth provider ( #104409 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:16:18 +01:00
Hejki
65a2f5bcd5
Support for group into command_line auth provider ( #92906 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-11-24 13:19:25 +01:00
Patrick Li
46103f56c4
Fix trusted_users group schema ( #92847 )
...
* Fix trusted_users group schema
* Add tests for CONFIG_SCHEMA
2023-05-23 20:11:25 +02:00
epenet
a51cc75f03
Add type hints to core tests (part 2) ( #88492 )
2023-02-21 09:27:13 +01:00
epenet
c98b4e3204
Add typing to tests with single hass argument (2) ( #87675 )
...
* Add typing to tests with single hass argument (2)
* a few more
2023-02-08 08:51:43 +01:00
epenet
aa00114c2f
Add return type to async tests without arguments ( #87612 )
2023-02-07 10:26:56 +01:00
Franck Nijhof
a6244eea28
Search/replace RESULT_TYPE_* by FlowResultType enum ( #74656 )
2022-07-07 21:28:18 +02:00
Franck Nijhof
7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum ( #74642 )
2022-07-07 19:57:36 +03:00
Paulus Schoutsen
e30e4d5c6d
Block cloud explicitely from trusted networks ( #59333 )
...
* Block cloud explicitely from trusted networks
* Lint
2021-11-12 10:25:01 +01:00
Joakim Plate
d339e3bd8c
Reject trusted network access from proxies ( #52388 )
2021-07-02 11:49:42 +02:00
Franck Nijhof
cdd1f6b2f0
Always load middle to handle forwarded proxy data ( #51332 )
2021-06-01 09:38:55 -07:00
Paulus Schoutsen
bd0373388d
Trusted networks auth provider warns if detects a requests with x-forwarded-for header while the http integration is not configured for reverse proxies ( #51319 )
...
* Trusted networks auth provider to require http integration configured for proxies to allow logging in with requests with x-forwarded-for header
* Make it a warning
2021-06-01 12:51:44 +02:00
Ville Skyttä
c2f5dcefa5
Use flow result type constants more ( #51122 )
2021-05-29 14:09:13 +02:00
Franck Nijhof
c5383219f1
Remove stale debug statements from tests ( #51059 )
2021-05-25 11:52:20 +02:00
Joakim Plate
38d2cacf7a
Support blocking trusted network from new ip ( #44630 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-28 12:06:20 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest ( #44746 )
2021-01-01 22:31:56 +01:00
springstan
a2c3c33b22
Use core GitHub URL in all files ( #41089 )
2020-10-03 00:04:11 +02:00
Paulus Schoutsen
8ed1a29c82
Drop white blacklist pt1 ( #37816 )
2020-07-13 17:43:11 +02:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 ( #34901 )
2020-04-30 13:29:50 -07:00
Paulus Schoutsen
e7f8d6bbf7
Fix more tests on Python 3.8 ( #34703 )
2020-04-25 15:52:50 -07:00
Bas Nijholt
f60125b5c9
Sort imports according to PEP8 for 'tests' ( #29791 )
2019-12-09 16:52:24 +01:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Jason Hu
6ba2891604
Add trusted_users in trusted networks auth provider ( #22478 )
2019-03-27 21:53:11 -07:00
Jason Hu
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
Jason Hu
4a3b4cf346
Resolve race condition when HA auth provider is loading ( #21619 )
...
* Resolve race condition when HA auth provider is loading
* Fix
* Add more tests
* Lint
2019-03-04 15:55:26 -08:00
Jason Hu
7bae76843c
Add config for trusted networks auth provider ( #21111 )
...
* Add config for trusted networks auth provider
* Lint
* Fix typing
* Fix pylint
* Fix lint
* Add some log information
* Add http.trusted_networks deprecated warning
* Remove log info
* Lint
2019-02-26 14:42:48 -08:00
Robert Schindler
06f3e8137a
Added command_line auth provider that validates credentials by calling a command ( #19985 )
...
* Added external auth provider that calls a configurable program
Closes #19975
* Raise proper InvalidAuth exception on OSError during program execution
* Changed name of external auth provider to command_line
* Renamed program config option to command in command_line auth provider
* Made meta variable parsing in command_line auth provider optional
* Added tests for command_line auth provider
* Fixed indentation
* Suppressed wrong pylint warning
* Fixed linting
* Added test for command line auth provider login flow
* Log error when user fails authentication
* Use %r formatter instead of explicit repr()
* Mix all used names of typing module into module namespace
I consider this nasty and bad coding style, but was requested by
@awarecan for consistency with the remaining codebase.
* Small code style change
* Strip usernames with command_line auth provider
2019-02-06 16:36:41 -08:00
Paulus Schoutsen
73a0c664b8
Allow usernames to be case-insensitive ( #20558 )
...
* Allow usernames to be case-insensitive
* Fix typing
* FLAKE*
2019-01-29 08:28:52 +01:00
Paulus Schoutsen
84a2e5d8fb
Strip login username in backend ( #20150 )
...
* Add modern mode to HA auth provider that strips usernames
* Add tests for async_get_or_create_credentials
* Fix test
2019-01-16 15:03:05 -08:00
Matt Hamilton
4f2e7fc912
remove pbkdf2 upgrade path ( #18736 )
2018-11-27 10:42:56 +01:00
Paulus Schoutsen
e7b8d2e6df
Update name legacy api password ( #16455 )
2018-09-08 22:10:42 +02:00
Jason Hu
257b8b9b80
Blow up startup if init auth providers or modules failed ( #16240 )
...
* Blow up startup if init auth providers or modules failed
* Delete core.entity_registry
2018-08-28 20:54:01 +02:00
Paulus Schoutsen
5397c0d73a
Update trusted networks flow ( #16227 )
...
* Update the trusted networks flow
* Fix tests
* Remove errors
2018-08-28 00:37:15 +02:00
Matt Hamilton
bacecb4249
Replace pbkdf2 with bcrypt ( #16071 )
...
* Replace pbkdf2 with bcrypt
bcrypt isn't inherently better than pbkdf2, but everything "just works"
out of the box.
* the hash verification routine now only computes one hash per call
* a per-user salt is built into the hash as opposed to the current
global salt
* bcrypt.checkpw() is immune to timing attacks regardless of input
* hash strength is a function of real time benchmarks and a
"difficulty" level, meaning we won't have to ever update the iteration
count
* WIP: add hash upgrade mechanism
* WIP: clarify decode issue
* remove stale testing code
* Fix test
* Ensure incorrect legacy passwords fail
* Add better invalid legacy password test
* Lint
* Run tests in async scope
2018-08-26 22:50:31 +02:00
Paulus Schoutsen
249981de96
Prevent legacy api password with empty password ( #16127 )
...
* Prevent legacy api password with empty password
* Typing
2018-08-23 12:56:01 +02:00
Jason Hu
7e7f9bc6ac
Add multi-factor authentication modules ( #15489 )
...
* Get user after login flow finished
* Add multi factor authentication support
* Typings
2018-08-22 09:52:34 +02:00
Jason Hu
1ce51bfbd6
Refactoring login flow ( #16104 )
...
* Abstract LoginFlow
* Lint and typings
2018-08-21 11:03:38 -07:00
Jason Hu
da8f93dca2
Add trusted networks auth provider ( #15812 )
...
* Add context to login flow
* Add trusted networks auth provider
* source -> context
2018-08-13 12:40:06 +02:00
Paulus Schoutsen
2fcacbff23
Allow auth providers to influence is_active ( #15557 )
...
* Allow auth providers to influence is_active
* Fix auth script test
2018-07-19 22:10:36 +02:00