forked from Netflix-Skunkworks/stethoscope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
207 lines (196 loc) · 7.36 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
from __future__ import absolute_import, print_function, unicode_literals
import io
import os.path
import sys
from itertools import chain
import setuptools
def parse_file(filename, encoding='utf-8'):
"""Return contents of the given file using the given encoding."""
path = os.path.join(os.path.abspath(os.path.dirname(__file__)), filename)
with io.open(path, encoding=encoding) as fo:
contents = fo.read()
return contents
extras_require = {
'google': [
'google-api-python-client',
'retrying',
'httplib2',
'oauth2client<4.0.0',
],
'duo': ['duo_client'],
'jamf': [],
'landesk': [
'pymssql', # requires freetds (`brew install freetds`)
],
'bitfit': [],
'es_logger': [
'elasticsearch>=2.0.0,<3.0.0',
],
'es_notifications': [
'elasticsearch_dsl>=2.0.0,<3.0.0',
],
'restful_feedback': [],
'batch': [
'pyyaml',
'requests[security]',
'elasticsearch>=2.0.0,<3.0.0',
],
'oidc': [
'requests[security]',
'requests-oauthlib',
],
'vpnfilter': ['netaddr'],
'atlas': ['requests[security]'],
'batch_es': ['elasticsearch>=2.0.0,<3.0.0'],
'batch_restful_summary': ['requests'],
}
install_requires = [
'Flask>=0.10', # 0.10 introduced better security for session cookies
'Flask-Script',
'arrow',
'klein',
'logbook',
'PyJWT',
'PyOpenSSL',
'six',
'setuptools',
'stevedore',
'treq',
'txretry>=1.0.1', # 1.0.1 introduced support for Python 3
'txwebretry',
'validate-email',
'werkzeug>=0.9', # 0.9 added werkzeug.wsgi.host_is_trusted
]
if sys.version_info < (2, 7, 9):
# SSL connection fixes for Python 2.7
install_requires.extend([
'ndg-httpsclient',
'pyasn1',
])
setup_params = dict(
name='Stethoscope',
version='0.0.1',
author='Andrew M. White',
author_email='[email protected]',
license='Apache License, Version 2.0',
description=("""Collection and display of best practice adoption for securing user devices """
"""and accounts."""),
long_description=parse_file('README.md'),
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Information Technology',
'Framework :: Flask',
'Framework :: Twisted',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Education',
'Topic :: Security',
],
keywords=['security education'],
packages=setuptools.find_packages(),
zip_safe=False,
include_package_data=True,
setup_requires=[
'setuptools-git', # >=0.3
'pytest-runner',
],
tests_require=[
'mock',
'pytest-cov',
'pytest-logbook',
'pytest>=2.8',
'setuptools>=17.1',
] + list(chain.from_iterable(extras_require.values())) + install_requires,
extras_require=extras_require,
install_requires=install_requires,
dependency_links=[
'git+https://github.com/duosecurity/duo_client_python.git@1cc71f80927b02e75773094c9dd77af1fc8e4064.zip#egg=duo_client-3.0', # noqa
'git+https://github.com/wrapp/txwebretry.git@df5014019cf3a5d501bc755b9ce46509c1b31351#egg=txwebretry-0.1.1', # noqa
],
entry_points={
'console_scripts': [
'stethoscope-login = stethoscope.login.manage:main',
'stethoscope-batch = stethoscope.batch.run:main [batch]',
'stethoscope-token = stethoscope.token:main',
],
'stethoscope.plugins.login': [
# authentication drivers
'oidc = stethoscope.login.plugins.oidc:OpenIDConnectLogin [oidc]',
'null = stethoscope.login.plugins.base:NullLogin',
],
'stethoscope.plugins.sources.events': [
# event gathering plugins
'google = stethoscope.plugins.sources.google.deferred:DeferredGoogleDataSource [google]',
'duo = stethoscope.plugins.sources.duo.deferred:DeferredDuoDataSource [duo]',
],
'stethoscope.plugins.sources.devices': [
# device gathering plugins
'google = stethoscope.plugins.sources.google.deferred:DeferredGoogleDataSource [google]',
'jamf = stethoscope.plugins.sources.jamf.deferred:DeferredJAMFDataSource [jamf]',
# 'bitfit = stethoscope.plugins.sources.bitfit.deferred:DeferredBitfitDataSource [bitfit]',
'landesk = stethoscope.plugins.sources.landesk.deferred:DeferredLandeskSQLDataSource [landesk]', # noqa
],
'stethoscope.plugins.sources.predevices': [
# device gathering plugins to which should run first to gather, e.g., MAC addresses
'bitfit = stethoscope.plugins.sources.bitfit.deferred:DeferredBitfitDataSource [bitfit]',
],
'stethoscope.plugins.sources.userinfo': [
# userinfo gathering plugins
'google = stethoscope.plugins.sources.google.deferred:DeferredGoogleDataSource [google]',
'jamf = stethoscope.plugins.sources.jamf.deferred:DeferredJAMFDataSource [jamf]',
'bitfit = stethoscope.plugins.sources.bitfit.deferred:DeferredBitfitDataSource [bitfit]',
],
'stethoscope.plugins.sources.accounts': [
# account information gathering plugins
'google = stethoscope.plugins.sources.google.deferred:DeferredGoogleDataSource [google]',
],
'stethoscope.plugins.sources.notifications': [
'es_notifications = stethoscope.plugins.sources.esnotifications:ElasticSearchNotifications [es_notifications]', # noqa
],
'stethoscope.plugins.practices.devices': [
'autoupdate = stethoscope.plugins.practices:KeyExistencePractice',
'encryption = stethoscope.plugins.practices:KeyExistencePractice',
'firewall = stethoscope.plugins.practices:KeyExistencePractice',
'jailed = stethoscope.plugins.practices:KeyExistencePractice',
'screenlock = stethoscope.plugins.practices:KeyExistencePractice',
'uptodate = stethoscope.plugins.practices:UptodatePractice',
# installed software
'carbonblack = stethoscope.plugins.practices:InstalledSoftwarePractice',
'sentinel = stethoscope.plugins.practices:InstalledSoftwarePractice',
],
'stethoscope.plugins.feedback': [
'restful_feedback = stethoscope.plugins.feedback.restful:RESTfulFeedback [restful_feedback]',
],
'stethoscope.plugins.transform.events': [
# hooks to augment events (e.g., with geolocation data)
'vpnfilter = stethoscope.plugins.transform.vpnfilter:VPNFilter [vpnfilter]',
],
'stethoscope.plugins.logging.request': [
# hooks to log api requests (e.g., accesses) externally
'es_logger = stethoscope.plugins.logging.eslogger:ElasticSearchAccessLogger [es_logger]',
],
'stethoscope.plugins.logging.failure': [
# hooks to log api failures externally
'atlas = stethoscope.plugins.logging.atlas:AtlasLogger [atlas]',
],
'stethoscope.batch.plugins.incremental': [
# plugins for handling (e.g., logging) entries one-at-a-time during batch processing
'batch_es = stethoscope.batch.plugins.incremental.es:ElasticSearchBatchLogger [batch_es]',
],
'stethoscope.batch.plugins.summary': [
# plugins for summarizing all entries after batch processing
'batch_restful_summary = stethoscope.batch.plugins.summary.restful:RESTfulSummary [batch_restful_summary]', # noqa
]
},
)
if __name__ == "__main__":
setuptools.setup(**setup_params)