Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ignore minimalTlsVersion mismatch when the sslEnforcement is disabled #310

Merged
merged 2 commits into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/database/postgresqlserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ spec:
resourceGroupNameRef:
name: example-rg
location: West US 2
minimalTlsVersion: TLS12
sslEnforcement: Disabled
minimalTlsVersion: TLS1_2
sslEnforcement: Enabled
version: "9.6"
sku:
# Note that Basic servers do not support virtual network rules
Expand Down
2 changes: 1 addition & 1 deletion pkg/clients/database/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func IsMySQLUpToDate(p azuredbv1beta1.SQLServerParameters, in mysql.Server) bool
return false
}
switch {
case p.MinimalTLSVersion != string(in.MinimalTLSVersion):
case p.MinimalTLSVersion != string(in.MinimalTLSVersion) && p.SSLEnforcement != string(mysql.SslEnforcementEnumDisabled):
sergenyalcin marked this conversation as resolved.
Show resolved Hide resolved
return false
case p.SSLEnforcement != string(in.SslEnforcement):
return false
Expand Down
2 changes: 1 addition & 1 deletion pkg/clients/database/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func IsPostgreSQLUpToDate(p azuredbv1beta1.SQLServerParameters, in postgresql.Se
return false
}
switch {
case p.MinimalTLSVersion != string(in.MinimalTLSVersion):
case p.MinimalTLSVersion != string(in.MinimalTLSVersion) && p.SSLEnforcement != string(postgresql.SslEnforcementEnumDisabled):
sergenyalcin marked this conversation as resolved.
Show resolved Hide resolved
return false
case p.SSLEnforcement != string(in.SslEnforcement):
return false
Expand Down