[bitnami/mongodb] Check for MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD when setting auth config (#52272)

Check for MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD when setting auth config

Signed-off-by: Douglas Thomson <djt210@gmail.com>
This commit is contained in:
Douglas Thomson 2023-11-14 09:47:52 +00:00 committed by GitHub
parent 28f9b6b222
commit 64bfec4c41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -606,7 +606,7 @@ mongodb_set_auth_conf() {
local authorization
if ! mongodb_is_file_external "$conf_file_name"; then
if [[ -n "$MONGODB_ROOT_PASSWORD" ]] || [[ -n "$MONGODB_PASSWORD" ]]; then
if [[ -n "$MONGODB_ROOT_PASSWORD" ]] || [[ -n "$MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD" ]] || [[ -n "$MONGODB_PASSWORD" ]]; then
authorization="$(yq eval .security.authorization "$MONGODB_CONF_FILE")"
if [[ "$authorization" = "disabled" ]]; then

View File

@ -606,7 +606,7 @@ mongodb_set_auth_conf() {
local authorization
if ! mongodb_is_file_external "$conf_file_name"; then
if [[ -n "$MONGODB_ROOT_PASSWORD" ]] || [[ -n "$MONGODB_PASSWORD" ]]; then
if [[ -n "$MONGODB_ROOT_PASSWORD" ]] || [[ -n "$MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD" ]] || [[ -n "$MONGODB_PASSWORD" ]]; then
authorization="$(yq eval .security.authorization "$MONGODB_CONF_FILE")"
if [[ "$authorization" = "disabled" ]]; then

View File

@ -606,7 +606,7 @@ mongodb_set_auth_conf() {
local authorization
if ! mongodb_is_file_external "$conf_file_name"; then
if [[ -n "$MONGODB_ROOT_PASSWORD" ]] || [[ -n "$MONGODB_PASSWORD" ]]; then
if [[ -n "$MONGODB_ROOT_PASSWORD" ]] || [[ -n "$MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD" ]] || [[ -n "$MONGODB_PASSWORD" ]]; then
authorization="$(yq eval .security.authorization "$MONGODB_CONF_FILE")"
if [[ "$authorization" = "disabled" ]]; then