Skip to main content

A TAXII 2.0 Server.

Project description

|Build_Status| |Coverage| |Version|


NOTE: This is an `OASIS TC Open Repository <>`_.
See the `Governance`_ section for more information.

*Medallion* is a minimal implementation of a TAXII 2.0 Server in Python.

For more information, see `the
documentation <>`__ on

**WARNING:** *medallion* was designed as a prototype and reference
implementation of TAXII 2.0, and is not intended for production use.

*medallion* has been designed to be a simple front-end REST server providing
access to the endpoints defined in that specification.
It uses the python framework - `Flask <>`_. *medallion*
depends on back-end "plugins" which handle the persistence of the TAXII data and
metadata. The TAXII specification is agnostic to what type of data a TAXII
server stores, but this will usually be STIX 2 content.

Two back-end plugins are provided with *medallion*: the Memory back-end and the
MongoDB back-end. The Memory back-end persists data "in memory". It is
initialized using a json file that contains TAXII data and metadata.
It is possible to save the current state of the in memory store, but this
back-end is really intended only for testing purposes. The MongoDB backend is
somewhat more robust and makes use of a MongoDB server, installed independently.
The MongoDB back-end can only be used if the pymongo python package is
installed. An error message will result if it is used without that package.


The easiest way to install *medallion* is with pip::

$ pip install medallion


As a script

Medallion provides a command-line interface to start the TAXII Server::

usage: medallion [-h] [--host HOST] [--port PORT] [--debug-mode]

medallion v0.3.0

positional arguments:
CONFIG_PATH The location of the JSON configuration file to use.

optional arguments:
-h, --help show this help message and exit

--host HOST The host to listen on.

--port PORT The port of the web server.

--debug-mode If set, start application in debug mode.

The logging output level for medallion.

To run *medallion*::

$ python medallion/scripts/ <config-file>

The <config_file> contains:

- configuration information for the backend plugin
- a simple user name/password dictionary

To use the Memory back-end plug, include the following in the <config-file>:

.. code:: python

"backend": {
"module": "medallion.backends.memory_backend",
"module_class": "MemoryBackend",
"filename": <path to json file with initial data>

To use the Mongo DB back-end plug, include the following in the <config-file>:

.. code:: python

"backend": {
"module": "medallion.backends.mongodb_backend",
"module_class": "MongoBackend",
"uri": <Mongo DB server url> # e.g., "mongodb://localhost:27017/"

*Note: A Mongo DB should be available at some URL when using the Mongo DB back-end*

A description of the Mongo DB structure expected by the mongo db backend code is
described in `the documentation

As required by the TAXII specification, *medallion* supports HTTP Basic
authorization. However, the user names and passwords are currently stored in
the <config_file> in plain text.

Here is an example:

.. code:: python

"users": {
"admin": "Password0",
"user1": "Password1",
"user2": "Password2"

The authorization is enabled using the python package
`flask_httpauth <>`_.
Authorization could be enhanced by changing the method "decorated" using
@auth.get_password in medallion/

We welcome contributions for other back-end plugins.


We also provide a Docker image to make it easier to run *medallion*::

$ docker build . -t medallion

If operating behind a proxy, add the following option (replacing `<proxy>` with
your proxy location and port): ``--build-arg https_proxy=<proxy>``.

Then run the image::

$ docker run --rm -p 5000:5000 -v <directory>:/var/taxii medallion

Replace ``<directory>`` with the full path to the directory containing your
medallion configuration.


This GitHub public repository (
**** ) was created at the request
of the `OASIS Cyber Threat Intelligence (CTI) TC
<>`__ as an `OASIS TC Open Repository
<>`__ to support
development of open source resources related to Technical Committee work.

While this TC Open Repository remains associated with the sponsor TC, its
development priorities, leadership, intellectual property terms, participation
rules, and other matters of governance are `separate and distinct
from the OASIS TC Process and related policies.

All contributions made to this TC Open Repository are subject to open source
license terms expressed in the `BSD-3-Clause License
That license was selected as the declared `"Applicable License"
<>`__ when the
TC Open Repository was created.

As documented in `"Public Participation Invited
contributions to this OASIS TC Open Repository are invited from all parties,
whether affiliated with OASIS or not. Participants must have a GitHub account,
but no fees or OASIS membership obligations are required. Participation is
expected to be consistent with the `OASIS TC Open Repository Guidelines and
<>`__, the open
source `LICENSE
designated for this particular repository, and the requirement for an
`Individual Contributor License Agreement
that governs intellectual property.


TC Open Repository `Maintainers
are responsible for oversight of this project's community development
activities, including evaluation of GitHub `pull requests
and `preserving
open source principles of openness and fairness. Maintainers are recognized and
trusted experts who serve to implement community goals and consensus design

Initially, the associated TC members have designated one or more persons to
serve as Maintainer(s); subsequently, participating community members may select
additional or substitute Maintainers, per `consensus agreements

Current Maintainers of this TC Open Repository

- `Chris Lenk <>`__; GitHub ID:; WWW: `MITRE
Corporation <>`__
- `Rich Piazza <>`__; GitHub ID:; WWW: `MITRE
Corporation <>`__
- `Emmanuelle Vargas-Gonzalez <>`__; GitHub ID:; WWW: `MITRE
Corporation <>`__

About OASIS TC Open Repositories

- `TC Open Repositories: Overview and
Resources <>`__
- `Frequently Asked
Questions <>`__
- `Open Source
Licenses <>`__
- `Contributor License Agreements
(CLAs) <>`__
- `Maintainers' Guidelines and
Agreement <>`__


Questions or comments about this TC Open Repository's activities should be composed
as GitHub issues or comments. If use of an issue/comment is not possible or
appropriate, questions may be directed by email to the Maintainer(s) `listed
above <#currentMaintainers>`__. Please send general questions about Open
Repository participation to OASIS Staff at and
any specific CLA-related questions to

.. |Build_Status| image::
.. |Coverage| image::
.. |Version| image::

Project details

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

medallion-0.3.0-py2.py3-none-any.whl (28.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page