Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add property option for mail.smtp.ssl.protocols #1605

Merged
merged 4 commits into from
Jul 15, 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
9 changes: 5 additions & 4 deletions k8s/matchers/uaa_config_structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ type Database struct {
}

type Smtp struct {
Host string `yaml:"host"`
Port string `yaml:"port"`
Starttls string `yaml:"starttls"`
FromAddress string `yaml:"from_address"`
Host string `yaml:"host"`
Port string `yaml:"port"`
Starttls string `yaml:"starttls"`
FromAddress string `yaml:"from_address"`
Sslprotocols string `yaml:"sslprotocols"`
}

type OauthClient struct {
Expand Down
1 change: 1 addition & 0 deletions k8s/templates/uaa.lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ smtp:
port: #@ data.values.smtp.port
starttls: #@ data.values.smtp.starttls
from_address: #@ data.values.smtp.from_address
sslprotocols: #@ data.values.smtp.sslprotocols

oauth:
client:
Expand Down
1 change: 1 addition & 0 deletions k8s/templates/values/_values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ smtp:
password: ~
starttls: ~
from_address: ~
sslprotocols: ~

admin:
client_secret: ~
Expand Down
10 changes: 6 additions & 4 deletions k8s/test/config_map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ logger.cfIdentity.appenderRef.uaaDefaultAppender.ref = UaaDefaultAppender`
"smtp.port": "smtp port",
"smtp.starttls": "smtp starttls",
"smtp.from_address": "smtp from_address",
"smtp.sslprotocols": "smtp sslprotocols",
"issuer.uri": "http://some.example.com/with/path",
})

Expand All @@ -145,10 +146,11 @@ logger.cfIdentity.appenderRef.uaaDefaultAppender.ref = UaaDefaultAppender`
"Url": Equal("any other database connection string"),
}),
"Smtp": MatchFields(IgnoreExtras, Fields{
"Host": Equal("smtp host"),
"Port": Equal("smtp port"),
"Starttls": Equal("smtp starttls"),
"FromAddress": Equal("smtp from_address"),
"Host": Equal("smtp host"),
"Port": Equal("smtp port"),
"Starttls": Equal("smtp starttls"),
"Sslprotocols": Equal("smtp sslprotocols"),
"FromAddress": Equal("smtp from_address"),
}),
})
}),
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/resources/spring/login-ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@
<props>
<prop key="mail.smtp.auth">${smtp.auth:false}</prop>
<prop key="mail.smtp.starttls.enable">${smtp.starttls:false}</prop>
<prop key="mail.smtp.ssl.protocols">${smtp.protocols:TLSv1.2 TLSv1.4}</prop>
<prop key="mail.smtp.ssl.protocols">${smtp.sslprotocols:TLSv1.2}</prop>
</props>
</property>
</bean>
Expand Down