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

MinIO Console UI should report failure to communicate with MinIO during login as "Server not reachable" instead of "Invalid Login" #3427

Closed
ecerulm opened this issue Aug 29, 2024 · 2 comments · Fixed by #3432
Assignees

Comments

@ecerulm
Copy link

ecerulm commented Aug 29, 2024

Is your feature request related to a problem? Please describe.

I had a new setup with HAProxy and 2 minio servers, and I couldn't login via the MinIO console at :9001.

I was getting "Invalid Login" (both in the json response that I could see fromt he browser > developer tools> network tab) and in the UI as a red banner saying "Invalid login".

The culprit was I used MINIO_SERVER_URL and that somehow prevented MinIO console from reaching the MinIO server.

But really the "Invalid Login" was misleading me into thinking there was an issue with the credentials. At the end I got help from @marktheunissen in slack , and he identified that I could get rid of the MINIO_SERVER_URL.

My point is that the error message in this case it should not be "Invalid Login" but "Server not reachable" or "Server invalid TLS" or something like that. That will help MinIO beginners like me that mistakenly thought MINIO_SERVER_URL was required when using HAProxy.

Describe the solution you'd like
Any of the following

  • at startup minio console part can do a sanity check about the reachability of the server , and print something in the startup log
  • at runtime the console can rely some of the underlying error to the browser client. I understand that you don't want to leak the full error to the browser , but specific error like "server unreachable" , "server invalid TLS certificate", etc I believe do not leak important information about the setup

Describe alternatives you've considered

Additional context

image

The correct message in the image above should have been "server unreachable" (or whatever was the actual top level cause),

@marktheunissen
Copy link
Contributor

I have noticed this trip up a lot of people, and I think a better error message, if possible, would help users a lot to identify the issue

@ecerulm
Copy link
Author

ecerulm commented Aug 29, 2024

@harshavardhana mentioned in minio/docs#1312 (comment)

It isn't done in vain, it was an ask by the customer to avoid reporting "login errors" to avoid brute force attacks on the login vector in the name of security by (obscurity)

We used to be more descriptive in the past but it was implemented to make it vague on purpose.

I understand that you don't want to leak information about the login process that could be used by an attacker to learn about the system.

But in the specific case of "MinIO Console can't reach MinIO Server" I believe it would not leak anything. In a way, MinIO Console is already leaking that there is a connectivity issue between console and server since it takes 10 seconds to send the "Invalid Login". If you just write the incorrect credentials it tells you right away "Invalid Login" if the console can't communicate with server it "waits" 10 seconds and then gives the "Invalid Login".

So I hope you consider having both "Invalid Login" and "MinIO Server not reachable" as errors in the console as both are IMHO "vague" enough.

I mean, I already know how it works so I don't think it will happen to me again, but for the newcomers it will help.

ravindk89 added a commit to minio/docs that referenced this issue Sep 23, 2024
The MinIO Console currently does not warn the user if the MinIO server
is not reachable. MinIO Console will just say "Invalid Login" when the
MINIO_SERVER_URL is not reachable which is misleading in the sense that
will make think most people that the username/password/access key is
incorrect so I think it should be mentioned in the documentation that
Invalid Login could be just due to connectivity between console and
server.

Related to minio/console#3428 and
minio/console#3427

@marktheunissen

---------

Co-authored-by: Ruben Laguna <ruben.laguna@tele2.com>
Co-authored-by: Ravind Kumar <ravindk89@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants