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 specifying a custom CA certificate in Bucket API #973

Closed
makkes opened this issue Dec 3, 2022 · 7 comments · Fixed by #1475
Closed

Allow specifying a custom CA certificate in Bucket API #973

makkes opened this issue Dec 3, 2022 · 7 comments · Fixed by #1475
Assignees
Labels
area/bucket Bucket related issues and pull requests area/security Security related issues and pull requests
Milestone

Comments

@makkes
Copy link
Member

makkes commented Dec 3, 2022

As a user that has a custom S3 implementation such as MinIO running in my cluster, I want to be able to use an encrypted connection between s-c and the S3 server. For that to work, I need to be able to define a custom CA certificate in the caFile field of the Secret referred to in the .spec.secretRef. Using the caFile field is in line with other resources such as GitRepositories and {HelmRepositories](https://fluxcd.io/flux/components/source/helmrepositories/#tls-authentication).

@pjbgf
Copy link
Member

pjbgf commented Dec 5, 2022

This may be impacted by fluxcd/flux2#3366.

@makkes
Copy link
Member Author

makkes commented Dec 5, 2022

I would say let's put this one on hold until fluxcd/flux2#3366 is addressed.

@makkes makkes added hold Issues and pull requests put on hold area/bucket Bucket related issues and pull requests area/security Security related issues and pull requests labels Dec 5, 2022
@tboerger
Copy link

tboerger commented May 3, 2024

Are there any chances to get this resolved even that #3366 covers a larger scope? At least for other resources like HelmRepository there have been already a fix but currently I'm missing exactly for this Bucket resource a CA certificate validation (or even a skip of the verification) for a setup where I would store helm chart artifacts within an S3-compatible storage because I don't have access to helm repositories.

@stefanprodan stefanprodan removed the hold Issues and pull requests put on hold label May 5, 2024
@stefanprodan
Copy link
Member

In Flux 2.4 we plan to ship Bucket GA so we can get started working on improvements to this API next.

We should add .spec.certSecretRef to the Bucket API similar with what we have in OCIRepository https://fluxcd.io/flux/components/source/ocirepositories/#cert-secret-reference basically supporting self-signed certs by providing the CA in a secret and also mTLS by providing the client certs. cc @matheuscscp

PS. @tboerger using a Bucket full of Chart tgz will not work with Flux, you should push the charts to your container registry and use Helm OCI.

@stefanprodan stefanprodan added this to the Bucket GA milestone May 5, 2024
@matheuscscp
Copy link
Contributor

I'd like to work on this!

cc @stefanprodan

@tboerger
Copy link

tboerger commented May 5, 2024

Good to know that it won't work as I was planning to do it. Sadly most charts I want to use aren't published as oci images so far.

@matheuscscp
Copy link
Contributor

matheuscscp commented May 5, 2024

Good to know that it won't work as I was planning to do it. Sadly most charts I want to use aren't published as oci images so far.

@tboerger

If you are planning on vendoring helm chart tarballs in a private bucket you can probably still do that, but using the HelmChart API instead and something like https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/set-up-a-helm-v3-chart-repository-in-amazon-s3.html.

I think you can probably achieve the equivalent of this AWS s3 setup using MinIO, i.e. make it work like a vanilla HTTP helm repo.

But if you are taking the time to vendor charts in a private bucket you would probably want to consider vendoring through OCI helm repos instead, the effort is probably on the same scale of vendoring through vanilla HTTP. See this: https://docs.aws.amazon.com/AmazonECR/latest/userguide/push-oci-artifact.html

@stefanprodan stefanprodan changed the title Allow for specifying a custom CA certificate in a Bucket Allow specifying a custom CA certificate in Bucket API May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/bucket Bucket related issues and pull requests area/security Security related issues and pull requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants