hauler-dev / hauler

Airgap Container Swiss Army Knife
https://hauler.dev
Apache License 2.0
128 stars 30 forks source link

[BUG] Chart Username and Password are not working #190

Open clemenko opened 8 months ago

clemenko commented 8 months ago

Environmental Info: 67 degrees and overcast

Hauler Version: 1.0.0.0.0.0.0

System CPU architecture, OS, and Version:

Describe the bug: the hauler store sync does not accept --username and --password fields for helm charts.

Steps To Reproduce:

apiVersion: content.hauler.cattle.io/v1alpha1
kind: Charts
metadata:
  name: rancher-charts
spec:
  charts:
    - name: rancher
      repoURL: https://releases.rancher.com/server-charts/latest
      version: v2.8.2
      username: bob
      password: denver

Expected behavior: it work?

Actual behavior: it not work

Additional context / logs: kitten photo 1440

amartin120 commented 8 months ago

Temp solution would be to do a helm registry login [host] [flags] prior to running the hauler commands. Similar to what we were doing with cosign/docker login prior to adding hauler login for images.

I may look into splitting hauler login to handle either types as I'm not sure if I want people adding a bunch of username/passwords in their manifest.

wcrum commented 8 months ago

@amartin120 related to authentication, what are your thoughts on extending the hauler store serve command with basic authentication and the ability to define TLS certs to serve via HTTPS? I know of several instances where HTTP in air-gapped / classified domains is strictly denied.

clemenko commented 8 months ago

Temp solution would be to do a helm registry login [host] [flags] prior to running the hauler commands. Similar to what we were doing with cosign/docker login prior to adding hauler login for images.

I may look into splitting hauler login to handle either types as I'm not sure if I want people adding a bunch of username/passwords in their manifest.

this is the work around. hauler store add chart chart1 --repo https://gitlab.com/......helm/stable --username="fsfsafdasfsdaf" --password="dsfsafsafs" --version 0.30.4

FYI helm registry login does not work...

amartin120 commented 8 months ago

Hmm, helm registry login was working fine for me but I guess I'm going crazy(er). I'll need to dig into that as well.

Yeah, I'm just wrong on this one. Thanks for helping me think this through more. And just to reiterate your point, the hauler store add chart works fine. There just isn't a current solution for helm authentication when using the manifests.

dweomer commented 8 months ago

As per convo with @amartin120, we need to implement hauler login for helm repositories that in effect does a helm repo add [--username=] [--password=]

zackbradys commented 2 months ago

Hey @amartin120, please review this!