Skip to content

Commit

Permalink
Merge pull request #1 from LasLabs/feature/master/initial-library
Browse files Browse the repository at this point in the history
[ADD] Create Red October library
  • Loading branch information
lasley committed Dec 20, 2016
2 parents f465ea0 + 339cd3a commit 138f4d7
Show file tree
Hide file tree
Showing 15 changed files with 701 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exclude_lines =
ignore_errors = True

include =
*/cfssl/*
*/red_october/*

omit =
*/virtualenv/*
Expand Down
24 changes: 9 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,17 @@ addons:
language: python

python:
- "2.7"
- "2.7"

virtualenv:
system_site_packages: true
system_site_packages: true

install:
- pip install coveralls
- pip install codecov --user
- pip install codeclimate-test-reporter
- pip install -r requirements.txt
- pip install .
env:
global:
- TESTS="0" LINT_CHECK="0" DOCS="0" VERSION="0.1.0" RELEASE="0.1.0" PROJECT="Python-Red-October" BRANCH_PROD="master" BRANCH_DOC="gh-pages"
matrix:
- TESTS="1"
- DOCS="1"

# command to run tests
script:
- coverage run setup.py test

after_success:
- coveralls
- codecov
- codeclimate-test-reporter
- wget -O - https://gist.githubusercontent.com/lasley/e547cc2f66cff91e9494ad46b69b9571/raw/6b2cf174988d62e79b0ebedbc0dfb013d65e8dcc/Python%2520Travis%2520Tests | bash
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)
=====================

Copyright Copyright `2015-TODAY` `LasLabs Inc.`
Copyright Copyright `2016-TODAY` `LasLabs Inc.`

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
41 changes: 31 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ Python Red October Library

This library allows you to interact with a remote Red October Instance using Python.

Red October is a cryptographically-secure implementation of the two-person rule to
protect sensitive data. From a technical perspective, Red October is a software-based
encryption and decryption server. The server can be used to encrypt a payload in such
a way that no one individual can decrypt it. The encryption of the payload is
cryptographically tied to the credentials of the authorized users.

Authorized persons can delegate their credentials to the server for a period of time.
The server can decrypt any previously-encrypted payloads as long as the appropriate number
of people have delegated their credentials to the server.

This architecture allows Red October to act as a convenient decryption service. Other
systems, including CloudFlare’s build system, can use it for decryption and users can
delegate their credentials to the server via a simple web interface. All communication
with Red October is encrypted with TLS, ensuring that passwords are not sent in the clear.

* `Read more on the CloudFlare blog
<https://blog.cloudflare.com/red-october-cloudflares-open-source-implementation-of-the-two-man-rule/>`_.
* `View the Red October source
<https://github.com/cloudflare/redoctober>`_.

Installation
------------

Expand All @@ -14,17 +34,18 @@ Setup
Usage
-----

* `Read The API Documentation <https://laslabs.github.io/python-red-october>`_

Known Issues / Road Map
-----------------------

- Installation, setup, usage - in ReadMe
- Add a Certificate Request data structure

.. |Build Status| image:: https://api.travis-ci.org/laslabs/Python-CFSSL.svg?branch=master
:target: https://travis-ci.org/laslabs/Python-CFSSL
.. |Coveralls Status| image:: https://coveralls.io/repos/laslabs/Python-CFSSL/badge.svg?branch=master
:target: https://coveralls.io/r/laslabs/Python-CFSSL?branch=master
.. |Codecov Status| image:: https://codecov.io/gh/laslabs/Python-CFSSL/branch/master/graph/badge.svg
:target: https://codecov.io/gh/laslabs/Python-CFSSL
.. |Code Climate| image:: https://codeclimate.com/github/laslabs/Python-CFSSL/badges/gpa.svg
:target: https://codeclimate.com/github/laslabs/Python-CFSSL

.. |Build Status| image:: https://api.travis-ci.org/laslabs/Python-Red-October.svg?branch=master
:target: https://travis-ci.org/laslabs/Python-Red-October
.. |Coveralls Status| image:: https://coveralls.io/repos/laslabs/Python-Red-October/badge.svg?branch=master
:target: https://coveralls.io/r/laslabs/Python-Red-October?branch=master
.. |Codecov Status| image:: https://codecov.io/gh/laslabs/Python-Red-October/branch/master/graph/badge.svg
:target: https://codecov.io/gh/laslabs/Python-Red-October
.. |Code Climate| image:: https://codeclimate.com/github/laslabs/Python-Red-October/badges/gpa.svg
:target: https://codeclimate.com/github/laslabs/Python-Red-October
5 changes: 5 additions & 0 deletions red_october/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License MIT (https://opensource.org/licenses/MIT).

from .red_october import RedOctober
15 changes: 15 additions & 0 deletions red_october/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License MIT (https://opensource.org/licenses/MIT).

import requests


class RedOctoberException(EnvironmentError):
""" This exception is raised from errors in the RedOctober Library. """

class RedOctoberDecryptException(RedOctoberException):
""" This exception is raised when there are errors decrypting a file. """

class RedOctoberRemoteException(RedOctoberException):
""" This exception is raised to indicate issues returned from API. """
3 changes: 3 additions & 0 deletions red_october/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License MIT (https://opensource.org/licenses/MIT).
13 changes: 13 additions & 0 deletions red_october/models/enum_user_role.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License MIT (https://opensource.org/licenses/MIT).

from enum import Enum


class EnumUserRole(Enum):
""" It provides possible user types. """
delete = 1
revoke = 2
admin = 3
user = revoke
11 changes: 11 additions & 0 deletions red_october/models/enum_user_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License MIT (https://opensource.org/licenses/MIT).

from enum import Enum


class EnumUserType(Enum):
""" It provides possible user types. """
rsa = 1
ecc = 2

0 comments on commit 138f4d7

Please sign in to comment.