连接到 AWS API Gateway 的 SoapUI



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

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

我尝试使用证书的公共部分创建密钥库并将其添加到项目设置 -> WS-安全配置 ->密钥库和信任库 但它没有帮助。

我还尝试添加几行添加到 SoapUI/内容/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错误,但我找不到如何做到这一点。

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

肥皂UI错误日志:

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 客户端库更新到最新版本。

具有此线程的设置:TLS V1.2的智能熊论坛主题

并使用了添加到vmoptions文件(soapui bin目录)中的此特定建议:

-Dsoapui.https.protocols=SSLv3,TLSv1.2

并且已经在 soapui v5.3.0 中使用 apikey fine访问了 AWS

升级到 SoupUI 5.3.0 为我解决了这个问题。

相关内容

  • 没有找到相关文章

最新更新