Web UI access without user/password #1046

Open
opened 2026-10-05 05:00:18 +02:00 by adam · 6 comments
Owner

I'm using reverse proxy and would like to handle all my service authentication by using other methods, like basic HTTP auth or others. How can one disable user/password login form and go straight to the web UI?

I'm using reverse proxy and would like to handle all my service authentication by using other methods, like basic HTTP auth or others. How can one disable user/password login form and go straight to the web UI? <!-- github-sync-id:2437968978 -->
Author
Owner

Uhm... I think "use HTTP basic auth" is the answer, but since you are asking... uhm...

Just to confirm: Do I understand correctly that just using HTTP basic auth is not working for you?

Uhm... I think "use HTTP basic auth" is the answer, but since you are asking... uhm... Just to confirm: Do I understand correctly that just using HTTP basic auth is not working for you? <!-- github-comment-id:2258584786 -->
Author
Owner

No, I want to use HTTP basic auth but for it to make sense, I want to disable ZNC web UI login form and go straight to user page on page load.

No, I want to use HTTP basic auth but for it to make sense, I want to disable ZNC web UI login form and go straight to user page on page load. <!-- github-comment-id:2259046455 -->
Author
Owner

I just tried it out and HTTP basic auth works here:

Without auth:

$ curl --silent http://localhost:1234 | grep 'Not logged in'       
			<span id="logged_in_no">Not logged in</span>

With auth:

$ curl --silent --basic --user abc:abc http://localhost:1234  | grep -E 'invalid|logged' 
			<span id="logged_in_yes">Logged in as: <span class="user_name">abc</span></span>

With invalid auth:

$ curl --silent --basic --user abc:abc2 http://localhost:1234  | grep -E 'invalid|logged'
<p>HTTP Basic authentication attempted with invalid credentials</p>

Checking that there is a login form without basic auth and no login form if I provided a valid basic auth login:

$ curl --silent --basic  http://localhost:1234  | grep form       
				<form action="/login" method="post">
				</form>
$ curl --silent --basic --user abc:abc http://localhost:1234  | grep form  
I just tried it out and HTTP basic auth works here: Without auth: ``` $ curl --silent http://localhost:1234 | grep 'Not logged in' <span id="logged_in_no">Not logged in</span> ``` With auth: ``` $ curl --silent --basic --user abc:abc http://localhost:1234 | grep -E 'invalid|logged' <span id="logged_in_yes">Logged in as: <span class="user_name">abc</span></span> ``` With invalid auth: ``` $ curl --silent --basic --user abc:abc2 http://localhost:1234 | grep -E 'invalid|logged' <p>HTTP Basic authentication attempted with invalid credentials</p> ``` Checking that there is a login form without basic auth and no login form if I provided a valid basic auth login: ``` $ curl --silent --basic http://localhost:1234 | grep form <form action="/login" method="post"> </form> $ curl --silent --basic --user abc:abc http://localhost:1234 | grep form ``` <!-- github-comment-id:2260834702 -->
Author
Owner

No, I think there's a misunderstanding.

What I'm looking for is to just disable ZNC web UI login form so I can use authentication on my reverse proxy level (Traefik+Authelia) and avoid having to log in twice.

No, I think there's a misunderstanding. What I'm looking for is to just disable ZNC web UI login form so I can use authentication on my reverse proxy level (Traefik+Authelia) and avoid having to log in twice. <!-- github-comment-id:2268674346 -->
Author
Owner

Ah, sorry.

Uhm, how do you intend to tell apart users? The proxy does its own authentication and then adds some headers with the result? My only ideas right now would be "hardcode the password in the proxy so that it sends that along" and "implement some own module that doesn't exist yet so that no password is needed".

Sorry.

Ah, sorry. Uhm, how do you intend to tell apart users? The proxy does its own authentication and then adds some headers with the result? My only ideas right now would be "hardcode the password in the proxy so that it sends that along" and "implement some own module that doesn't exist yet so that no password is needed". Sorry. <!-- github-comment-id:2269502795 -->
Author
Owner

Ah okay. Consisering im the only user I have no need for authenticatin on each service i run. I know some projects like Calibre Web allow defining a header that proxy sends so it lets user in. Perhaps something like that would be great to have.

Ah okay. Consisering im the only user I have no need for authenticatin on each service i run. I know some projects like Calibre Web allow defining a header that proxy sends so it lets user in. Perhaps something like that would be great to have. <!-- github-comment-id:2269944279 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#1046