For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
18 2 1 3

Elektron WebSocket API: Secure WebSocket (wss)

Is there any guidance on how do use Secure Websockets (wss) with the WebSocket API? I'm developing a web application that uses the WebSocket API, but I can't establish a connection because you have to use 'wss' when an application is secured by HTTPS.


I viewed this question from 2017 and it mentions an SSL Accelerator, but I don't know how that fits into my development process.

elektron-sdktreprdp-apiwebsocketsrrtojavascriptnode-js
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@jonathan.powell

Thank you for your participation in the forum. Are any of the replies below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply that best answers your question. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Hello @jonathan.powell

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Upvotes
Accepted
79.2k 251 52 74
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
22.1k 59 14 21

Hi @jonathan.powell,

Are you connecting to ERT Cloud or to the local TREP infrastructure? The ERT Cloud is already using wss (secure) protocol. You can see its use in the example applications here.

For local deployed infrastructure, I don't think ADS provides any support for wss, in which case you will have to use a third party load-balancer etc to provide this functionality.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I'm connecting to local TREP infrastructure via ADS. So I would need a load-balancer to implement wss? And is there a reference for what type of load balancer I need to use? Apologies, I'm genuinely not familiar with the process for adding ssl to websockets

Upvotes
22.1k 59 14 21

Hi @jonathan.powell,

I would refer you to the ADS installation guide (section 17.2) for encrypted connection support.

The ADS itself does not support TLS-based encryption for WebSocket protocols. However, load balancing/reverse proxy software or hardware components like the Apache HTTPD or F5 Networks Load Balancer can be used to provide encrypted functionality. Encrypted WebSocket connection support for the ADS has been tested with the Apache HTTPD. 
Using the Apache HTTPD, the following setup was used to provide encryption and Websocket access:


The Apache HTTPD configuration uses the following modules:
• mod_ssl for encryption
• mod_proxy and mod_proxy_ws for WebSocket reverse proxy functionality
• For more information about the Apache HTTPD, refer to https://httpd.apache.org/

Essentially this functionality is not supported by Refinitiv, and you will have to refer to the component provider for support on implementation.


1591045105217.png (51.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
24.7k 54 17 14

Hello @jonathan.powell

Please note that once you have finished configure the encrypted connection for ADS, the application flow and JSON message formats of WebSocket API is the same as a normal connection. You just need to establish a WebSocket connection with "wss" protocol and SSL port instead of "ws" protocol.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.