Announcing sec-wall 1.0.0, a feature packed high-performance security proxy
This is mostly a copy of the announcement sent to the python-announce@ list, although I’ve added a couple more usage examples at the end of the post.
sec-wall is a feature packed high-performance security proxy which has many interesting features, including the support for SSL/TLS, WS-Security, HTTP Auth Basic/Digest, extensible authentication schemes based on custom HTTP headers and XPath expressions, powerful URL matching/rewriting and an optional headers enrichment.
sec-wall uses and is built on top of several fantastic Python open source technologies, such as gevent, Spring Python, Pesto, lxml, zdaemon or PyYAML and is meant to be highly customizable and easy to use. Good performance, tests, documentation and building an awesome community are at the very heart of the project.
Here are examples showing how little is needed to secure a backend server with HTTP Basic Auth, SSL/TLS client certificates and WS-Security.
# -*- coding: utf-8 -*- # stdlib import uuid # Don't share it with anyone. INSTANCE_SECRET = '5bf4e78c256746eda2ce3e0e73f256d0' # May be shared with the outside world. INSTANCE_UNIQUE = uuid.uuid4().hex def default(): return { 'basic-auth':True, 'basic-auth-username':'MyUser', 'basic-auth-password':'MySecret', 'basic-auth-realm':'Secure area', 'host': 'http://example.com' } urls = [ ('/*', default()), ] |
# -*- coding: utf-8 -*- # stdlib import os.path as path, uuid # Don't share it with anyone. INSTANCE_SECRET = '5bf4e78c256746eda2ce3e0e73f256d0' # May be shared with the outside world. INSTANCE_UNIQUE = uuid.uuid4().hex # Useful constants cur_dir = path.dirname(__file__) # Crypto keyfile = path.join(cur_dir, './crypto/server-priv.pem') certfile = path.join(cur_dir, './crypto/server-cert.pem') ca_certs = path.join(cur_dir, './crypto/ca-cert.pem') server_type = 'https' def default(): return { 'ssl': True, 'ssl-cert': True, 'ssl-cert-commonName': 'My Client', 'ssl-cert-organizationName': 'My Company', 'host': 'http://example.com' } urls = [ ('/*', default()), ] |
# -*- coding: utf-8 -*- # stdlib import uuid # Don't share it with anyone. INSTANCE_SECRET = '5bf4e78c256746eda2ce3e0e73f256d0' # May be shared with the outside world. INSTANCE_UNIQUE = uuid.uuid4().hex def default(): return { 'wsse-pwd': True, 'wsse-pwd-username': 'MyUser', 'wsse-pwd-password': 'MySecret', # Needs to be given in clear text 'wsse-pwd-reject-empty-nonce-creation': True, 'wsse-pwd-reject-stale-tokens': True, 'wsse-pwd-reject-expiry-limit': 120, 'wsse-pwd-nonce-freshness-time': 120, 'host': 'http://example.com' } urls = [ ('/*', default()), ] |
Links:
Project’s homepage: http://sec-wall.gefira.pl/
Getting started: http://sec-wall.gefira.pl/documentation/getting-started/index.html
Usage examples: http://sec-wall.gefira.pl/documentation/usage-examples/index.html
Twitter: https://twitter.com/fourthrealm
Blog: http://www.gefira.pl/blog
IRC: #sec-wall channel on Freenode network
Cheers!
