Version

Security and Authentication Headers

Security and authentication are critical components of SIP communications to ensure that sessions are initiated, modified, and terminated by authenticated users and to safeguard the integrity and confidentiality of SIP messages. This section delves into the key SIP header fields related to security and authentication.

Proxy-Authenticate and WWW-Authenticate
These headers are used by servers to challenge a user agent for authentication. The WWW-Authenticate header is used in 401 (Unauthorized) and 407 (Proxy Authentication Required) responses to challenge the user agent directly, while Proxy-Authenticate is used by proxies to request credentials for accessing resources via the proxy.
Format Example: WWW-Authenticate: Digest realm="example.com", qop="auth", nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093", opaque="5ccc069c403ebaf9f0171e9517f40e41"

Proxy-Authorization and Authorization
The Proxy-Authorization and Authorization headers carry credentials in response to Proxy-Authenticate and WWW-Authenticate challenges, respectively. These headers support various authentication schemes, with "Digest" being the most commonly used.
Format Example: Authorization: Digest username="Alice", realm="example.com", nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093", uri="sip:bob@example.com", response="6629fae49393a05397450978507c4ef1", opaque="5ccc069c403ebaf9f0171e9517f40e41"

Authentication-Info
The Authentication-Info header is used by the server to provide additional authentication information to the client after a successful authentication has been completed. This header might include parameters such as nextnonce and qop.
Format Example: Authentication-Info: nextnonce="dcd98b7102dd2f0e8b11d0f600bfb0c093"

Security-Server and Security-Client
These headers are used in SIP negotiations to indicate support for specific security mechanisms by the server (Security-Server) and client (Security-Client). They enable the parties to agree on a security mechanism for protecting SIP messages.
Format Example: Security-Client: ipsec-3gpp; alg=hmac-sha-1-96; ealg=aes-cbc; port-c=5061; port-s=5061; spi-c=123456789; spi-s=987654321

Security-Verify
The Security-Verify header is used in responses to confirm the security mechanisms that will be applied by the user agent, mirroring the Security-Client header field from the request.
Format Example: Security-Verify: ipsec-3gpp; alg=hmac-sha-1-96; ealg=aes-cbc; port-c=5061; port-s=5061; spi-c=123456789; spi-s=987654321

 

The implementation and correct handling of these security and authentication headers are paramount for ensuring the integrity, confidentiality, and authenticity of SIP communications. They provide the mechanisms for user agents and servers to establish trusted communications over potentially unsecured networks. For detailed specifications and guidelines on using these headers, RFC 3261, along with relevant extensions and updates, should be consulted.

Start innovating with Mobius

What's next? Let's talk!

Mobius Software

As a company you'll get:

  • Get started quickly

  • Support any business model

  • Join millions of businesses

Questions? websupport@mobius.com