Code Monkey home page Code Monkey logo

mint's Introduction

Mint

Beta version of the mint.

Currently this service can:

  • Sign data
  • Verify signed data
  • Sign and post data to the System of Record service

NB: Currently it is doing this with test public and private keys held within the test_keys folder.

##Dependencies:

  • Python 2 (needed for the encryption modules)
  • Contents of the requirements.txt

The run.sh script will use VirtualEnv and VirtualEnvWrapper if it finds it.

##How to run in development

vagrant up
vagrant ssh
cd /vagrant
./run.sh -d

To the run this in production use the following command

./run.sh

##How to run tests

In virtual machine

./test.sh

The tests output a results.xml which is in junit format.

##Example curls

Note: Use 127.0.0.1 when running from host. Use 10.0.2.2 when calling from another VM.

To get signed data post something like this:

curl -X POST -d '{"title_number" : "DN1"}' -H "Content-Type: application/json" http://10.0.2.2:5000/sign

To verify signed data post something like this:

curl -X POST -d '{"sig" : "xGM837iKCZDNUX2031XlPDKLsQ8y6uFs2_1DXqjATUjkAbWS5WFq2hR6MnWDgXC95rjg8h5lmKSUV-8c0W8WSaVaRfjEBz5vFOY3HtU0gXggXSYfLlKoEYT-c4BfySVwxWk1wSuE1F3tHJshJ4Dzx85brJJ6UePE2ZG8oczbBEQxhh09MDtaskNbtmpN8Pd43Ct7SJhHJqHbNT812mZjmoMqp9WJln0N0MDSh0_2Oc-cttJkIToW2AvniiTeK9TMEXo7xRPdkObYuG8gYEWlyKT981gnFz3TgKJJyMjQZTmrUCzcEEb4pMzKoc9jqiivJLD900KgoiC8MtcgNX7Kmw", "data":{"title_number" : "DN1"}}' -H "Content-Type: application/json" http://10.0.2.2:5000/verify

To sign and store something on system of record:

curl -X POST -d '{"title_number" : "DN1"}' -H "Content-Type: application/json" http://10.0.2.2:5000/insert

mint's People

Contributors

donnaclark avatar ptrelease avatar skablam avatar spencerjago avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

uk-gov-mirror

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.