1. Benoît Allard
  2. webscard

Wiki

Clone wiki

webscard / Home

WebSCard

This is a web application acting as a universal smartcard proxy.

What this means: this provides a web interface to a smartcard, together with detailled login about the communication passing by.

One of the goals is to allow testing of software which necessitate a smartcard from computer without 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).

Communication Example

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.

Features

Lua client

For the sake of testing, a lua client is included. It depends on luacurl. Source is in luaclient/client.lua

Package

py2exe

Dependencies

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 werkzeug

The best is to clone werkzeug repository at the root of the webscard repository. Then two options if you dont want to install it system-wide: you can symlink werkzeug-main/werkzeug to your root directory so that import werkzeug works fine, or make a virtualenv.

pyscard

This is an optional dependency if you don't want to play with real hardware.

It's recommended to install it from the package available from sourceforge as it needs compiling, swiging, and so on ...

SQLAlchemy

This is how the DB stuff is done.

Same recommendations as for Werkzeug.

elementTree

For XML parsing for SOAP, same as for werkzeug ...

Get it from here

Jinja2

For web templating.

Updated