goharbor/harbor-helm

s3 Access Key Error

coffee-time-design opened this issue · 4 comments

Hi,
I notice that when I install Harbor from the helm chart and connect the registry to s3, the username from the section of registry is sent to s3 instead of the access key from the s3 section.
So this:

registry:
  credentials:
    username: "123456"

overrides this:

    s3:
      accesskey: supersecretid

Thus I get this when trying to store an image:
registry-harbor-registry-5d99554765-h8rnr registry 2024-05-22T10:42:25.915208296+10:00 time="2024-05-22T00:42:25.915034637Z" level=error msg="response completed with error" auth.user.name=123456 err.code=unknown err.detail="s3aws: InvalidAccessKeyId: The AWS Access Key Id you provided does not exist in our records.

Not sure if this is intentional or I'm doing something wrong.

zyyw commented

Could you please share with us the helm install command and the values.yaml with us when you try to install Harbor with harbor-helm? Mask the sensitive information as necessary.

Sure:
https://gist.github.com/coffee-time-design/a62b9c92edbae96dd40a982777ba6c71
Let me know if you want any other components (redis/postgres/minio ect ect)

zyyw commented

According to this https://gist.github.com/coffee-time-design/a62b9c92edbae96dd40a982777ba6c71#file-gistfile1-txt-L218-L229, it seems that you comment out imageChartStorage.

BTW, the readme tells us the usage of registry.credentials.username.

Yes, sorry you are correct, I haven't been able to get it working so it is commented out, I think I understand that the username is the account in harbor, that is then attempting to use the AWSaccesskey to access the S3 endpoint, so its probably not using the username as the accesskey itself, rather that user is.
Anywho, thanks for the reply, I'll swing back around to it at some stage to try and get s3 working, right now filesystem is doing the job.