Add trusted networks auth provider#15812
Conversation
6b4a708 to
7f2d2e5
Compare
|
Maybe a config setting for trusted networks default user so one can completely skip authentication if wanted? |
|
@quthla we have discussion about it, please check history of #15589 (comment) |
| else: | ||
| handler = data['handler'] | ||
|
|
||
| if handler[0] == 'trusted_networks': |
There was a problem hiding this comment.
This is not good.
By doing this, we're starting to conflate concerns of the auth provider with the generic abstraction. It means the abstraction is not good and that needs to be changed.
I don't know right now how we should evolve it, maybe we need to decouple the manager from the flow, allowing the manager to pass in an extra auth context.
There was a problem hiding this comment.
This also comes with having to decouple the HTTP views from using the helper.
And all these things should happen in separate PRs. One thing at a time.
There was a problem hiding this comment.
Part 3 of #15700 was implement login's own flow manager.
7f2d2e5 to
28db4d4
Compare
28db4d4 to
cac3c41
Compare
cac3c41 to
1974790
Compare
1974790 to
b7fc5cf
Compare
|
Rebased. |
|
Beautiful. |
* Add context to login flow * Add trusted networks auth provider * source -> context
* Add context to login flow * Add trusted networks auth provider * source -> context
Description:
Need to wait #15914 merged first
Add Trusted Networks Authentication Provider
It shows list of users if access from trusted network. User can select which user want to login, no password need
Breaking change:
Given new auth is enabled, current websocket API will not request auth if access was from trusted networks, After this change, websocket API will always request auth if new auth was enabled.
Any integration leverage on websocket API and
trusted_networkstogether should first getaccess_tokenby trusted networks authentication provider, then provideaccess_tokento websocket API.Related issue (if applicable): fixes #15589
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code does not interact with devices: