JGeek00 / droid-hole

Pi-hole® client made with Flutter
Apache License 2.0
135 stars 11 forks source link

Add support for basic auth #17

Closed maxthegold closed 1 year ago

maxthegold commented 1 year ago

I need to be able to sign in to my web server, any chance of adding this facility.

JGeek00 commented 1 year ago

Hi. Could you give me more details about that?

maxthegold commented 1 year ago

I am using Nginx on a Raspberry Pi 4 (latest version of Raspian OS and Nginx). The default setting for Nginx is to implement security with the following instructions in the .conf,

auth_basic "Restricted"; # For Basic Auth

auth_basic_user_file /etc/nginx/.htpasswd; # For Basic Auth

This means that when you try to access Pihole, Nginx requests the user and password that you have set up in the .htpasswd file.

Hope this makes sense. It is possible to remove this Nginx option, but security is always a good idea and I thought it might be a feature you would like to include in your program.

Mark

From: Juan Gilsanz Polo @.> Sent: 11 February 2023 12:48 To: JGeek00/droid-hole @.> Cc: Mark @.>; Author @.> Subject: Re: [JGeek00/droid-hole] Sign in (Issue #17)

Hi. Could you give me more details about that?

— Reply to this email directly, view it on GitHub https://github.com/JGeek00/droid-hole/issues/17#issuecomment-1426758999 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AJRJC2HCF5TBJ3RDYHJBDSLWW6C6XANCNFSM6AAAAAAUW4Y4V4 . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AJRJC2F2VVUUYSO2ZCDBRA3WW6C6XA5CNFSM6AAAAAAUW4Y4V6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSVBKOVO.gif Message ID: @. @.> >

JGeek00 commented 1 year ago

So you have a basic auth on top of the API right? Will work on adding support for that.

maxthegold commented 1 year ago

Yes, that's right. Nginx is requesting a userid and password before it lets me access pihole/admin.

On Mon, 13 Feb 2023, 10:05 pm Juan Gilsanz Polo, @.***> wrote:

So you have a basic auth on top of the API right? Will work on adding support for that.

— Reply to this email directly, view it on GitHub https://github.com/JGeek00/droid-hole/issues/17#issuecomment-1428755270, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJRJC2GIQMRZAIMZZL3HGCTWXKV4HANCNFSM6AAAAAAUW4Y4V4 . You are receiving this because you authored the thread.Message ID: @.***>

JGeek00 commented 1 year ago

Hi. Please, try this version and let me know if it's working for your configuration.

3.6.0_beta.apk.zip

maxthegold commented 1 year ago

Yes that’s good, I can sign on now. The only problem with it is when I try to access Logs or Domains it says ‘…couldn’t be loaded’.

Mark.

From: Juan Gilsanz Polo @.> Sent: 19 February 2023 21:12 To: JGeek00/droid-hole @.> Cc: Mark @.>; Author @.> Subject: Re: [JGeek00/droid-hole] Add support for basic auth (Issue #17)

Hi. Please, try this version and let me know if it's working for your configuration.

3.6.0_beta.apk.zip https://github.com/JGeek00/droid-hole/files/10777958/3.6.0_beta.apk.zip

— Reply to this email directly, view it on GitHub https://github.com/JGeek00/droid-hole/issues/17#issuecomment-1436095094 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AJRJC2HMJPCJPUO7COPAHDLWYKEBZANCNFSM6AAAAAAUW4Y4V4 . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AJRJC2EJWJDBUHVL3SXI3A3WYKEBZA5CNFSM6AAAAAAUW4Y4V6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSVTEJHM.gif Message ID: @. @.> >

maxthegold commented 1 year ago

Juan,

            For the sake of completeness I have tested the app with an invalid user/password and with no user/password. Both fail as expected. I have also tested the good user/password as default and non default and both work as expected.

Mark.

From: Juan Gilsanz Polo @.> Sent: 19 February 2023 21:12 To: JGeek00/droid-hole @.> Cc: Mark @.>; Author @.> Subject: Re: [JGeek00/droid-hole] Add support for basic auth (Issue #17)

Hi. Please, try this version and let me know if it's working for your configuration.

3.6.0_beta.apk.zip https://github.com/JGeek00/droid-hole/files/10777958/3.6.0_beta.apk.zip

— Reply to this email directly, view it on GitHub https://github.com/JGeek00/droid-hole/issues/17#issuecomment-1436095094 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AJRJC2HMJPCJPUO7COPAHDLWYKEBZANCNFSM6AAAAAAUW4Y4V4 . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AJRJC2EJWJDBUHVL3SXI3A3WYKEBZA5CNFSM6AAAAAAUW4Y4V6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSVTEJHM.gif Message ID: @. @.> >

JGeek00 commented 1 year ago

Hi. Please, try this version. Focus specially on logs screen and on domains screen (also create and remove domains from lists).

3.6.0_beta2.apk.zip

maxthegold commented 1 year ago

Yes, that's done the trick, all seems to be working now.

Thanks, Mark.

On Mon, 20 Feb 2023, 9:12 pm Juan Gilsanz Polo, @.***> wrote:

Hi. Please, try this version.

3.6.0_beta2.apk.zip https://github.com/JGeek00/droid-hole/files/10787772/3.6.0_beta2.apk.zip

— Reply to this email directly, view it on GitHub https://github.com/JGeek00/droid-hole/issues/17#issuecomment-1437548320, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJRJC2EPIVPAQAX6Z3FW6HTWYPM2BANCNFSM6AAAAAAUW4Y4V4 . You are receiving this because you authored the thread.Message ID: @.***>

JGeek00 commented 1 year ago

Great! Soon I will push a new update to Google Play adding that functionality.

maxthegold commented 1 year ago

Great, thanks!

On Wed, 22 Feb 2023, 10:08 am Juan Gilsanz Polo, @.***> wrote:

Great! Soon I will push a new update to Google Play adding that functionality.

— Reply to this email directly, view it on GitHub https://github.com/JGeek00/droid-hole/issues/17#issuecomment-1439745261, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJRJC2AHQGUCSN6GQO72FWDWYXQQRANCNFSM6AAAAAAUW4Y4V4 . You are receiving this because you authored the thread.Message ID: @.***>

JGeek00 commented 1 year ago

Added on v3.6.0.

maxthegold commented 1 year ago

Great, thanks!

On Fri, 24 Feb 2023, 8:44 pm Juan Gilsanz Polo, @.***> wrote:

Added on v3.6.0.

— Reply to this email directly, view it on GitHub https://github.com/JGeek00/droid-hole/issues/17#issuecomment-1444451357, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJRJC2CPSO6JRYGDY5FHU2DWZEMS7ANCNFSM6AAAAAAUW4Y4V4 . You are receiving this because you authored the thread.Message ID: @.***>