-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
SynologyDSM integration doesn't handle 2-step authentication #31477
Comments
Will look into it during #31030. I'll test on DSM 6 with and without 2 step auth. I will let you know, or subscribe to the PR. Thanks for reporting ! |
Hi, got an official answer from Synology support: Step 1. Login with OTP and enable device token query:
answer:
Step 2. Login with device name and without OTP query:
answer:
Looking forward for your test ;-) Simone |
@Quentame did you get time to test ? :-) Simone |
In 4 days I will have 😉 Sent with GitHawk |
May I test something ? 😇 Simone |
Hi @chemelli74 ! Right now we are not supporting 2-SA for Synology DSM, as you noticed. I precised the documentation accordingly on my component rework documentation PR: As you created an issue on the underlying library ProtoThis/python-synology#11 and HA feature request should only be on the forum https://community.home-assistant.io/c/feature-requests , I'm closing the issue here. Best regards, and see you there ProtoThis/python-synology#11 |
The problem
I'm trying to enable synologyDSM integration on my NAS that has 2-step authentication.
Doesn't work out of the box, but I found the right calls to handle this.
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information
Removing "-network_up" I don't have any more errors in log, but all sensors report nothing; they are seen as "- %" in UI.
I found that 2-step auth is not handled by the plugin.
Steps to fix:
query Auth API using:
https://nasdnsname/webapi/query.cgi?api=SYNO.API.Info&version=1&method=query&query=SYNO.API.Auth
If "maxVersion" is >=3 (mine is 6) then OTP code can be used.
So the authorization call would be:
https://nasdnsname/webapi/auth.cgi?api=SYNO.API.Auth&version=6&method=login&account=admin&passwd=password&session=Core&format=cookie&otp_code=OTPCode&enable_device_token=yes
using "enable_device_token" all fuure calls to avoid the need of the OTP code ;-)
Integration should be enabled by UI and ask if OTP is active or not (maybe there is a API even for that). If it is, ask for the OTP code and perform the first query.
From now on I expect the code to be the same as before.
Available for testing a new version of the integration.
Simone
The text was updated successfully, but these errors were encountered: