-
Notifications
You must be signed in to change notification settings - Fork 298
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 gives "Invalid login" if internal CA cert is not imported when using reverse proxying inside docker #3315
Comments
I have the same problem when implementing it with Nginx Proxy with SSL. |
Hmm, I actually see Im using http to proxypass to minio, wonder if that had any affect. It seems in the docs they use https for frontend and https for proxypass. Sadly cant test untill a week from now. What exactly were you referring to? |
Hello, noticed you have
|
Mmm not sure it should be warned in the web browser client, think about it MinIO Console running in browser has no way to know the TLS Certificate is not truted from Nginx invoking MinIO Console. Browse is only going to receive a valid https reponse, with a non-satisfactory message. This specific case should be monitored on Nginx, and probably add the trusted TLS CA with ssl_trusted_certificate sequenceDiagram
Browser->>+Nginx: https (trusted certificate)
Nginx->>-MinIO Console Server : https (non trusted certificate)
|
Sending this ticket to ducumentation team for the outstanding items cc @ravindk89 @feorlen @djwfyi |
I notice that you are using Docker while referencing the Linux docs. |
Yeah, noticed that after the issue post as well. Though would setting it to https change anything? I am guessing Minio would still need to have a SSL cert imported?
Agreed. The SSL certificate is imported inside nginx as other apps depend on it and would be obvious from my side that it would not be working. Nothing else to be done here.
These docs are much more helpful but there was no way to for me to find the link to it when researching the reverse proxy and trying to make it work. I am aware of just reading the manual, but in the docs for reverse proxying it does not state that https is mandatory, explicitly, and that you'd need to import your CA cert if not trusted. Probably some kind of linkage between these two sites would be great and some more info about it if possible. Thank you for the link. |
@pitastrudl @pjuarezd since I am notified this issue is closed without further progress, I would like to share some experience I just gained when solving this problem. If you have used NGINX as a proxy, it would be better to configure SSL in nginx's virtual server, so that the HTTPS connection is terminated at nginx, and nginx will forward the request to the Minio console with plain HTTP (not put certificate files at Minio's server {
listen 443 ssl;
listen [::]:443 ssl;
server_name s3.your.domain;
ssl_certificate /etc/nginx/ssl/minio.crt; # certificate for accessing minio's domain
ssl_certificate_key /etc/nginx/ssl/minio.key;
#...
} In this way, setting
Considering various deployment scenarios,
@pitastrudl Beside, from your post,
I also learn that putting CA's certificate at
After looking around, the official document indeed provides dedicated instructions to enable TLS for Minio services, under deployment of Linux, Docker, etc., which just like what @pitastrudl mentioned. From the above document, we can see
What problem we confronted is that MinIO console will connect to MinIO s3 storage to accessing the internal system bucket. In this scenario, MinIO s3 storage is the so-called "other service" as quoted above, while Minio client should be regard as a client. So, we need to add its/CA's certificate to the Minio's trust store. Furthermore, does Minio server really validate the TLS certificate of connecting client? My experience is that a client will validate the server's certificate (As we see in browser, if we browse a website without trusted certificate), but does the validation also occur at the server side? If I really need to add a client's certificate to the trust store, where to find it? For example, where is the certificate for a browser like Chrome/Edge, or an application that access S3 storage.
|
So the reason this is closed out is because of this : #3319 We are hoping this should remove the need for I will note - we are not (nor can we be) nginx experts nor provide that level of support. The tutorials we have are best effort for what works in local environments, not necessarily what will work in any or ever production environment. Community feedback usually helps to close the gap a little bit.
I believe it will depend on the certificate. Keep in mind via browser you hit the MinIO Console, which has its own way of talking to the server. But a client using a third-party or self-signed certificate will, I believe, have some issues talking to MinIO if that 3P CA or self-signed cert key isn't included in the |
As suggested in minio/console#3315 (comment)
NOTE
I deployed Minio in Docker swarm and was battling getting the console work for several hours. Minio gave no indication of errors and nginx was only saying '401 unahtorized'. In the end what solved it was to include the CA certificate of our internal CA being used to access our services (including minio console) into the default path
/root/.minio/certs/CAs/internal.crt
.Expected Behavior
With the correct proxying settings for nginx and minio config - console is supposed to open.
Current Behavior
With the correct proxying settings for nginx and minio config - console says 'invalid login' even with correct credentials. Minio container should warn if a certificate is missing.
Possible Solution
Steps to Reproduce (for bugs)
Context
Trying to setup minio to be used within services of the Docker swarm deployment. All services are exposed via HTTPs endpoints which Minio supports. Custom internal CA is used for issuing SSL certificates for secure communication. Additional documentation for this could be done.
I only managed to solve this after finding this issue ( minio/minio#19096 ) and translating the (google translate said Chinese) and seeing that they had issues with certificates.
On an unrelated note, https://min.io/docs/minio/linux/integrations/setup-nginx-proxy-with-minio.html should note that the console does need access to the API as its defined in the environment variables. This is referenced in the README.md.
Regression
Unknown
Your Environment
uname -a
): In Docker version 24.0.9Nginx proxy conf (double $$ due to jinja2 escaping):
Docker command:
command: 'server /data --console-address ":9001"'
Minio environmental settings:
The text was updated successfully, but these errors were encountered: