gpt4 book ai didi

ssl - 连接到 AWS API 网关的 SoapUI

转载 作者:太空宇宙 更新时间:2023-11-03 13:37:26 27 4
gpt4 key购买 nike

我正在 API 网关后面的 AWS Lambda(node.js) 上构建小的 SOAP API。我添加了带有受信任证书(COMODO RSA 证书颁发机构)的自定义域,但是当我尝试来自 SoapUI(OSX 上的 v5.2.1)的任何请求时,它失败并显示 handshake_failure

API 网址:https://arrivacz-custom.bileto.com/terminal

我尝试使用证书的公共(public)部分创建 keystore 并将其添加到Project Settings -> WS-Security Configurations -> Keystores and Truststores 但它没有帮助。

我也尝试添加几行到 SoapUI/Contents/vmoptions.txt

-Dcom.sun.net.ssl.checkRevocation=false
-Dsun.security.ssl.allowUnsafeRenegotiation=true
-Dcom.sun.net.ssl.enableECC=false
-Djavax.net.debug=all
-Dsoapui.https.protocols=TLSv1.2

因为我需要这个只是为了测试,所以我可以忽略所有 SSL 错误,但我找不到如何做到这一点。

能否请您建议我如何使它工作。

SoapUI 错误日志:

Fri Feb 19 11:49:48 CET 2016:ERROR:javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1959)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1077)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:702)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:131)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:138)
at org.apache.http.impl.conn.LoggingSessionOutputBuffer.flush(LoggingSessionOutputBuffer.java:95)
at org.apache.http.impl.io.ContentLengthOutputStream.flush(ContentLengthOutputStream.java:102)
at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:69)
at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.doSendRequest(HttpClientSupport.java:119)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:233)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:323)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:290)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:220)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:119)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

带有网络调试的 SoapUI 日志:

Fri Feb 19 11:49:01 CET 2016:INFO:initialized soapui-settings from [/Users/jakubriedl/soapui-settings.xml]
Fri Feb 19 11:49:01 CET 2016:INFO:Initializing KeyStore
Fri Feb 19 11:49:02 CET 2016:ERROR:An error occurred [No private keys found in keystore!], see error log for details
Fri Feb 19 11:49:04 CET 2016:INFO:Adding plugin from [/Users/jakubriedl/.soapuios/plugins/soapui-swagger-plugin-2.2-dist.jar]
Fri Feb 19 11:49:04 CET 2016:INFO:Adding plugin from [/Users/jakubriedl/.soapuios/plugins/ready-uxm-plugin-1.0.1-dist.jar]
Fri Feb 19 11:49:05 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
Fri Feb 19 11:49:05 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
Fri Feb 19 11:49:05 CET 2016:INFO:Adding plugin from [/Users/jakubriedl/.soapuios/plugins/ready-mqtt-plugin-dist.jar]
Fri Feb 19 11:49:05 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
Fri Feb 19 11:49:05 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
Added AutoFactory for [PluginPrefs]
Added AutoFactory for [PluginPanelBuilder]
Added AutoFactory for [PluginPanelBuilder]
Added AutoFactory for [PluginPanelBuilder]
Added AutoFactory for [PluginTestStep]
Added AutoFactory for [PluginTestStep]
Added AutoFactory for [PluginTestStep]
Fri Feb 19 11:49:06 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
Fri Feb 19 11:49:06 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
Fri Feb 19 11:49:06 CET 2016:INFO:Adding plugin from [/Users/jakubriedl/.soapuios/plugins/readyapi-swaggerhub-plugin-1.0.jar]
Fri Feb 19 11:49:06 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
Fri Feb 19 11:49:06 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
Fri Feb 19 11:49:06 CET 2016:INFO:4 plugins loaded in 2112 ms
Fri Feb 19 11:49:06 CET 2016:INFO:All plugins loaded
Fri Feb 19 11:49:06 CET 2016:INFO:initialized soapui-settings from [/Users/jakubriedl/soapui-settings.xml]
Fri Feb 19 11:49:07 CET 2016:INFO:Adding plugin from [/Users/jakubriedl/.soapuios/plugins/soapui-swagger-plugin-2.2-dist.jar]
Fri Feb 19 11:49:07 CET 2016:INFO:Adding plugin from [/Users/jakubriedl/.soapuios/plugins/ready-uxm-plugin-1.0.1-dist.jar]
Fri Feb 19 11:49:08 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
Fri Feb 19 11:49:08 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
Fri Feb 19 11:49:08 CET 2016:INFO:Adding plugin from [/Users/jakubriedl/.soapuios/plugins/ready-mqtt-plugin-dist.jar]
Fri Feb 19 11:49:08 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
Fri Feb 19 11:49:08 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
Added AutoFactory for [PluginPrefs]
Added AutoFactory for [PluginPanelBuilder]
Added AutoFactory for [PluginPanelBuilder]
Added AutoFactory for [PluginPanelBuilder]
Added AutoFactory for [PluginTestStep]
Added AutoFactory for [PluginTestStep]
Added AutoFactory for [PluginTestStep]
Fri Feb 19 11:49:08 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
Fri Feb 19 11:49:08 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
Fri Feb 19 11:49:08 CET 2016:INFO:Adding plugin from [/Users/jakubriedl/.soapuios/plugins/readyapi-swaggerhub-plugin-1.0.jar]
Fri Feb 19 11:49:09 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
Fri Feb 19 11:49:09 CET 2016:ERROR:An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
Fri Feb 19 11:49:09 CET 2016:INFO:4 plugins loaded in 1529 ms
Fri Feb 19 11:49:09 CET 2016:INFO:All plugins loaded
Fri Feb 19 11:49:09 CET 2016:INFO:Loading workspace from [/Users/jakubriedl/default-soapui-workspace.xml]
Fri Feb 19 11:49:09 CET 2016:INFO:Loaded project from [file:/Users/jakubriedl/Desktop/xsd/A4Res-soapui-project.xml]
Fri Feb 19 11:49:09 CET 2016:INFO:Defaulting to native L&F for Mac OS X
Fri Feb 19 11:49:10 CET 2016:INFO:Used java version: 1.7.0_55
Scheduling garbage collection every 60 seconds
The cajo server is running on localhost:1198/soapuiIntegration
Fri Feb 19 11:49:48 CET 2016:DEBUG:Attempt 1 to execute request
Fri Feb 19 11:49:48 CET 2016:DEBUG:Sending request: POST /terminal HTTP/1.1
Fri Feb 19 11:49:48 CET 2016:DEBUG:I/O error closing connection
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1476)
at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1488)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:70)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:131)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:138)
at org.apache.http.impl.conn.LoggingSessionOutputBuffer.flush(LoggingSessionOutputBuffer.java:95)
at org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:270)
at org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:245)
at org.apache.http.impl.conn.DefaultClientConnection.close(DefaultClientConnection.java:164)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.close(AbstractPooledConnAdapter.java:152)
at org.apache.http.protocol.HttpRequestExecutor.closeConnection(HttpRequestExecutor.java:142)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:129)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:233)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:323)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:290)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:220)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:119)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1959)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1077)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:702)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:131)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:138)
at org.apache.http.impl.conn.LoggingSessionOutputBuffer.flush(LoggingSessionOutputBuffer.java:95)
at org.apache.http.impl.io.ContentLengthOutputStream.flush(ContentLengthOutputStream.java:102)
at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:69)
at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.doSendRequest(HttpClientSupport.java:119)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
... 14 more
Fri Feb 19 11:49:48 CET 2016:DEBUG:Closing the connection.
Fri Feb 19 11:49:48 CET 2016:DEBUG:Connection closed
Fri Feb 19 11:49:48 CET 2016:DEBUG:Connection shut down
Fri Feb 19 11:49:48 CET 2016:ERROR:Exception in request: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
Fri Feb 19 11:49:48 CET 2016:ERROR:An error occurred [Received fatal alert: handshake_failure], see error log for details
Fri Feb 19 11:49:49 CET 2016:INFO:Error getting response for [BasicHttpBinding_IPlanky.Login:Request 1]; javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

最佳答案

客户端在调用 API 网关时收到 SSLHandshakeException 的最常见原因是客户端不支持服务器名称指示 (SNI)。 API 网关需要 SNI,一些较旧的 http/https 客户端库不支持它。大多数基于 Java 的 https 客户端的最新版本都支持 SNI。尝试将您的 https 客户端库更新到最新版本。

关于ssl - 连接到 AWS API 网关的 SoapUI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35507588/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com