TLS module (new)There is a new module called TLS in the cvs repositoryi. The module attempts to merge the TLS code from experimental cvs module (maintained by Cesc) and Andrei's implementation, to get the best of both. Furthermore the module contains some new functions for script based certificate verification. The TLS module is much more stable than the original implementation. The original (experimental) code works only when there are no simultaneous TLS connections/attempts. The original code would either crash or block SERi in seconds under heavy load so it is not really suitable for production use. The code in TLS module is much more stable, it contains several fixes (icluding fix of openssl) and does not seem to crash even under load Unfortunately we discovered a problem during testing of TLS code which can lead to SER being blocked for the duration of tls_send_timeout interval. After that time it would recover. Andrei can probably elaborate more on this issue, but as far as I know there is no easy wayto fix it. In conclusion the TLS code in the tls module is more stable than the original code from experimental but is not yet ready for production deployments (unless you can risk SER being blocked for some time). TLS select functionsThe current HEAD SER version contains a mechanism which we internaly call the "select" framework. The select framework makes it possible to register functions from modules which can extract pieces of information from the SIP message, transports or IP datagrams. Select functions are denoted by @ character in the configuration file. The name of the select @contact[2].uri.params.transport Would return the value of transport URIi parameter from the second Contact URI in the SIP message. TLS module makes use of this mechanism and contains several functions that can be used to retrieve TLS related information in the @tls -- String description of the TLS layer Example: Example: @tls.desc @tls.cipher @tls.peer Example: if (@tls.peer == "Bob") ... @tls.me @tls.peer.subject @tls.peer.issuer @tls.peer.verified @tls.{peer,my}.version@tls.{peer,my}.sn@tls.{peer,my}.not_beforeFormat: 'Jun 17 15:03:20 2005 GMT' @tls.{peer,my}.not_after@tls.{peer,my}.email@tls.{peer,my}.host@tls.{peer,my}.uri@tls.{peer,my}.ip@tls.{peer,my}.{subj,issuer}.locality@tls.{peer,my}.{subj,issuer}.country@tls.{peer,my}.{subj,issuer}.state@tls.{peer,my}.{subj,issuer}.organizationSSL certificate based authenticationThe functions can be used to implement SSL certificate based authentication in the configuration script: if (proto == TLS && @tls.peer != "Bob") { This will reject any request received through TLS unless the client provides a client certificate which has subject common name set to "Bob". Select @tls is useful for storing information about the TLS connection (the string can be stored in accounting table, for example, appended to the outgoing message as a header, and so on). Multi-domain configurationThe original (experimental) code contained the support for multi-domain configuration. This mechanism was extended a little bit in the tls module. In addition to server based TLS domains there is also preliminary support for TLS client domains. TLS client domains are used when SER attempts to connect to a remote party using TLS. This makes it possible to configure different TLS client certificates for different destinations. In addition to that almost all TLS parameters can be now set on per-domain basis. This includes: TLS domains are identified using IP and port, this is the destination IP and port of the TLS connections, in server TLS domains this must be one of the IP and port configured through listen directives. In TLS client domains this is the IP and port of the remote peer. There is always one default server domain and one default client domain. These are used when no matching server/client domain can be found for TLS domains are configured through modparams, most tls modparams accept the parameter value with the following syntax: If no IP and port has been specified then the parameters of the default domain are set: modparam("tls", "method", "1.2.3.4:5090=SSLv23") This configuration is somewhat suboptimal and may change yet. Currently there is no possibility to configure TLS client domains (it will be Example configurationHere is a configuration example which demonstrates a couple of interesting things that can be done with the TLS module, XMLRPC management interface and new serctli tools. This configuration file snippet makes it possible to run serctl remotely. It uses the XMLRPC procotol which is encrypted using TLS. Futhermore TLS certificate authentication is used so only people having a correct client loadmodule "./modules/tls/tls.so" listen=tls:1.2.3.4:5061 modparam("tls", "method", "SSLv23")route { if (@xmlrpc.method == "core.kill") {dispatch_rpc(); |
Navigation |