openshift/ansible-service-broker

Helm registry adapter HTTP basic authentication

RikuXan opened this issue · 7 comments

Is it possible to use HTTP basic authentication with the Helm registry adapter?

The only reference to HTTP basic auth that I can see in the docs refer to the broker's authentication itself, for the registries I can only find the user and pass configuration variables which seem to be specific to certain registry types (e.g. Docker Hub or RHCC) and are not translated into HTTP basic auth headers.
Embedding the credentials in the URL does not seem to work either.

@RikuXan Looking at the code, the helm_adapter definitely doesn't use the user, password or auth_type that is supported in the registry Configuration. That being said the user and pass in the url should work.

registry:
  - name: stable
    type: helm
    url: "https://user:pass@kubernetes-charts.storage.googleapis.com"
    runner: "docker.io/automationbroker/helm-runner:latest"
    white_list:
      - ".*"

Seems like the above syntax should work. We don't do anything with the URL, we simply pass it along without transformation. What does your configuration look like? (please sanitize any sensitive values before posting configs).

@jmrodri Indeed, supplying the parameters in the URL does work. Apparently I did something wrong when I tried it first, thanks for the help.

Reopening this, because it seems that while the automationbroker/helm-runner image does add the repository with the basic auth parameters in the URL and can therefore pull the index.yaml file, the subsequent fetch/install/upgrade of an image does not "remember" the auth parameters and fails with a 401.
Is there a trick to this, or do I need to configure my helm repository to serve absolute URLs containing the basic auth parameters already?

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

/close please reopen if this is still an issue.

/close

@jmrodri: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.