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

http_x_remote_user web form didn't work #724

Closed
cdpb opened this issue Oct 9, 2017 · 5 comments
Closed

http_x_remote_user web form didn't work #724

cdpb opened this issue Oct 9, 2017 · 5 comments
Labels

Comments

@cdpb
Copy link
Contributor

cdpb commented Oct 9, 2017

I want to use radicale 2.1.8 behind a reverse nginx proxy with --auth-type http_x_remote_user

nginx pass all variables to radicale corretly

radicale_1 | 'HTTP_X_FORWARDED_FOR': '172.16.0.1',
radicale_1 | 'HTTP_X_REMOTE_USER': 'test',
radicale_1 | 'HTTP_X_SCRIPT_NAME': '/',

I checked the code, it seems the js form didn't test for complete authentication from the proxy - but I am not into js programming ...
So the default form pops up to fill in credentials

Cheers

@Unrud
Copy link
Collaborator

Unrud commented Oct 9, 2017

it seems the js form didn't test for complete authentication from the proxy

Right, it doesn't use the HTTP authentication credentials that the browser already has.
The reason is, that you can't easily logout and login with a different user in most browsers. (Although, there are some hacks to let the browser forget the current HTTP credentials.)

So the default form pops up to fill in credentials

You have to enter your username and password again. If you don't like this, you can configure nginx to allow access to the web interface without requiring authentication (or change the JavaScript in fn.js to skip the login form).

@Unrud Unrud added the question label Oct 9, 2017
@cdpb
Copy link
Contributor Author

cdpb commented Oct 10, 2017 via email

@Unrud
Copy link
Collaborator

Unrud commented Oct 10, 2017

But in fact you cant use reverse proxy authentication anymore since the webform needs another authentication.

The web interface uses the user name and password from the form to authenticate to the HTTP server. (The reverse proxy in your case.)

Against what can js proof if the credentials are valid, since there is no password file in radicale.

The reverse proxy handles the authentication.

Probably I need to share the password file to radicale as well

No, the password file is not used if you use the http_x_remote_user authentication module. Radicale gets the user from the reverse proxy.

It's possible to pass static authentication via nginx to the backend, like

Radicale ignores the AUTHORIZATION header, it gets the user name from the X-REMOTE-USER header.

If it's not possible to fix in radicale you should update your docs

I don't understand the problem.

@cdpb
Copy link
Contributor Author

cdpb commented Oct 13, 2017

Okay maybe I was not clear in what I want to say.
But I don't understand the option http_x_remote_user at all, you can use it, to hack around if you realy want to use it, but thats propably not the problem of radicale.

In the end I learned something more about basic_auth, thank you :)

@cdpb cdpb closed this as completed Oct 13, 2017
@chris2fr
Copy link

chris2fr commented Oct 8, 2022

The issue may be the same as in #1119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants