WSO2 API Manager 2.6.0 与 AWS SES 集成时无法使用 TLSv1.2

问题描述 投票:0回答:1

我们目前使用的是 WSO2am 2.6.0 版本,尚未升级到更新的版本。

使用 Java8 部署应用程序。由于 AWS SES 不再接受低于 TLSv1.2 的任何内容,我们在重置密码时遇到发送电子邮件的问题。

有人能够为 WSO2am 电子邮件客户端强制使用 TLSv1.2 吗?

我看到了一些与更新“output-event-adapters.xml”中的电子邮件适配器配置以强制使用 TLSv1.2 相关的帖子。

就像这样。

<adapterConfig type="email">
    <property key="smtp.from">[email protected]</property>
    <property key="smtp.username">your-username</property>
    <property key="smtp.password">your-password</property>
    <property key="mail.smtp.ssl.protocols">TLSv1.2</property>
    <!-- Other email properties -->
</adapterConfig>

不幸的是,这不起作用,我们还尝试将 TLS 版本添加为 JVM 参数,但这也不起作用。

-Dhttps.protocols=TLSv1.2

堆栈跟踪错误

com.sun.mail.smtp.SMTPSendFailedException: 554 Access denied: Amazon SES no longer supports TLS 1.0 and TLS 1.1 connections. You must update your client to use TLS version 1.2 or above. To learn more and to update your client, see https://go.aws/3AUlVSb. For further assistance, contact AWS support 
wso2-api-manager tls1.2 wso2-identity-server amazon-ses
1个回答
0
投票

请尝试在 key 属性中使用单引号设置参数:

<adapterConfig type="email">
    <property key="smtp.from">[email protected]</property>
    <property key="smtp.username">your-username</property>
    <property key="smtp.password">your-password</property>
    <property key="'mail.smtp.ssl.protocols'">TLSv1.2</property>
    <!-- Other email properties -->
</adapterConfig>

我在使用 Tibco EMS 配置 JMS 连接时遇到了类似的问题,其中某些参数未从配置(deployment.toml)中导出。当时的解决方案是对参数加单引号。例如,来自:

name = "SenderTIBCOFactory_topic"
parameter.initial_naming_factory = "com.tibco.tibjms.naming.TibjmsInitialContextFactory"
parameter.provider_url = "{{tibcoems.provider_url}}"
parameter.connection_factory_name = "{{tibcoems.topics_factory_name}}"
parameter.jms_spec_version = "1.0.2b"
parameter.connection_factory_type = "topic"
parameter.username = "{{tibcoems.username}}"
parameter.password = "{{tibcoems.password}}"

[[transport.jms.sender]]
name = "SenderTIBCOFactory_topic"
parameter.initial_naming_factory = "com.tibco.tibjms.naming.TibjmsInitialContextFactory"
parameter.provider_url = "{{tibcoems.provider_url}}"
parameter.connection_factory_name = "{{tibcoems.topics_factory_name}}"
parameter.jms_spec_version = "1.0.2b"
parameter.connection_factory_type = "topic"
parameter.'java.naming.security.principal' = "{{tibcoems.username}}"
parameter.'java.naming.security.credentials' = "{{tibcoems.password}}"
© www.soinside.com 2019 - 2024. All rights reserved.