-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add trusted networks auth provider #15812
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) |
@@ -151,8 +153,13 @@ def __init__(self, flow_mgr): | |||
else: | |||
handler = data['handler'] | |||
|
|||
if handler[0] == 'trusted_networks': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_networks
together should first getaccess_token
by trusted networks authentication provider, then provideaccess_token
to 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: