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

[Harbor] /etc/core/key does not meet correct key lenght size #915

Open
HSoulat opened this issue May 15, 2023 · 6 comments
Open

[Harbor] /etc/core/key does not meet correct key lenght size #915

HSoulat opened this issue May 15, 2023 · 6 comments
Assignees
Labels
on-hold Issues or Pull Requests with this label will never be considered stale tech-issues The user has a technical issue about an application

Comments

@HSoulat
Copy link

HSoulat commented May 15, 2023

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

goharbor/harbor-operator#326
goharbor/harbor-operator#404

@HSoulat HSoulat added the tech-issues The user has a technical issue about an application label May 15, 2023
@github-actions github-actions bot added the triage Triage is needed label May 15, 2023
@gongomgra
Copy link
Collaborator

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.

@gongomgra gongomgra added on-hold Issues or Pull Requests with this label will never be considered stale and removed triage Triage is needed labels May 17, 2023
@mpostelnicu
Copy link

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

@gongomgra
Copy link
Collaborator

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.

@florence0239
Copy link

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

goharbor/harbor-operator#326 goharbor/harbor-operator#404

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

@kash1983
Copy link

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

@gongomgra
Copy link
Collaborator

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-hold Issues or Pull Requests with this label will never be considered stale tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

5 participants