Skip to content

Commit 8a4473d

Browse files
committed
Initial Commit
Signed-off-by: Simo Sorce <[email protected]>
0 parents  commit 8a4473d

File tree

10 files changed

+778
-0
lines changed

10 files changed

+778
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build/
2+
dist/
3+
*.pyc
4+
*.pyo
5+
cscope.out

LICENSE

+674
Large diffs are not rendered by default.

Makefile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
all: lint pep8 test
2+
echo "All tests passed"
3+
4+
lint:
5+
# Analyze code
6+
# don't show recommendations, info, comments, report
7+
# W0613 - unused argument
8+
# Ignore cherrypy class members as they are dynamically added
9+
pylint -d c,r,i,W0613 -r n -f colorized \
10+
--notes= \
11+
./custodia
12+
13+
pep8:
14+
# Check style consistency
15+
pep8 custodia
16+
17+
clean:
18+
rm -fr build dist *.egg-info
19+
find ./ -name '*.pyc' -exec rm -f {} \;
20+
21+
cscope:
22+
git ls-files | xargs pycscope
23+
24+
test:
25+
rm -f .coverage
26+
nosetests -s

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Custodia
2+
========
3+
4+
A service to manage, retrieve and store secrets for other processes.

custodia/__init__.py

Whitespace-only changes.

custodia/custodia

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/python
2+
#
3+
# Copyright (C) 2015 Custodia Project Contributors - see LICENSE file
4+
5+
import sys
6+
import os
7+
import cherrypy
8+
from custodia.root import Root
9+
10+
11+
cfgfile = None
12+
if (len(sys.argv) > 1):
13+
cfgfile = sys.argv[-1]
14+
elif os.path.isfile('custodia.conf'):
15+
cfgfile = 'custodia.conf'
16+
elif os.path.isfile('/etc/custodia/custodia.conf'):
17+
cfgfile = '/etc/custodia/custodia.conf'
18+
else:
19+
raise IOError("Configuration file not found")
20+
21+
if __name__ == '__main__':
22+
cherrypy.config.update(cfgfile)
23+
cherrypy.quickstart(Root())

custodia/root.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (C) 2015 Custodia Project Contributors - see LICENSE file
2+
3+
import cherrypy
4+
import json
5+
6+
7+
class Root(object):
8+
9+
def __init__(self):
10+
print "started"
11+
12+
@cherrypy.expose
13+
def index(self):
14+
return json.dumps({'message': "Quis custodiet ipsos custodes?"})

man/custodia.7

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.TH "custodia" "7" "2015" "Custoia" "Custodia Secrets Manager"
2+
.SH "NAME"
3+
cutodia
4+
.SH "DESCRIPTION"
5+
Custodia is a omdular and pluggable Secrets Manager.
6+
It allows to serve retrieve, manage and store secrets for other applications.
7+
It is useful for distributed, stateless applications that use an image file
8+
base approach for instantiation like container based images.
9+
But it is alaso useful to manage distribution of key material across a
10+
multiple machines over a network.

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cherrypy

setup.py

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/python
2+
#
3+
# Copyright (C) 2015 Custodia project Contributors, for licensee see COPYING
4+
5+
from distutils.core import setup
6+
7+
setup(
8+
name = 'custodia',
9+
version = '0.0.1',
10+
license = 'GPLv3+',
11+
maintainer = 'Custodia project Contributors',
12+
maintainer_email = '[email protected]',
13+
url='https://github.com/simo5/custodia',
14+
packages = ['custodia', 'custodia.tools'],
15+
data_files = [('share/man/man7', ["man/custodia.7"]),
16+
('share/doc/custodia', ['COPYING', 'README']),
17+
('share/doc/custodia/examples', ['examples/custodia.conf']),
18+
],
19+
scripts = ['custodia/custodia']
20+
)
21+

0 commit comments

Comments
 (0)