-
-
Notifications
You must be signed in to change notification settings - Fork 126
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 2FA support #416
Add 2FA support #416
Conversation
If accepted, I'll backport it to https://github.com/pi-hole/pi-hole/blob/development/advanced/Scripts/api.sh |
Do we need this? I thought the whole point of the app password was to bypass 2FA for API usage? |
Yes, the app password can bypass the 2FA, but users might not want to use it. |
this still asks for 2fa even if running PADD as sudo on pihole device directly. i was under the impression that #392 made it so that no password (2fa as well?) needs to be provided if running as root or as a user is a member the pihole group. without sudo ./padd.sh --server pi.hole so sudo ./padd.sh --server pi.hole --2fa 0 or from any device with app password from api ./padd.sh --server pi.hole --secret <app-password> --2fa 0 if using WebUI password, |
I pushed a small change that skipps 2FA if a CLI password is read. Thanks for testing. |
tested with and without 2fa enabled on WebUI & running PADD on Pi-hole device and from other computers. if 2FA is enabled, if 2FA is not enabled on WebUI, PADD does not ask for second factor. |
I think this is fine now as it is. I don't want to make the code to complicate to check for the app password as well. If users know they use the app password, they can just enter any number in the 2FA field. |
should it be explained somewhere that when using the app password, the 2fa field can be any number? or a better way to say it would be
|
Signed-off-by: yubiuser <[email protected]>
Signed-off-by: yubiuser <[email protected]>
Signed-off-by: yubiuser <[email protected]>
Signed-off-by: yubiuser <[email protected]>
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.
I guess this is good to go:
- On the same machine with
cli_pw
- immediate login (with and without 2FA) ✔️ - On the same machine without
cli_pw
- tried with a wrong and once with a reused (already used on the web interface) 2FA, both as expected ✔️
- On the same machine without
cli_pw
- with correct 2FA ✔️ - From a different machine, using the app password and entering any number ✔️
What does this PR aim to accomplish?:
Adds handling of 2 factor authentication to PADD
By submitting this pull request, I confirm the following:
git rebase
)