Skip to content

Commit

Permalink
Remove tlsAllowInvalidCertificates option (#325)
Browse files Browse the repository at this point in the history
## Issue
Security team requests to terminate the use of the
`tlsAllowInvalidCertificates ` flag
  • Loading branch information
MiaAltieri authored Jan 19, 2024
1 parent 678f839 commit 36c0612
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/charms/mongodb/v1/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ def get_mongod_args(
f"--tlsCAFile={full_conf_dir}/{TLS_EXT_CA_FILE}",
f"--tlsCertificateKeyFile={full_conf_dir}/{TLS_EXT_PEM_FILE}",
# allow non-TLS connections
"--tlsMode=preferTLS",
"--tlsMode=requireTLS",
"--tlsDisabledProtocols=TLS1_0,TLS1_1",
]
)

Expand All @@ -183,7 +184,6 @@ def get_mongod_args(
cmd.extend(
[
"--clusterAuthMode=x509",
"--tlsAllowInvalidCertificates",
f"--tlsClusterCAFile={full_conf_dir}/{TLS_INT_CA_FILE}",
f"--tlsClusterFile={full_conf_dir}/{TLS_INT_PEM_FILE}",
]
Expand Down

0 comments on commit 36c0612

Please sign in to comment.