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

htpasswdString is broken on its own #1210

Open
Vad1mo opened this issue May 29, 2022 · 6 comments
Open

htpasswdString is broken on its own #1210

Vad1mo opened this issue May 29, 2022 · 6 comments
Labels
area/doc bug Something isn't working kind/requirement

Comments

@Vad1mo
Copy link
Member

Vad1mo commented May 29, 2022

registry.credentials.htpasswdString
Is supposed to be an alternative to username and password:

Login and password in htpasswd string format. Excludes registry.credentials.username and registry.credentials.password. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the htpasswd function from helm, which generates different lines each time because of the salt.

However, the implementation of htpasswdString in the Helm Chart is broken, so if you set htpasswdString you can't login. Core and Job are using different passwords:

This search result summarizes why it is not working https://github.com/goharbor/harbor-helm/search?q=registry.credentials.password

Summary why htpasswdString is not working:

  1. templates/jobservice/jobservice-secrets.yaml
    REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }}
  2. templates/core/core-secret.yaml ->
    REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }}

Both Jobservice and Core are still trying to use registry.credentials.password which is different.

The only solution that is working is to set registry.credentials.password together with registry.credentials.htpasswdString

But in that case the Documentation needs an update.

@Vad1mo Vad1mo added the bug Something isn't working label May 29, 2022
@Vad1mo Vad1mo changed the title htpasswdString is broken htpasswdString is broken on its own May 29, 2022
@zyyw
Copy link
Collaborator

zyyw commented Jun 1, 2022

@Vad1mo thanks for the bug filing. Do you happen to have spare time to submit a PR for this?

@ywk253100 ywk253100 added area/doc and removed bug Something isn't working labels Jul 28, 2022
@ywk253100
Copy link
Collaborator

ywk253100 commented Jul 28, 2022

Let's update the doc to declare that it's users' responsibility to make sure the registry.credentials.username and registry.credentials.password match registry.credentials.htpasswdString

RichardSufliarsky added a commit to RichardSufliarsky/harbor-helm that referenced this issue Jul 28, 2022
…d Sufliarsky <richard.sufliarsky@gmail.com>
RichardSufliarsky added a commit to RichardSufliarsky/harbor-helm that referenced this issue Jul 28, 2022
Signed-off-by: Richard Sufliarsky <richard.sufliarsky@gmail.com>
RichardSufliarsky added a commit to RichardSufliarsky/harbor-helm that referenced this issue Aug 15, 2022
Signed-off-by: Richard Sufliarsky <richard.sufliarsky@gmail.com>
Copy link

github-actions bot commented Feb 8, 2024

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

@teochenglim
Copy link

@Vad1mo any work around for the helm chart version for simple case of docker login to work?

@Vad1mo
Copy link
Member Author

Vad1mo commented Mar 5, 2024

The only solution that is working is to set registry.credentials.password together with registry.credentials.htpasswdString

@teochenglim
Copy link

@Vad1mo helm set externalURL is also working for me. Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/doc bug Something isn't working kind/requirement
Projects
None yet
Development

No branches or pull requests

4 participants