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

Allow setting S3 certificate authority (CA) list #17748

Closed
effnish opened this issue Jul 18, 2024 · 5 comments
Closed

Allow setting S3 certificate authority (CA) list #17748

effnish opened this issue Jul 18, 2024 · 5 comments
Assignees
Milestone

Comments

@effnish
Copy link

effnish commented Jul 18, 2024

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

Our minio cluster is served over https using a certificate signed by an internal CA. If I understand the code correctly, the S3 state-store compiles in the Mozilla CA list and can't be overridden.

Describe the solution you'd like

It would be very helpful if I could set the common SSL_CERT_FILE environment variable or another config parameter to have RisingWave use the specified file or the system CA list for the S3 connector.

Describe alternatives you've considered

I'm currently running the software with a custom Traefik route and a hostAlias in Kubernetes to proxy the connection. e.g. RisingWave (http) -> Traefik -> (https) Minio

Additional context

No response

@github-actions github-actions bot added this to the release-1.11 milestone Jul 18, 2024
@fuyufjh fuyufjh modified the milestones: release-2.0, release-2.1 Aug 19, 2024
@tabVersion
Copy link
Contributor

#17826 is trying to fix the issue. Are you willing to help with testing?

@effnish
Copy link
Author

effnish commented Sep 2, 2024

I'm not sure if #17826 addresses this issue. I'm completely ignorant of the code structure, but I think src/object_store/src/object/s3.rs#L660 is what was tripping me up.

let conn = hyper_rustls::HttpsConnectorBuilder::new()
            .with_webpki_roots() // <-- prevents using a self-signed CA cert for Minio as object store for RisingWave itself
            .https_or_http()
            .enable_all_versions()
            .wrap_connector(http);

@tabVersion
Copy link
Contributor

I'm not sure if #17826 addresses this issue. I'm completely ignorant of the code structure, but I think src/object_store/src/object/s3.rs#L660 is what was tripping me up.

let conn = hyper_rustls::HttpsConnectorBuilder::new()
            .with_webpki_roots() // <-- prevents using a self-signed CA cert for Minio as object store for RisingWave itself
            .https_or_http()
            .enable_all_versions()
            .wrap_connector(http);

Oh, I got the problem. Do you mean you are using a s3 service which needs a custom cert to connect to? cc @wcy-fdu

@effnish
Copy link
Author

effnish commented Sep 5, 2024

Yes, sorry I was clear before. We're running Minio as a separate deployment in k8s that's enforcing all connections are over https. The certificate it serves is signed by a custom/internal CA certificate. The .with_webpki_roots() call only trusts the certificate authorities that are shipped by Mozilla and ignores the server's CA store and other overrides.

When I configure the following in helm, I get certificate validation errors:

state_store:
  minio:
    enabled: true
    endpoint: https://minio.example.internal
    bucket: risingwave

@effnish
Copy link
Author

effnish commented Sep 28, 2024

This looks to be resolved by #18011

@effnish effnish closed this as completed Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants