vms
vms copied to clipboard
[Harbor] /etc/core/key does not meet correct key lenght size
Platform
Azure
bndiagnostic ID know more about bndiagnostic ID
none
bndiagnostic output
No response
bndiagnostic was not useful. Could you please tell us why?
Not related to Habor configuration
Describe your issue as much as you can
Encryption key lenght in /etc/core/key should be 16 bits long. Bitnami image is generating 64 bits long key.
This difference trigger the following error when we try to add external registry with credentials.
2023-05-15T14:31:25+02:00 [ERROR] [/lib/http/error.go:56]: {"errors":[{"code":"UNKNOWN","message":"unknown: crypto/aes: invalid key size 64"}]}
Here the linked issues / pull request on goharbor project
https://github.com/goharbor/harbor-operator/issues/326 https://github.com/goharbor/harbor-operator/pull/404
Hi @HSoulat.
Thanks for using Bitnami and for reporting this issue. I have created a new internal task for our engineering team to work on a fix for this. I'm also moving the ticket to "on-hold" status so the stale bot doesn't close it due to inactivity.
bumped into an exact same issue with Bitnami Harbor v2.10.0-6abb4ea - it prevents us from adding external registry endpoints. The error is exactly the same mentioned in the original issue comment
Hi @mpostelnicu,
Thanks for using Bitnami. Unfortunately, our engineering team didn't have time to work on this yet, but I will ping them. We will keep you posted.
Platform
Azure
bndiagnostic ID know more about bndiagnostic IDgm-socrates
none
bndiagnostic output
No response
bndiagnostic was not useful. Could you please tell us why?
Not related to Habor configuration
Describe your issue as much as you can
Encryption key lenght in /etc/core/key should be 16 bits long. Bitnami image is generating 64 bits long key.
This difference trigger the following error when we try to add external registry with credentials.
2023-05-15T14:31:25+02:00 [ERROR] [/lib/http/error.go:56]: {"errors":[{"code":"UNKNOWN","message":"unknown: crypto/aes: invalid key size 64"}]}
Here the linked issues / pull request on goharbor project
Hello,
Thanks for sharing this issue. I am also facing this but i can't fund any ideas how to overcome this. If you got the solution please help.
Best regards, florence023
Hi,
same problem
harbor-core | 2024-08-13T10:22:36.958880690Z 2024-08-13T10:22:36Z [ERROR] [/lib/http/error.go:57]: {"errors":[{"code":"UNKNOWN","message":"unknown: crypto/aes: invalid key size 17"}]}
I cant connect any repository with authentication.
With this problem i cant use harbor :(
Thanks, Bj
@kash1983 @florence0239 I understand you should be able to workaround this by manually setting a valid key size into the file and then you restart all services. You can try the next command to populate it (notice you may need sudo
privileges)
head -n "256" /dev/urandom | tr -dc "a-zA-Z0-9" | head -c "17" > /etc/core/key
Hope it helps!