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

Handle URL validation requests #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

willscott
Copy link

fix #63

@PhilippRaab
Copy link

PhilippRaab commented Jan 9, 2023

I tried the fix. The validation is working when the Secret Token is used, but I don't receive any updates from the webhooks. When I switch to the Verification Token the updates from the webhooks are working, but the validation fails again.

I think the authorization token check needs to be skipped when a webhook is called.
I think the header x-zm-signature need to be matched with the hashed webhook secret token. As seen in the sample app.

@willscott
Copy link
Author

either we need to switch the validation to look at the digest header sent and confirm it against the secret token, or we need both secret and older validation tokens available and match against validation token as happens now.
The verification_tokens gotten from config is an array - it's non-deterministic which one is iterated through first, but it's possible to put both tokens in that array and some times it will work as expected :)

@PhilippRaab
Copy link

As a workaround I created two zoom client entries in the configuration.yaml one with the new Secret Token and another one with the old Verification Token.

I think it would make sense to completely switch to the Secret Token, as the Verification Token is deprecated.

@kmatwill
Copy link

kmatwill commented Feb 16, 2023

As a workaround I created two zoom client entries in the configuration.yaml one with the new Secret Token and another one with the old Verification Token.

I think it would make sense to completely switch to the Secret Token, as the Verification Token is deprecated.

Did you have to use the same clientid and secret? Did you just replace "verification _token" with "secret_token" and add the secret token key? Mind sharing your example?

@willscott
Copy link
Author

I'm happy to admit that what I did at first is leave my config with the legacy verification token, and then in the code changed here when being asked to validate the secret _token, I hard-coded it rather than pulling it from config.

@kmatwill
Copy link

I think this is a good project, but I found a much simpler solution in MuteSync. Good luck

@hitnrun30
Copy link

I'm happy to admit that what I did at first is leave my config with the legacy verification token, and then in the code changed here when being asked to validate the secret _token, I hard-coded it rather than pulling it from config.

Do you know when this will be pushed into a release so that HACS can be updated?

@zenstrukt
Copy link

I'm happy to admit that what I did at first is leave my config with the legacy verification token, and then in the code changed here when being asked to validate the secret _token, I hard-coded it rather than pulling it from config.

Fix is working well for me :-) Well done!

Single file replaced, rebooted HA - presto!

@hitnrun30
Copy link

I'm happy to admit that what I did at first is leave my config with the legacy verification token, and then in the code changed here when being asked to validate the secret _token, I hard-coded it rather than pulling it from config.

Fix is working well for me :-) Well done!

Single file replaced, rebooted HA - presto!

What file did you replace?

@zenstrukt
Copy link

What file did you replace?

@willscott has an updated common.py file referenced. Copy that in any way you see fit, update the file directly on HA (use the File Editor addon, or if you've opened up a SAMBA share that'd do it too). File path is config/custom_components/zoom/common.py - after that, restart. If all goes well you should be able to verify your URL.

@hitnrun30
Copy link

What file did you replace?

@willscott has an updated common.py file referenced. Copy that in any way you see fit, update the file directly on HA (use the File Editor addon, or if you've opened up a SAMBA share that'd do it too). File path is config/custom_components/zoom/common.py - after that, restart. If all goes well you should be able to verify your URL.

Did this, but the Event notification endpoint URL for <BASE_HA_URL>/api/zoom still says URL validation failed. Try again later.

@raman325
Copy link
Owner

raman325 commented Mar 1, 2023

Hi all, haven't had much time to work on this lately, and as I mentioned, I barely use zoom. With that being said, happy to take a look at this PR soon, apologies for the delay!

@hitnrun30
Copy link

Hi all, haven't had much time to work on this lately, and as I mentioned, I barely use zoom. With that being said, happy to take a look at this PR soon, apologies for the delay!

No need to apologize, you created it and it is great that you made it, I just hate that I cant even get it working right from the Zoom API setup side.

@hitnrun30
Copy link

Hi all, haven't had much time to work on this lately, and as I mentioned, I barely use zoom. With that being said, happy to take a look at this PR soon, apologies for the delay!

Any updates?

@michaellunzer
Copy link

As a quick suggestion, it might be helpful to add @willscott as a collaborator on the Repo so he can help maintain it, since it sounds like you don't use Zoom these days 😅

Just want to mention that this has been extremely helpful for me and appreciate all the hard work on the project!

@omrishiv
Copy link

Anyone have some more guidance here? I've tried using multiple configurations (1 with secret token, 1 with verification token); I've tried to hardcode the secret token instead of getting it from the configuration, but I cannot seem to get the url verification to work. I can see in the homeassistant logs that it receives the plaintoken event, but doesn't look like it's running into the added code from this PR. I've also deleted the pycache and restarted.

@raman325
Copy link
Owner

raman325 commented Apr 1, 2023

alright, so finally got a chance to take a look at this. This implementation was helpful to figure some things out but it won't work well for people who are monitoring multiple users, so I have a bigger PR incoming. I have most of the functional code fixed at this point, the TODO items left are:

  • Update README
  • Fix config flow reauthorization to handle the transition from verification token to secret token

@hitnrun30
Copy link

Any updates?

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

Successfully merging this pull request may close these issues.

URL validation failed. Try again later.
8 participants