kelektiv / node.bcrypt.js

bcrypt for NodeJs
MIT License
7.4k stars 512 forks source link

Bcrypt 5.0.1 to 5.1.0 introduces breaking changes #966

Closed peterver closed 1 year ago

peterver commented 1 year ago

Upgrading from 5.0.1 to 5.1.0 causes node pods to not boot up when running with a restrictive security context in docker on kubernetes.

According to the rules of semver a minor version change should not introduce breaking changes.

Expected behavior: 5.0.1 -> 5.1.0 upgrade should have been able to be done without introducing breaking changes. We're pinning the version to 5.0.1 for now.

Screenshot from 2022-10-13 11-52-42

(screenshot is from k8s logs for the affected pods)

The security context attached to these pods is the following (HCL code):

security_context {
    allow_privilege_escalation = false
    capabilities {
        drop = ["ALL"]
    }
    privileged = false
    run_as_non_root = true
    run_as_user = 1000
}
recrsn commented 1 year ago

This is a known issue

stupkad commented 1 year ago

see #965 for details chmod 774 <path>/bcrypt/lib/binding/napi-v3/bcrypt_lib.node might help

recrsn commented 1 year ago

Is this still happening?

lcdss commented 1 year ago

Is this still happening?

Yep, it just happened to me using the latest version of everything.