SIP.js icon indicating copy to clipboard operation
SIP.js copied to clipboard

Support for ephemeral credentials

Open jamesaylett opened this issue 9 years ago • 2 comments

Hi, this is more a enhancement request/suggestion than an issue.

I would like to use ephemeral credentials to verify my user agent on establishing the websocket connection rather than passing through my user's real credentials in the register message. I believe there are two methods to do this, one is to pass through the username and password as query parameters in the ws_uri, the other is to pass through the credentials using cookies. See http://kamailio.org/docs/modules/4.3.x/modules/auth_ephemeral.html for further details.

I've created a branch to do this where I can pass through a function in wsServers UA config that is called on SIP.Transport.connect to update the query parameters (or in theory could return null and just update any cookies that are set), but I thought others may want similar functionality so I thought it would be worth submitting an issue for you to consider. See https://github.com/onsip/SIP.js/compare/master...jamesaylett:ephemeral-credentials for a diff of my implementation.

jamesaylett avatar Apr 08 '15 15:04 jamesaylett

It's an interesting concept. I am not sure if there is enough demand for it to be merged into SIP.js proper. I do want to make the Transport layer slightly more pluggable, though, so that changes like these can be included more easily without carrying around a custom fork. It's something to consider.

wakamoleguy avatar Apr 21 '15 16:04 wakamoleguy

You can continue to use digest auth with auth_ephemeral. What trouble are you having using that approach?

benlangfeld avatar Sep 22 '15 17:09 benlangfeld

Closing due to lack of activity/interest.

john-e-riordan avatar Oct 21 '22 14:10 john-e-riordan