Skip to main content

privacyIDEA: identity, multifactor authentication, authorization, audit

Project description


[![Build Status][BS img]][Build Status] [![Coverage Status][CS img]][Coverage Status] [![Downloads](]( [![Latest Version](]( [![License](]( [![Documentation Status](](

[Build Status]: [Coverage Status]:

[BS img]: [CS img]:

privacyIDEA is an open solution for strong two-factor authentication. privacyIDEA does to not bind you to any decision of the authentication protocol or it does not dictate you where your user information should be stored. This is achieved by its totally modular architecture. privacyIDEA is not only open as far as its modular architecture is concerned. But privacyIDEA is completely licensed under the AGPLv3.

Version 2.0

The new 2.0 branch is based on flask and sqlalchemy as the python backend. The web UI is based on angularJS and bootstrap.

At the moment the 2.0 branch is not ready for production. For productive use please use privacyIDEA 1.5.1.

You can follow the setup instructions and play around. You are also welcome to take a look at the hopefully tidy code and contribute.

I try to keep up a good test coverage. So run tests!


You can setup the system in a virtual environment:

git checkout cd privacyidea virtualenv venv source venv/bin/activate pip install -r requirements.txt

Running it

Create the database:

./ createdb

Create the first administrator:

./ admin add <username> <email>

Run it:

./ runserver

Now you can connect to http://localhost:5000 with your browser and login as administrator.

Run in virtualenv

For running the server in a virtual env see documentation at

Run tests

nosetests -v –with-coverage –cover-package=privacyidea –cover-html

Code structure

The database models are defined in and tested in tests/

Based on the database models there are the libraries lib/ which is responsible for basic configuration in the database table config. And the library lib/ which provides functions for the database table resolver. This is tested in tests/

Based on the resolver there is the library lib/ which provides functions for the database table realm. Several resolvers are combined into a realm.

Based on the realm there is the library lib/ which provides functions for users. There is no database table user, since users are dynamically read from the user sources like SQL, LDAP, SCIM or flat files.


The database model has changed, so that you need to upgrade the database.

!! Before upgrading be sure to make a backup !!

To upgrade your database from 1.5 to the new 2.0 schema run:

./manage db upgrade

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

privacyIDEA-2.0.tar.gz (955.7 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page