Skip to content
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

IP address changed #13

Open
swiergot opened this issue Jun 26, 2022 · 2 comments
Open

IP address changed #13

swiergot opened this issue Jun 26, 2022 · 2 comments

Comments

@swiergot
Copy link

It appears that each request to the wormhole may come from a different proxy IP address (looks like an internal Dataplicity network 10.20/16). This is a problem when logging into HA because of the following check (components/auth/login_flow.py:270):

if flow["context"]["ip_address"] != ip_address(request.remote):
    return self.json_message("IP address changed", HTTPStatus.BAD_REQUEST)

So when the login page is opened, HA stores the remote IP address. Then when credentials are submitted, the IP address is compared with the stored one. Sometimes I get lucky and credentials are accepted, but then the second factor is requested which means yet another IP address check. I've never been able to get past that second check. I had to comment out the code in order to log in successfully.

Have you experienced it as well?

@swiergot
Copy link
Author

Ok, I have figured out it's a matter of configuring trusted proxies in HA. I can see the integration sets up 127.0.0.1 as a trusted proxy, but it's not enough. Why is nobody else reporting it? Am I the only one unlucky enough to experience the changing address?

@RashaverakGor
Copy link

Confirm. I have the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants