digitalnodecom / node-red-contrib-generic-s3

Generic S3 nodes for use in Node-RED
https://www.npmjs.com/package/@digitalnodecom/node-red-contrib-generic-s3
Apache License 2.0
3 stars 5 forks source link

connection to local encrypted Minio session not possible #45

Closed aperiodicchain closed 6 months ago

aperiodicchain commented 1 year ago

Hi, I am having a local Minio installation with TLS/SSL enabled on https://192.168.1.1:9000 This certificate is self signed, so I get the below error message from the "Put Object" node.

In Minio there is a --insecure flag that bypasses verification of the certificate against a thrust store. Is there a way to achieve the same here, without having to revert the whole Minio deployment to plain http?

Error: self signed certificate
rristov60 commented 1 year ago

Thanks for opening this issue @aperiodicchain, we are investigating if this is possible. I don't see a reason why it shouldn't be, but I haven't found anything specific yet. I will get back to you once we have something useful.

trajche commented 1 year ago

I am not sure if this should be set on Node-RED level or on the S3 library/node itself?

rristov60 commented 12 months ago

@aperiodicchain, @trajche after a thorough investigation, it turns out that it is not that simple to implement this, at least from the resources I found and tried out. I will keep this issue open, since I'll further research this topic, but I think we all agree that it is not a wise idea to trust these kind of certificates. However, you can make it work for now is with two approaches. I would highly recommend AVOIDING the FIRST one and USING the SECOND apporach.

1. NODE_TLS_REJECT_UNAUTHORIZED=0

2. NODE_EXTRA_CA_CERTS=/path/to/minio/public.crt (RECOMMENDED)

aperiodicchain commented 10 months ago

@rristov60 Thanks for your thorough investigation! Since I am also using public endpoints I clearly opted for the recommended 2nd suggestion to add my local self signed cert.

I simply had to add this to my node-red Dockerfile:

USER root
ADD .secrets/public_mesh.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates

I can successfully connect now.