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

support http basic auth #491

Open
dJani97 opened this issue Sep 28, 2024 · 3 comments
Open

support http basic auth #491

dJani97 opened this issue Sep 28, 2024 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@dJani97
Copy link

dJani97 commented Sep 28, 2024

Hi!

The Immich mobile app now supports sending arbitrary HTTP header values to the server, which allows setting up basic authentication using a reverse proxy: immich-app/immich#6840

Such a server will be unreachable from the outside world without supplying the basic auth headers. Could immich-go also support basic auth?

@simulot simulot added the enhancement New feature or request label Sep 29, 2024
@simulot
Copy link
Owner

simulot commented Sep 29, 2024

The use of tokens for the authentification to the API is better practice than the use of password.

You may consider following options:

  • configure the proxy to let API calls to pass through
  • bypass the proxy by call the physical IP address of the server
  • use a VPN to access to the server's local IP

@oddlama
Copy link

oddlama commented Oct 8, 2024

The use of tokens for the authentification to the API is better practice than the use of password.

How so? Adding basic_auth to a reverse proxy prevents all requests from hitting the server at all, unless authenticated. If there were a pre-authentication security vulnerability in immich (which we cannot know) and you let API calls pass through, then it can be exploited. But adding basic_auth would prevent this.

So token authentication isn't strictly better practice, it entirely depends on your threat model. Someone who'd configure basic_auth on immich probably does so to add additional security to their instance.

Recommending the use of a overlay network is fair advice, but saying that tokens are better than passwords is without merit.

@simulot
Copy link
Owner

simulot commented Oct 9, 2024

This is a shared opinion on the internet and I'm certainly not a security expert.

The API key is easy to implement.
The immich commits regarding this issue are about JWT. I'd need some help to implement it correctly.

@simulot simulot added the help wanted Extra attention is needed label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants