authentication - Websocket Security -
i looking implement web (angular) , iphone apps using websockets communicate our server. in past using http requests have used hashes using request data, url, timestamp etc authenticate , secure requests.
as far aware can't send headers websockets requests therefore wondering how can secure each request.
does have ideas or practices?
having secure communication server includes authenticating both parties each other. if need channel different users different authentication credentials through 1 communication channel (which rare idea nowadays), you'll need separate authentication. otherwise, need come key distribution scheme (so apps know public keys of server , server has protocol of getting acquanted public keys of clients, there plenty of patterns this).
to that, there choice gradient bit wider ssl or own crypto (try avoid writing own crypto @ cost).
for webserver-to-browser part of stack, ssl choice, shouldn't considered safety measure, each year unfolds more , more vulnerabilities, cipher degradation cases , trust problems. carries 20 years of baggage of bad engineering decisions , urgent fixes, if can better - it's worth doing so. still, it's better nothing regular webs.
in mobile app use 1 of number of cryptographic libraries providing secure session messaging server higher security guarantees, no reliance:
https://github.com/mochtu/libsodium-ios, libsodium-ios, ios wrapper nacl, 1 of best modern cryptographic libraries, has lots of novel implementations ecc cryptography, highly praised in academic circles , written madman keen have best performance under circumstances (in short: adore :) ).
themis, project i'm contributor in, have objc-friendly ios version of our library, , handy tutorial on doing secure traffic on websockets in ios: https://www.cossacklabs.com/building-secure-chat
Comments
Post a Comment