-1

Plivo have announced that they are depreciating their Legacy Messaging API for SNI. I've been unable to find any documentation on the topic (ideally with code samples) on their portal.

I'm not been able to figure out how to configure my end point to use this technology.

Would it be possible to implement SNI using STunnel thereby avoiding a code overhaul? My existing solution would tunnel through STunnel which would, in turn, layer on the SNI component.

Thanks for any pointers with specific focus on Plivo.

Notification from Plivo

enter image description here

Regards,

chribonn
  • 141
  • 1
  • 7
  • What is this announcement? Where did you find it? Please link to it. – Michael Hampton Sep 08 '21 at 18:47
  • @MichaelHampton I updated my original post to add the notifcation – chribonn Sep 09 '21 at 09:48
  • 1
    OK, that makes sense. The question now is, why do you think your app doesn't already support SNI? It has been around for close to a decade and virtually everything already supports it. – Michael Hampton Sep 09 '21 at 10:21
  • SNI typically means the Server Name Indication extension for SSL, which allows multiple domains on the same ip address, since you mentioned `stunnel`, you can set the `sni` option in the config to the host domain name you are trying to connect to – Ferrybig Sep 09 '21 at 10:46
  • I am using Postman to try to get that functionality. I used the tutorial available on plivo's site https://www.plivo.com/docs/sms/quickstart/postman. – chribonn Sep 09 '21 at 12:56

1 Answers1

0

I am testing the solution using Postman. Plivo have a tutorial on their site using this tool: Get started using Postman Collections for Plivo SMS APIs.

In STunnel I added the following configuration:

[plivo]
client=yes
accept = :261
connect = api.plivo.com:443
sni = api.plivo.com
checkHost = api.plivo.com
verifyChain = yes
CAfile = ca-certs.pem
TIMEOUTbusy = 300
TIMEOUTclose = 60
TIMEOUTconnect = 10

I then modified the Postman RestAPI solution provided by Plivo, replacing

https://api-legacy.plivo.com/v1/Account/{{auth_id}}/Message/ (I changed api.plivo.vom to api-legacy.plivo.com)

to

http://{{server_ip}}/v1/Account/{{auth_id}}/Message/

{{server_ip}} points to the machine running STunnel (eg 192.168.xx.xx:261).

I tested and it worked.

PS: If the STunnel service is not running on your local computer you may need to open the firewall ports to allow the server to accept traffic on port 261.

chribonn
  • 141
  • 1
  • 7