mirror of
https://github.com/bitnami/containers.git
synced 2026-10-17 18:04:55 +02:00
[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:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user