Overview
July 13, 2011 ยท View on GitHub
######## WebSCard ########
Overview
This is a web application acting as a universal smartcard proxy : it provides a web interface to a smartcard, together with detailled logs about the communication passing by.
One of the goals is to allow testing of software which necessitate a smartcard from a computer without a readers.
It is meant to support different implementations of smartcards:
- Software emulations of javacards applets (via pycsc and pythoncard for instance)
- or real smartcards (via pyscard in this case).
Application
WSGI Application
You can run it as a standalone Python cherrypy_ server, or as werkzeug_ server, or embed it inside apache_ / IIS_ / Lighttpd_ / nginx_ / ...
I recommend cherrypy_ for stable deployment (unless you already have a web server running) and werkzeug for development, werkzeug_ debugger is really worth mentioning, serving you a python shell at every level of the stacktrace in your browser.
Qt status bar launcher
An idea I took from the Hatta wiki_, you can have a status bar icon to configure, launch, stop, ... WebSCard.
NT Service
The application can also be configured as NT service, in this case, cherrypy_ will handle the requests.
Lua client
For the sake of testing, a lua_ client is included. It depends on luacurl_. Source is in luaclient/client.lua.
Features
- It is session aware.
- It logs everything in a DB
- It can be configured.
- It supports multiple implementations.
- It supports
Bonjour_ - It supports
SOAP_
Dependencies
WebSCard depends on the following packages:
Python_: Tested on 2.5 and 2.6. Take it from your distribution (cygwin won't play well if you want to play with real hardware as there is not PCSC bridge available)Werkzeug_: The network layer is done by werkzeugpyscard_: This is an optional dependency if you don't want to play with real hardware.SQLAlchemy_: This is how the DB stuff is done.elementTree_: For XML parsing for SOAP.Jinja2_: For HTML templating.
.. note:: As pyscard requires compiling/swiging, ... I recommand installing it system-wide with the download from sourceforge.
Howto install the dependencies:
You have three solutions:
#. Create a virtualenv_ and install everything in there.
#. Clone locally the repositories, and symlink/copy (depending on your platform) their package root directory in the WebSCard root directory such that an import X from WebSCard source code works fine.
#. Install system-wide
.. _cherrypy: http://www.cherrypy.org/
.. _werkzeug: http://werkzeug.pocoo.org/
.. _apache: http://www.apache.org/
.. _IIS: http://www.iis.net/
.. _lighttpd: http://www.lighttpd.net/
.. _nginx: http://nginx.net/
.. _Hatta wiki: http://hatta-wiki.org/
.. _lua: http://www.lua.org/
.. _luacurl: http://luacurl.luaforge.net/
.. _Bonjour: http://www.apple.com/support/bonjour/
.. _SOAP: http://en.wikipedia.org/wiki/SOAP
.. _Python: http://www.python.org/
.. _pyscard: http://pyscard.sourceforge.net/
.. _SQLAlchemy: http://www.sqlalchemy.org/
.. _elementTree: http://effbot.org/zone/element-index.htm
.. _Jinja2: http://jinja.pocoo.org/docs/
.. _virtualenv: http://www.virtualenv.org/en/latest/index.html