Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
51f05764e0
2
.bowerrc
2
.bowerrc
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"directory": "bower_components"
|
"directory": "bower_components"
|
||||||
}
|
}
|
||||||
|
|
28
.jshintrc
28
.jshintrc
|
@ -1,29 +1,29 @@
|
||||||
{
|
{
|
||||||
"bitwise": true,
|
"node": true,
|
||||||
"browser": true,
|
"browser": true,
|
||||||
|
"esnext": true,
|
||||||
|
"bitwise": true,
|
||||||
"camelcase": false,
|
"camelcase": false,
|
||||||
"curly": true,
|
"curly": true,
|
||||||
"eqeqeq": true,
|
"eqeqeq": true,
|
||||||
"esnext": true,
|
|
||||||
"globals": {
|
|
||||||
"_": false,
|
|
||||||
"angular": false,
|
|
||||||
"d3": false,
|
|
||||||
"moment": false,
|
|
||||||
"self": false,
|
|
||||||
"toaster": false
|
|
||||||
},
|
|
||||||
"immed": true,
|
"immed": true,
|
||||||
"indent": 2,
|
"indent": 2,
|
||||||
"latedef": false,
|
"latedef": false,
|
||||||
"newcap": false,
|
"newcap": false,
|
||||||
"noarg": true,
|
"noarg": true,
|
||||||
"node": true,
|
|
||||||
"quotmark": "single",
|
"quotmark": "single",
|
||||||
"regexp": true,
|
"regexp": true,
|
||||||
"smarttabs": true,
|
"undef": true,
|
||||||
|
"unused": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"trailing": true,
|
"trailing": true,
|
||||||
"undef": true,
|
"smarttabs": true,
|
||||||
"unused": true
|
"globals": {
|
||||||
|
"angular": false,
|
||||||
|
"moment": false,
|
||||||
|
"toaster": false,
|
||||||
|
"d3": false,
|
||||||
|
"self": false,
|
||||||
|
"_": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,12 +4,6 @@
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: flake8
|
- id: flake8
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
- id: pretty-format-json
|
|
||||||
- id: check-ast
|
|
||||||
- id: check-case-conflict
|
|
||||||
- id: check-yaml
|
|
||||||
- id: autopep8-wrapper
|
|
||||||
|
|
||||||
- repo: git://github.com/pre-commit/mirrors-jshint
|
- repo: git://github.com/pre-commit/mirrors-jshint
|
||||||
sha: v2.9.5
|
sha: v2.9.5
|
||||||
hooks:
|
hooks:
|
||||||
|
|
78
bower.json
78
bower.json
|
@ -1,39 +1,50 @@
|
||||||
{
|
{
|
||||||
|
"name": "lemur",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/netflix/lemur.git"
|
||||||
|
},
|
||||||
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"jquery": "~2.2.0",
|
||||||
|
"angular-wizard": "~0.4.0",
|
||||||
"angular": "1.4.9",
|
"angular": "1.4.9",
|
||||||
"angular-animate": "~1.4.9",
|
"json3": "~3.3",
|
||||||
|
"es5-shim": "~4.5.0",
|
||||||
|
"bootstrap": "~3.3.6",
|
||||||
"angular-bootstrap": "~1.1.1",
|
"angular-bootstrap": "~1.1.1",
|
||||||
"angular-chart.js": "~0.8.8",
|
"angular-animate": "~1.4.9",
|
||||||
"angular-clipboard": "~1.3.0",
|
"restangular": "~1.5.1",
|
||||||
"angular-file-saver": "~1.0.1",
|
"ng-table": "~0.8.3",
|
||||||
|
"moment": "~2.11.1",
|
||||||
"angular-loading-bar": "~0.8.0",
|
"angular-loading-bar": "~0.8.0",
|
||||||
"angular-moment": "~0.10.3",
|
"angular-moment": "~0.10.3",
|
||||||
"angular-sanitize": "~1.5.0",
|
"moment-range": "~2.1.0",
|
||||||
|
"angular-clipboard": "~1.3.0",
|
||||||
|
"angularjs-toaster": "~1.0.0",
|
||||||
|
"angular-chart.js": "~0.8.8",
|
||||||
|
"ngletteravatar": "~4.0.0",
|
||||||
|
"bootswatch": "~3.3.6",
|
||||||
|
"fontawesome": "~4.5.0",
|
||||||
|
"satellizer": "~0.13.4",
|
||||||
|
"angular-ui-router": "~0.2.15",
|
||||||
|
"font-awesome": "~4.5.0",
|
||||||
|
"lodash": "~4.0.1",
|
||||||
|
"underscore": "~1.8.3",
|
||||||
"angular-smart-table": "2.1.8",
|
"angular-smart-table": "2.1.8",
|
||||||
"angular-strap": ">= 2.2.2",
|
"angular-strap": ">= 2.2.2",
|
||||||
"angular-translate": "^2.9.0",
|
|
||||||
"angular-ui-router": "~0.2.15",
|
|
||||||
"angular-ui-select": "~0.17.1",
|
|
||||||
"angular-ui-switch": "~0.1.0",
|
|
||||||
"angular-underscore": "^0.5.0",
|
"angular-underscore": "^0.5.0",
|
||||||
"angular-wizard": "~0.4.0",
|
"angular-translate": "^2.9.0",
|
||||||
"angularjs-toaster": "~1.0.0",
|
"angular-ui-switch": "~0.1.0",
|
||||||
"bootstrap": "~3.3.6",
|
"angular-sanitize": "~1.5.0",
|
||||||
"bootswatch": "~3.3.6",
|
"angular-file-saver": "~1.0.1",
|
||||||
"d3": "^3.5.17",
|
"angular-ui-select": "~0.17.1",
|
||||||
"es5-shim": "~4.5.0",
|
"d3": "^3.5.17"
|
||||||
"font-awesome": "~4.5.0",
|
},
|
||||||
"fontawesome": "~4.5.0",
|
"resolutions": {
|
||||||
"jquery": "~2.2.0",
|
"moment": ">=2.8.0 <2.11.0",
|
||||||
"json3": "~3.3",
|
"lodash": ">=1.3.0 <2.5.0",
|
||||||
"lodash": "~4.0.1",
|
"angular": "1.4.9"
|
||||||
"moment": "~2.11.1",
|
|
||||||
"moment-range": "~2.1.0",
|
|
||||||
"ng-table": "~0.8.3",
|
|
||||||
"ngletteravatar": "~4.0.0",
|
|
||||||
"restangular": "~1.5.1",
|
|
||||||
"satellizer": "~0.13.4",
|
|
||||||
"underscore": "~1.8.3"
|
|
||||||
},
|
},
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"**/.*",
|
"**/.*",
|
||||||
|
@ -41,16 +52,5 @@
|
||||||
"bower_components",
|
"bower_components",
|
||||||
"test",
|
"test",
|
||||||
"tests"
|
"tests"
|
||||||
],
|
]
|
||||||
"name": "lemur",
|
|
||||||
"private": true,
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://github.com/netflix/lemur.git"
|
|
||||||
},
|
|
||||||
"resolutions": {
|
|
||||||
"angular": "1.4.9",
|
|
||||||
"lodash": ">=1.3.0 <2.5.0",
|
|
||||||
"moment": ">=2.8.0 <2.11.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
16
docs/conf.py
16
docs/conf.py
|
@ -203,21 +203,21 @@ htmlhelp_basename = 'lemurdoc'
|
||||||
# -- Options for LaTeX output ---------------------------------------------
|
# -- Options for LaTeX output ---------------------------------------------
|
||||||
|
|
||||||
latex_elements = {
|
latex_elements = {
|
||||||
# The paper size ('letterpaper' or 'a4paper').
|
# The paper size ('letterpaper' or 'a4paper').
|
||||||
# 'papersize': 'letterpaper',
|
#'papersize': 'letterpaper',
|
||||||
|
|
||||||
# The font size ('10pt', '11pt' or '12pt').
|
# The font size ('10pt', '11pt' or '12pt').
|
||||||
# 'pointsize': '10pt',
|
#'pointsize': '10pt',
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
# Additional stuff for the LaTeX preamble.
|
||||||
# 'preamble': '',
|
#'preamble': '',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('index', 'lemur.tex', u'Lemur Documentation',
|
('index', 'lemur.tex', u'Lemur Documentation',
|
||||||
u'Kevin Glisson', 'manual'),
|
u'Kevin Glisson', 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ man_pages = [
|
||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [
|
||||||
('index', 'Lemur', u'Lemur Documentation',
|
('index', 'Lemur', u'Lemur Documentation',
|
||||||
u'Kevin Glisson', 'Lemur', 'SSL Certificate Management',
|
u'Kevin Glisson', 'Lemur', 'SSL Certificate Management',
|
||||||
'Miscellaneous'),
|
'Miscellaneous'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -240,8 +240,8 @@ gulp.task('addUrlContextPath',['addUrlContextPath:revreplace'], function(){
|
||||||
.pipe(gulpif(urlContextPathExists, replace('angular/', argv.urlContextPath + '/angular/')))
|
.pipe(gulpif(urlContextPathExists, replace('angular/', argv.urlContextPath + '/angular/')))
|
||||||
.pipe(gulp.dest(function(file){
|
.pipe(gulp.dest(function(file){
|
||||||
return file.base;
|
return file.base;
|
||||||
}));
|
}))
|
||||||
});
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('addUrlContextPath:revision', function(){
|
gulp.task('addUrlContextPath:revision', function(){
|
||||||
|
@ -249,16 +249,16 @@ gulp.task('addUrlContextPath:revision', function(){
|
||||||
.pipe(rev())
|
.pipe(rev())
|
||||||
.pipe(gulp.dest('lemur/static/dist'))
|
.pipe(gulp.dest('lemur/static/dist'))
|
||||||
.pipe(rev.manifest())
|
.pipe(rev.manifest())
|
||||||
.pipe(gulp.dest('lemur/static/dist'));
|
.pipe(gulp.dest('lemur/static/dist'))
|
||||||
});
|
})
|
||||||
|
|
||||||
gulp.task('addUrlContextPath:revreplace', ['addUrlContextPath:revision'], function(){
|
gulp.task('addUrlContextPath:revreplace', ['addUrlContextPath:revision'], function(){
|
||||||
var manifest = gulp.src('lemur/static/dist/rev-manifest.json');
|
var manifest = gulp.src("lemur/static/dist/rev-manifest.json");
|
||||||
var urlContextPathExists = argv.urlContextPath ? true : false;
|
var urlContextPathExists = argv.urlContextPath ? true : false;
|
||||||
return gulp.src('lemur/static/dist/index.html')
|
return gulp.src( "lemur/static/dist/index.html")
|
||||||
.pipe(gulpif(urlContextPathExists, revReplace({prefix: argv.urlContextPath + '/', manifest: manifest}, revReplace({manifest: manifest}))))
|
.pipe(gulpif(urlContextPathExists, revReplace({prefix: argv.urlContextPath + '/', manifest: manifest}, revReplace({manifest: manifest}))))
|
||||||
.pipe(gulp.dest('lemur/static/dist'));
|
.pipe(gulp.dest('lemur/static/dist'));
|
||||||
});
|
})
|
||||||
|
|
||||||
|
|
||||||
gulp.task('build', ['build:ngviews', 'build:inject', 'build:images', 'build:fonts', 'build:html', 'build:extras']);
|
gulp.task('build', ['build:ngviews', 'build:inject', 'build:images', 'build:fonts', 'build:html', 'build:extras']);
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
'use strict';
|
|
||||||
// Contents of: config/karma.conf.js
|
// Contents of: config/karma.conf.js
|
||||||
|
|
||||||
module.exports = function (config) {
|
module.exports = function (config) {
|
||||||
config.set({
|
config.set({
|
||||||
basePath : '../',
|
basePath : '../',
|
||||||
|
|
||||||
// Fix for "JASMINE is not supported anymore" warning
|
// Fix for "JASMINE is not supported anymore" warning
|
||||||
frameworks : ['jasmine'],
|
frameworks : ["jasmine"],
|
||||||
|
|
||||||
files : [
|
files : [
|
||||||
'app/lib/angular/angular.js',
|
'app/lib/angular/angular.js',
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
var gulp = require('gulp');
|
var gulp = require('gulp');
|
||||||
|
|
||||||
var browserSync = require('browser-sync');
|
var browserSync = require('browser-sync');
|
||||||
require('http-proxy');
|
var httpProxy = require('http-proxy');
|
||||||
|
|
||||||
/* This configuration allow you to configure browser sync to proxy your backend */
|
/* This configuration allow you to configure browser sync to proxy your backend */
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -18,7 +18,6 @@ class LdapPrincipal():
|
||||||
"""
|
"""
|
||||||
Provides methods for authenticating against an LDAP server.
|
Provides methods for authenticating against an LDAP server.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, args):
|
def __init__(self, args):
|
||||||
self._ldap_validate_conf()
|
self._ldap_validate_conf()
|
||||||
# setup ldap config
|
# setup ldap config
|
||||||
|
|
|
@ -211,7 +211,6 @@ class Login(Resource):
|
||||||
on your uses cases but. It is important to not that there is currently no build in method to revoke a users token \
|
on your uses cases but. It is important to not that there is currently no build in method to revoke a users token \
|
||||||
and force re-authentication.
|
and force re-authentication.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(Login, self).__init__()
|
super(Login, self).__init__()
|
||||||
|
@ -283,10 +282,10 @@ class Login(Resource):
|
||||||
metrics.send('login', 'counter', 1, metric_tags={'status': SUCCESS_METRIC_STATUS})
|
metrics.send('login', 'counter', 1, metric_tags={'status': SUCCESS_METRIC_STATUS})
|
||||||
return dict(token=create_token(user))
|
return dict(token=create_token(user))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.error("ldap error: {0}".format(e))
|
current_app.logger.error("ldap error: {0}".format(e))
|
||||||
ldap_message = 'ldap error: %s' % e
|
ldap_message = 'ldap error: %s' % e
|
||||||
metrics.send('login', 'counter', 1, metric_tags={'status': FAILURE_METRIC_STATUS})
|
metrics.send('login', 'counter', 1, metric_tags={'status': FAILURE_METRIC_STATUS})
|
||||||
return dict(message=ldap_message), 403
|
return dict(message=ldap_message), 403
|
||||||
|
|
||||||
# if not valid user - no certificates for you
|
# if not valid user - no certificates for you
|
||||||
metrics.send('login', 'counter', 1, metric_tags={'status': FAILURE_METRIC_STATUS})
|
metrics.send('login', 'counter', 1, metric_tags={'status': FAILURE_METRIC_STATUS})
|
||||||
|
@ -303,7 +302,6 @@ class Ping(Resource):
|
||||||
provider uses for its callbacks.
|
provider uses for its callbacks.
|
||||||
2. Add or change the Lemur AngularJS Configuration to point to your new provider
|
2. Add or change the Lemur AngularJS Configuration to point to your new provider
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(Ping, self).__init__()
|
super(Ping, self).__init__()
|
||||||
|
|
|
@ -25,7 +25,6 @@ api = Api(mod)
|
||||||
|
|
||||||
class AuthoritiesList(AuthenticatedResource):
|
class AuthoritiesList(AuthenticatedResource):
|
||||||
""" Defines the 'authorities' endpoint """
|
""" Defines the 'authorities' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(AuthoritiesList, self).__init__()
|
super(AuthoritiesList, self).__init__()
|
||||||
|
|
|
@ -25,7 +25,6 @@ class Hex(Field):
|
||||||
"""
|
"""
|
||||||
A hex formatted string.
|
A hex formatted string.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def _serialize(self, value, attr, obj):
|
def _serialize(self, value, attr, obj):
|
||||||
if value:
|
if value:
|
||||||
value = hex(int(value))[2:].upper()
|
value = hex(int(value))[2:].upper()
|
||||||
|
@ -318,7 +317,6 @@ class SubjectAlternativeNameExtension(Field):
|
||||||
:param kwargs: The same keyword arguments that :class:`Field` receives.
|
:param kwargs: The same keyword arguments that :class:`Field` receives.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def _serialize(self, value, attr, obj):
|
def _serialize(self, value, attr, obj):
|
||||||
general_names = []
|
general_names = []
|
||||||
name_type = None
|
name_type = None
|
||||||
|
|
|
@ -19,7 +19,6 @@ api = Api(mod)
|
||||||
|
|
||||||
class LemurDefaults(AuthenticatedResource):
|
class LemurDefaults(AuthenticatedResource):
|
||||||
""" Defines the 'defaults' endpoint """
|
""" Defines the 'defaults' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(LemurDefaults)
|
super(LemurDefaults)
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ api = Api(mod)
|
||||||
|
|
||||||
class DestinationsList(AuthenticatedResource):
|
class DestinationsList(AuthenticatedResource):
|
||||||
""" Defines the 'destinations' endpoint """
|
""" Defines the 'destinations' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(DestinationsList, self).__init__()
|
super(DestinationsList, self).__init__()
|
||||||
|
@ -336,7 +335,6 @@ class Destinations(AuthenticatedResource):
|
||||||
|
|
||||||
class CertificateDestinations(AuthenticatedResource):
|
class CertificateDestinations(AuthenticatedResource):
|
||||||
""" Defines the 'certificate/<int:certificate_id/destinations'' endpoint """
|
""" Defines the 'certificate/<int:certificate_id/destinations'' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(CertificateDestinations, self).__init__()
|
super(CertificateDestinations, self).__init__()
|
||||||
|
|
||||||
|
@ -409,7 +407,6 @@ class CertificateDestinations(AuthenticatedResource):
|
||||||
|
|
||||||
class DestinationsStats(AuthenticatedResource):
|
class DestinationsStats(AuthenticatedResource):
|
||||||
""" Defines the 'certificates' stats endpoint """
|
""" Defines the 'certificates' stats endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(DestinationsStats, self).__init__()
|
super(DestinationsStats, self).__init__()
|
||||||
|
|
|
@ -25,7 +25,6 @@ api = Api(mod)
|
||||||
|
|
||||||
class DomainsList(AuthenticatedResource):
|
class DomainsList(AuthenticatedResource):
|
||||||
""" Defines the 'domains' endpoint """
|
""" Defines the 'domains' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(DomainsList, self).__init__()
|
super(DomainsList, self).__init__()
|
||||||
|
|
||||||
|
@ -213,7 +212,6 @@ class Domains(AuthenticatedResource):
|
||||||
|
|
||||||
class CertificateDomains(AuthenticatedResource):
|
class CertificateDomains(AuthenticatedResource):
|
||||||
""" Defines the 'domains' endpoint """
|
""" Defines the 'domains' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(CertificateDomains, self).__init__()
|
super(CertificateDomains, self).__init__()
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ api = Api(mod)
|
||||||
|
|
||||||
class EndpointsList(AuthenticatedResource):
|
class EndpointsList(AuthenticatedResource):
|
||||||
""" Defines the 'endpoints' endpoint """
|
""" Defines the 'endpoints' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(EndpointsList, self).__init__()
|
super(EndpointsList, self).__init__()
|
||||||
|
|
|
@ -23,7 +23,6 @@ api = Api(mod)
|
||||||
|
|
||||||
class LogsList(AuthenticatedResource):
|
class LogsList(AuthenticatedResource):
|
||||||
""" Defines the 'logs' endpoint """
|
""" Defines the 'logs' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(LogsList, self).__init__()
|
super(LogsList, self).__init__()
|
||||||
|
|
|
@ -69,8 +69,8 @@ def run_migrations_online():
|
||||||
finally:
|
finally:
|
||||||
connection.close()
|
connection.close()
|
||||||
|
|
||||||
|
|
||||||
if context.is_offline_mode():
|
if context.is_offline_mode():
|
||||||
run_migrations_offline()
|
run_migrations_offline()
|
||||||
else:
|
else:
|
||||||
run_migrations_online()
|
run_migrations_online()
|
||||||
|
|
||||||
|
|
|
@ -19,35 +19,35 @@ def upgrade():
|
||||||
### commands auto generated by Alembic - please adjust! ###
|
### commands auto generated by Alembic - please adjust! ###
|
||||||
op.create_table('ciphers',
|
op.create_table('ciphers',
|
||||||
sa.Column('id', sa.Integer(), nullable=False),
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
sa.Column('name', sa.String(length=128), nullable=False),
|
sa.Column('name', sa.String(length=128), nullable=False),
|
||||||
sa.PrimaryKeyConstraint('id')
|
sa.PrimaryKeyConstraint('id')
|
||||||
)
|
)
|
||||||
op.create_table('policy',
|
op.create_table('policy',
|
||||||
sa.Column('id', sa.Integer(), nullable=False),
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
sa.Column('name', sa.String(length=128), nullable=True),
|
sa.Column('name', sa.String(length=128), nullable=True),
|
||||||
sa.PrimaryKeyConstraint('id')
|
sa.PrimaryKeyConstraint('id')
|
||||||
)
|
)
|
||||||
op.create_table('policies_ciphers',
|
op.create_table('policies_ciphers',
|
||||||
sa.Column('cipher_id', sa.Integer(), nullable=True),
|
sa.Column('cipher_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('policy_id', sa.Integer(), nullable=True),
|
sa.Column('policy_id', sa.Integer(), nullable=True),
|
||||||
sa.ForeignKeyConstraint(['cipher_id'], ['ciphers.id'], ),
|
sa.ForeignKeyConstraint(['cipher_id'], ['ciphers.id'], ),
|
||||||
sa.ForeignKeyConstraint(['policy_id'], ['policy.id'], )
|
sa.ForeignKeyConstraint(['policy_id'], ['policy.id'], )
|
||||||
)
|
)
|
||||||
op.create_index('policies_ciphers_ix', 'policies_ciphers', ['cipher_id', 'policy_id'], unique=False)
|
op.create_index('policies_ciphers_ix', 'policies_ciphers', ['cipher_id', 'policy_id'], unique=False)
|
||||||
op.create_table('endpoints',
|
op.create_table('endpoints',
|
||||||
sa.Column('id', sa.Integer(), nullable=False),
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
sa.Column('owner', sa.String(length=128), nullable=True),
|
sa.Column('owner', sa.String(length=128), nullable=True),
|
||||||
sa.Column('name', sa.String(length=128), nullable=True),
|
sa.Column('name', sa.String(length=128), nullable=True),
|
||||||
sa.Column('dnsname', sa.String(length=256), nullable=True),
|
sa.Column('dnsname', sa.String(length=256), nullable=True),
|
||||||
sa.Column('type', sa.String(length=128), nullable=True),
|
sa.Column('type', sa.String(length=128), nullable=True),
|
||||||
sa.Column('active', sa.Boolean(), nullable=True),
|
sa.Column('active', sa.Boolean(), nullable=True),
|
||||||
sa.Column('port', sa.Integer(), nullable=True),
|
sa.Column('port', sa.Integer(), nullable=True),
|
||||||
sa.Column('date_created', sa.DateTime(), server_default=sa.text(u'now()'), nullable=False),
|
sa.Column('date_created', sa.DateTime(), server_default=sa.text(u'now()'), nullable=False),
|
||||||
sa.Column('policy_id', sa.Integer(), nullable=True),
|
sa.Column('policy_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('certificate_id', sa.Integer(), nullable=True),
|
sa.Column('certificate_id', sa.Integer(), nullable=True),
|
||||||
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ),
|
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ),
|
||||||
sa.ForeignKeyConstraint(['policy_id'], ['policy.id'], ),
|
sa.ForeignKeyConstraint(['policy_id'], ['policy.id'], ),
|
||||||
sa.PrimaryKeyConstraint('id')
|
sa.PrimaryKeyConstraint('id')
|
||||||
)
|
)
|
||||||
### end Alembic commands ###
|
### end Alembic commands ###
|
||||||
|
|
||||||
|
|
|
@ -14,14 +14,13 @@ from alembic import op
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
from sqlalchemy.dialects import postgresql
|
from sqlalchemy.dialects import postgresql
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
### commands auto generated by Alembic - please adjust! ###
|
### commands auto generated by Alembic - please adjust! ###
|
||||||
op.create_table('certificate_replacement_associations',
|
op.create_table('certificate_replacement_associations',
|
||||||
sa.Column('replaced_certificate_id', sa.Integer(), nullable=True),
|
sa.Column('replaced_certificate_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('certificate_id', sa.Integer(), nullable=True),
|
sa.Column('certificate_id', sa.Integer(), nullable=True),
|
||||||
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ondelete='cascade'),
|
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ondelete='cascade'),
|
||||||
sa.ForeignKeyConstraint(['replaced_certificate_id'], ['certificates.id'], ondelete='cascade')
|
sa.ForeignKeyConstraint(['replaced_certificate_id'], ['certificates.id'], ondelete='cascade')
|
||||||
)
|
)
|
||||||
### end Alembic commands ###
|
### end Alembic commands ###
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,6 @@ def upgrade():
|
||||||
print("Creating dns_providers_id foreign key on pending_certs table")
|
print("Creating dns_providers_id foreign key on pending_certs table")
|
||||||
op.create_foreign_key(None, 'pending_certs', 'dns_providers', ['dns_provider_id'], ['id'], ondelete='CASCADE')
|
op.create_foreign_key(None, 'pending_certs', 'dns_providers', ['dns_provider_id'], ['id'], ondelete='CASCADE')
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
print("Removing dns_providers_id foreign key on pending_certs table")
|
print("Removing dns_providers_id foreign key on pending_certs table")
|
||||||
op.drop_constraint(None, 'pending_certs', type_='foreignkey')
|
op.drop_constraint(None, 'pending_certs', type_='foreignkey')
|
||||||
|
|
|
@ -19,16 +19,16 @@ def upgrade():
|
||||||
### commands auto generated by Alembic - please adjust! ###
|
### commands auto generated by Alembic - please adjust! ###
|
||||||
op.create_table('roles_authorities',
|
op.create_table('roles_authorities',
|
||||||
sa.Column('authority_id', sa.Integer(), nullable=True),
|
sa.Column('authority_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('role_id', sa.Integer(), nullable=True),
|
sa.Column('role_id', sa.Integer(), nullable=True),
|
||||||
sa.ForeignKeyConstraint(['authority_id'], ['authorities.id'], ),
|
sa.ForeignKeyConstraint(['authority_id'], ['authorities.id'], ),
|
||||||
sa.ForeignKeyConstraint(['role_id'], ['roles.id'], )
|
sa.ForeignKeyConstraint(['role_id'], ['roles.id'], )
|
||||||
)
|
)
|
||||||
op.create_index('roles_authorities_ix', 'roles_authorities', ['authority_id', 'role_id'], unique=True)
|
op.create_index('roles_authorities_ix', 'roles_authorities', ['authority_id', 'role_id'], unique=True)
|
||||||
op.create_table('roles_certificates',
|
op.create_table('roles_certificates',
|
||||||
sa.Column('certificate_id', sa.Integer(), nullable=True),
|
sa.Column('certificate_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('role_id', sa.Integer(), nullable=True),
|
sa.Column('role_id', sa.Integer(), nullable=True),
|
||||||
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ),
|
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ),
|
||||||
sa.ForeignKeyConstraint(['role_id'], ['roles.id'], )
|
sa.ForeignKeyConstraint(['role_id'], ['roles.id'], )
|
||||||
)
|
)
|
||||||
op.create_index('roles_certificates_ix', 'roles_certificates', ['certificate_id', 'role_id'], unique=True)
|
op.create_index('roles_certificates_ix', 'roles_certificates', ['certificate_id', 'role_id'], unique=True)
|
||||||
op.create_index('certificate_associations_ix', 'certificate_associations', ['domain_id', 'certificate_id'], unique=True)
|
op.create_index('certificate_associations_ix', 'certificate_associations', ['domain_id', 'certificate_id'], unique=True)
|
||||||
|
|
|
@ -14,7 +14,6 @@ from alembic import op
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
from sqlalchemy.dialects import postgresql
|
from sqlalchemy.dialects import postgresql
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
### commands auto generated by Alembic - please adjust! ###
|
### commands auto generated by Alembic - please adjust! ###
|
||||||
op.add_column('domains', sa.Column('sensitive', sa.Boolean(), nullable=True))
|
op.add_column('domains', sa.Column('sensitive', sa.Boolean(), nullable=True))
|
||||||
|
|
|
@ -16,69 +16,68 @@ from lemur.utils import Vault
|
||||||
from sqlalchemy.dialects import postgresql
|
from sqlalchemy.dialects import postgresql
|
||||||
from sqlalchemy_utils import ArrowType
|
from sqlalchemy_utils import ArrowType
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
op.create_table('pending_certs',
|
op.create_table('pending_certs',
|
||||||
sa.Column('id', sa.Integer(), nullable=False),
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
sa.Column('external_id', sa.String(length=128), nullable=True),
|
sa.Column('external_id', sa.String(length=128), nullable=True),
|
||||||
sa.Column('owner', sa.String(length=128), nullable=False),
|
sa.Column('owner', sa.String(length=128), nullable=False),
|
||||||
sa.Column('name', sa.String(length=256), nullable=True),
|
sa.Column('name', sa.String(length=256), nullable=True),
|
||||||
sa.Column('description', sa.String(length=1024), nullable=True),
|
sa.Column('description', sa.String(length=1024), nullable=True),
|
||||||
sa.Column('notify', sa.Boolean(), nullable=True),
|
sa.Column('notify', sa.Boolean(), nullable=True),
|
||||||
sa.Column('number_attempts', sa.Integer(), nullable=True),
|
sa.Column('number_attempts', sa.Integer(), nullable=True),
|
||||||
sa.Column('rename', sa.Boolean(), nullable=True),
|
sa.Column('rename', sa.Boolean(), nullable=True),
|
||||||
sa.Column('cn', sa.String(length=128), nullable=True),
|
sa.Column('cn', sa.String(length=128), nullable=True),
|
||||||
sa.Column('csr', sa.Text(), nullable=False),
|
sa.Column('csr', sa.Text(), nullable=False),
|
||||||
sa.Column('chain', sa.Text(), nullable=True),
|
sa.Column('chain', sa.Text(), nullable=True),
|
||||||
sa.Column('private_key', Vault(), nullable=True),
|
sa.Column('private_key', Vault(), nullable=True),
|
||||||
sa.Column('date_created', ArrowType(), server_default=sa.text('now()'), nullable=False),
|
sa.Column('date_created', ArrowType(), server_default=sa.text('now()'), nullable=False),
|
||||||
sa.Column('status', sa.String(length=128), nullable=True),
|
sa.Column('status', sa.String(length=128), nullable=True),
|
||||||
sa.Column('rotation', sa.Boolean(), nullable=True),
|
sa.Column('rotation', sa.Boolean(), nullable=True),
|
||||||
sa.Column('user_id', sa.Integer(), nullable=True),
|
sa.Column('user_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('authority_id', sa.Integer(), nullable=True),
|
sa.Column('authority_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('root_authority_id', sa.Integer(), nullable=True),
|
sa.Column('root_authority_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('rotation_policy_id', sa.Integer(), nullable=True),
|
sa.Column('rotation_policy_id', sa.Integer(), nullable=True),
|
||||||
sa.ForeignKeyConstraint(['authority_id'], ['authorities.id'], ondelete='CASCADE'),
|
sa.ForeignKeyConstraint(['authority_id'], ['authorities.id'], ondelete='CASCADE'),
|
||||||
sa.ForeignKeyConstraint(['root_authority_id'], ['authorities.id'], ondelete='CASCADE'),
|
sa.ForeignKeyConstraint(['root_authority_id'], ['authorities.id'], ondelete='CASCADE'),
|
||||||
sa.ForeignKeyConstraint(['rotation_policy_id'], ['rotation_policies.id'], ),
|
sa.ForeignKeyConstraint(['rotation_policy_id'], ['rotation_policies.id'], ),
|
||||||
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
|
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
|
||||||
sa.PrimaryKeyConstraint('id'),
|
sa.PrimaryKeyConstraint('id'),
|
||||||
sa.UniqueConstraint('name')
|
sa.UniqueConstraint('name')
|
||||||
)
|
)
|
||||||
op.create_table('pending_cert_destination_associations',
|
op.create_table('pending_cert_destination_associations',
|
||||||
sa.Column('destination_id', sa.Integer(), nullable=True),
|
sa.Column('destination_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
|
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
|
||||||
sa.ForeignKeyConstraint(['destination_id'], ['destinations.id'], ondelete='cascade'),
|
sa.ForeignKeyConstraint(['destination_id'], ['destinations.id'], ondelete='cascade'),
|
||||||
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ondelete='cascade')
|
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ondelete='cascade')
|
||||||
)
|
)
|
||||||
op.create_index('pending_cert_destination_associations_ix', 'pending_cert_destination_associations', ['destination_id', 'pending_cert_id'], unique=False)
|
op.create_index('pending_cert_destination_associations_ix', 'pending_cert_destination_associations', ['destination_id', 'pending_cert_id'], unique=False)
|
||||||
op.create_table('pending_cert_notification_associations',
|
op.create_table('pending_cert_notification_associations',
|
||||||
sa.Column('notification_id', sa.Integer(), nullable=True),
|
sa.Column('notification_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
|
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
|
||||||
sa.ForeignKeyConstraint(['notification_id'], ['notifications.id'], ondelete='cascade'),
|
sa.ForeignKeyConstraint(['notification_id'], ['notifications.id'], ondelete='cascade'),
|
||||||
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ondelete='cascade')
|
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ondelete='cascade')
|
||||||
)
|
)
|
||||||
op.create_index('pending_cert_notification_associations_ix', 'pending_cert_notification_associations', ['notification_id', 'pending_cert_id'], unique=False)
|
op.create_index('pending_cert_notification_associations_ix', 'pending_cert_notification_associations', ['notification_id', 'pending_cert_id'], unique=False)
|
||||||
op.create_table('pending_cert_replacement_associations',
|
op.create_table('pending_cert_replacement_associations',
|
||||||
sa.Column('replaced_certificate_id', sa.Integer(), nullable=True),
|
sa.Column('replaced_certificate_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
|
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
|
||||||
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ondelete='cascade'),
|
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ondelete='cascade'),
|
||||||
sa.ForeignKeyConstraint(['replaced_certificate_id'], ['certificates.id'], ondelete='cascade')
|
sa.ForeignKeyConstraint(['replaced_certificate_id'], ['certificates.id'], ondelete='cascade')
|
||||||
)
|
)
|
||||||
op.create_index('pending_cert_replacement_associations_ix', 'pending_cert_replacement_associations', ['replaced_certificate_id', 'pending_cert_id'], unique=False)
|
op.create_index('pending_cert_replacement_associations_ix', 'pending_cert_replacement_associations', ['replaced_certificate_id', 'pending_cert_id'], unique=False)
|
||||||
op.create_table('pending_cert_role_associations',
|
op.create_table('pending_cert_role_associations',
|
||||||
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
|
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('role_id', sa.Integer(), nullable=True),
|
sa.Column('role_id', sa.Integer(), nullable=True),
|
||||||
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ),
|
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ),
|
||||||
sa.ForeignKeyConstraint(['role_id'], ['roles.id'], )
|
sa.ForeignKeyConstraint(['role_id'], ['roles.id'], )
|
||||||
)
|
)
|
||||||
op.create_index('pending_cert_role_associations_ix', 'pending_cert_role_associations', ['pending_cert_id', 'role_id'], unique=False)
|
op.create_index('pending_cert_role_associations_ix', 'pending_cert_role_associations', ['pending_cert_id', 'role_id'], unique=False)
|
||||||
op.create_table('pending_cert_source_associations',
|
op.create_table('pending_cert_source_associations',
|
||||||
sa.Column('source_id', sa.Integer(), nullable=True),
|
sa.Column('source_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
|
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
|
||||||
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ondelete='cascade'),
|
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ondelete='cascade'),
|
||||||
sa.ForeignKeyConstraint(['source_id'], ['sources.id'], ondelete='cascade')
|
sa.ForeignKeyConstraint(['source_id'], ['sources.id'], ondelete='cascade')
|
||||||
)
|
)
|
||||||
op.create_index('pending_cert_source_associations_ix', 'pending_cert_source_associations', ['source_id', 'pending_cert_id'], unique=False)
|
op.create_index('pending_cert_source_associations_ix', 'pending_cert_source_associations', ['source_id', 'pending_cert_id'], unique=False)
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|
|
@ -32,7 +32,7 @@ def upgrade():
|
||||||
# If we've seen a pair already, delete the duplicates
|
# If we've seen a pair already, delete the duplicates
|
||||||
if seen.get("{}-{}".format(x.certificate_id, x.notification_id)):
|
if seen.get("{}-{}".format(x.certificate_id, x.notification_id)):
|
||||||
print("Deleting duplicate: {}".format(x))
|
print("Deleting duplicate: {}".format(x))
|
||||||
d = session.query(certificate_notification_associations).filter(certificate_notification_associations.c.id == x.id)
|
d = session.query(certificate_notification_associations).filter(certificate_notification_associations.c.id==x.id)
|
||||||
d.delete(synchronize_session=False)
|
d.delete(synchronize_session=False)
|
||||||
seen["{}-{}".format(x.certificate_id, x.notification_id)] = True
|
seen["{}-{}".format(x.certificate_id, x.notification_id)] = True
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
|
@ -14,17 +14,16 @@ from alembic import op
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
import sqlalchemy_utils
|
import sqlalchemy_utils
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
op.create_table('api_keys',
|
op.create_table('api_keys',
|
||||||
sa.Column('id', sa.Integer(), nullable=False),
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
sa.Column('name', sa.String(length=128), nullable=True),
|
sa.Column('name', sa.String(length=128), nullable=True),
|
||||||
sa.Column('user_id', sa.Integer(), nullable=False),
|
sa.Column('user_id', sa.Integer(), nullable=False),
|
||||||
sa.Column('ttl', sa.BigInteger(), nullable=False),
|
sa.Column('ttl', sa.BigInteger(), nullable=False),
|
||||||
sa.Column('issued_at', sa.BigInteger(), nullable=False),
|
sa.Column('issued_at', sa.BigInteger(), nullable=False),
|
||||||
sa.Column('revoked', sa.Boolean(), nullable=False),
|
sa.Column('revoked', sa.Boolean(), nullable=False),
|
||||||
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
|
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
|
||||||
sa.PrimaryKeyConstraint('id')
|
sa.PrimaryKeyConstraint('id')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ def upgrade():
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
db.session.flush()
|
db.session.flush()
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
op.drop_column(TABLE, "id")
|
op.drop_column(TABLE, "id")
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
|
@ -14,18 +14,17 @@ from alembic import op
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
import sqlalchemy_utils
|
import sqlalchemy_utils
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
### commands auto generated by Alembic - please adjust! ###
|
### commands auto generated by Alembic - please adjust! ###
|
||||||
op.create_table('logs',
|
op.create_table('logs',
|
||||||
sa.Column('id', sa.Integer(), nullable=False),
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
sa.Column('certificate_id', sa.Integer(), nullable=True),
|
sa.Column('certificate_id', sa.Integer(), nullable=True),
|
||||||
sa.Column('log_type', sa.Enum('key_view', name='log_type'), nullable=False),
|
sa.Column('log_type', sa.Enum('key_view', name='log_type'), nullable=False),
|
||||||
sa.Column('logged_at', sqlalchemy_utils.types.arrow.ArrowType(), server_default=sa.text('now()'), nullable=False),
|
sa.Column('logged_at', sqlalchemy_utils.types.arrow.ArrowType(), server_default=sa.text('now()'), nullable=False),
|
||||||
sa.Column('user_id', sa.Integer(), nullable=False),
|
sa.Column('user_id', sa.Integer(), nullable=False),
|
||||||
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ),
|
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ),
|
||||||
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
|
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
|
||||||
sa.PrimaryKeyConstraint('id')
|
sa.PrimaryKeyConstraint('id')
|
||||||
)
|
)
|
||||||
### end Alembic commands ###
|
### end Alembic commands ###
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ api = Api(mod)
|
||||||
|
|
||||||
class NotificationsList(AuthenticatedResource):
|
class NotificationsList(AuthenticatedResource):
|
||||||
""" Defines the 'notifications' endpoint """
|
""" Defines the 'notifications' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(NotificationsList, self).__init__()
|
super(NotificationsList, self).__init__()
|
||||||
|
@ -349,7 +348,6 @@ class Notifications(AuthenticatedResource):
|
||||||
|
|
||||||
class CertificateNotifications(AuthenticatedResource):
|
class CertificateNotifications(AuthenticatedResource):
|
||||||
""" Defines the 'certificate/<int:certificate_id/notifications'' endpoint """
|
""" Defines the 'certificate/<int:certificate_id/notifications'' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(CertificateNotifications, self).__init__()
|
super(CertificateNotifications, self).__init__()
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ api = Api(mod)
|
||||||
|
|
||||||
class PluginsList(AuthenticatedResource):
|
class PluginsList(AuthenticatedResource):
|
||||||
""" Defines the 'plugins' endpoint """
|
""" Defines the 'plugins' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(PluginsList, self).__init__()
|
super(PluginsList, self).__init__()
|
||||||
|
@ -81,7 +80,6 @@ class PluginsList(AuthenticatedResource):
|
||||||
|
|
||||||
class Plugins(AuthenticatedResource):
|
class Plugins(AuthenticatedResource):
|
||||||
""" Defines the 'plugins' endpoint """
|
""" Defines the 'plugins' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(Plugins, self).__init__()
|
super(Plugins, self).__init__()
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@ api = Api(mod)
|
||||||
|
|
||||||
class RolesList(AuthenticatedResource):
|
class RolesList(AuthenticatedResource):
|
||||||
""" Defines the 'roles' endpoint """
|
""" Defines the 'roles' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(RolesList, self).__init__()
|
super(RolesList, self).__init__()
|
||||||
|
@ -310,7 +309,6 @@ class Roles(AuthenticatedResource):
|
||||||
|
|
||||||
class UserRolesList(AuthenticatedResource):
|
class UserRolesList(AuthenticatedResource):
|
||||||
""" Defines the 'roles' endpoint """
|
""" Defines the 'roles' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(UserRolesList, self).__init__()
|
super(UserRolesList, self).__init__()
|
||||||
|
@ -370,7 +368,6 @@ class UserRolesList(AuthenticatedResource):
|
||||||
|
|
||||||
class AuthorityRolesList(AuthenticatedResource):
|
class AuthorityRolesList(AuthenticatedResource):
|
||||||
""" Defines the 'roles' endpoint """
|
""" Defines the 'roles' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(AuthorityRolesList, self).__init__()
|
super(AuthorityRolesList, self).__init__()
|
||||||
|
|
|
@ -24,7 +24,6 @@ api = Api(mod)
|
||||||
|
|
||||||
class SourcesList(AuthenticatedResource):
|
class SourcesList(AuthenticatedResource):
|
||||||
""" Defines the 'sources' endpoint """
|
""" Defines the 'sources' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(SourcesList, self).__init__()
|
super(SourcesList, self).__init__()
|
||||||
|
@ -282,7 +281,6 @@ class Sources(AuthenticatedResource):
|
||||||
|
|
||||||
class CertificateSources(AuthenticatedResource):
|
class CertificateSources(AuthenticatedResource):
|
||||||
""" Defines the 'certificate/<int:certificate_id/sources'' endpoint """
|
""" Defines the 'certificate/<int:certificate_id/sources'' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(CertificateSources, self).__init__()
|
super(CertificateSources, self).__init__()
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,23 @@
|
||||||
{
|
{
|
||||||
"bitwise": true,
|
"node": true,
|
||||||
"browser": true,
|
"browser": true,
|
||||||
|
"esnext": true,
|
||||||
|
"bitwise": true,
|
||||||
"camelcase": true,
|
"camelcase": true,
|
||||||
"curly": true,
|
"curly": true,
|
||||||
"eqeqeq": true,
|
"eqeqeq": true,
|
||||||
"esnext": true,
|
"immed": true,
|
||||||
|
"indent": 2,
|
||||||
|
"latedef": true,
|
||||||
|
"newcap": true,
|
||||||
|
"noarg": true,
|
||||||
|
"quotmark": "single",
|
||||||
|
"regexp": true,
|
||||||
|
"undef": true,
|
||||||
|
"unused": true,
|
||||||
|
"strict": true,
|
||||||
|
"trailing": true,
|
||||||
|
"smarttabs": true,
|
||||||
"globals": {
|
"globals": {
|
||||||
"after": false,
|
"after": false,
|
||||||
"afterEach": false,
|
"afterEach": false,
|
||||||
|
@ -18,18 +31,6 @@
|
||||||
"it": false,
|
"it": false,
|
||||||
"jasmine": false,
|
"jasmine": false,
|
||||||
"spyOn": false
|
"spyOn": false
|
||||||
},
|
}
|
||||||
"immed": true,
|
|
||||||
"indent": 2,
|
|
||||||
"latedef": true,
|
|
||||||
"newcap": true,
|
|
||||||
"noarg": true,
|
|
||||||
"node": true,
|
|
||||||
"quotmark": "single",
|
|
||||||
"regexp": true,
|
|
||||||
"smarttabs": true,
|
|
||||||
"strict": true,
|
|
||||||
"trailing": true,
|
|
||||||
"undef": true,
|
|
||||||
"unused": true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import pytest
|
import pytest
|
||||||
from lemur.auth.ldap import * # noqa
|
from lemur.auth.ldap import * # noqa
|
||||||
from mock import patch, MagicMock
|
from mock import patch, MagicMock
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ api = Api(mod)
|
||||||
|
|
||||||
class UsersList(AuthenticatedResource):
|
class UsersList(AuthenticatedResource):
|
||||||
""" Defines the 'users' endpoint """
|
""" Defines the 'users' endpoint """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reqparse = reqparse.RequestParser()
|
self.reqparse = reqparse.RequestParser()
|
||||||
super(UsersList, self).__init__()
|
super(UsersList, self).__init__()
|
||||||
|
|
28
package.json
28
package.json
|
@ -1,4 +1,10 @@
|
||||||
{
|
{
|
||||||
|
"name": "Lemur",
|
||||||
|
"private": true,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/netflix/lemur.git"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bower": "^1.8.2",
|
"bower": "^1.8.2",
|
||||||
"browser-sync": "^2.3.1",
|
"browser-sync": "^2.3.1",
|
||||||
|
@ -45,22 +51,16 @@
|
||||||
"uglify-save-license": "^0.4.1",
|
"uglify-save-license": "^0.4.1",
|
||||||
"yargs": "^7.0.2"
|
"yargs": "^7.0.2"
|
||||||
},
|
},
|
||||||
|
"scripts": {
|
||||||
|
"postinstall": "node_modules/.bin/bower install --allow-root --config.interactive=false",
|
||||||
|
"pretest": "npm install && npm run build_static",
|
||||||
|
"build_static": "gulp build",
|
||||||
|
"prelint": "npm install",
|
||||||
|
"lint": "jshint lemur/static/app/",
|
||||||
|
"test": "gulp test"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"jshint": "^2.8.0",
|
"jshint": "^2.8.0",
|
||||||
"karma-chrome-launcher": "^2.0.0"
|
"karma-chrome-launcher": "^2.0.0"
|
||||||
},
|
|
||||||
"name": "Lemur",
|
|
||||||
"private": true,
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://github.com/netflix/lemur.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"build_static": "gulp build",
|
|
||||||
"lint": "jshint lemur/static/app/",
|
|
||||||
"postinstall": "node_modules/.bin/bower install --allow-root --config.interactive=false",
|
|
||||||
"prelint": "npm install",
|
|
||||||
"pretest": "npm install && npm run build_static",
|
|
||||||
"test": "gulp test"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ requests-toolbelt==0.8.0 # via twine
|
||||||
requests==2.19.1 # via requests-toolbelt, twine
|
requests==2.19.1 # via requests-toolbelt, twine
|
||||||
six==1.11.0 # via cfgv, pre-commit
|
six==1.11.0 # via cfgv, pre-commit
|
||||||
toml==0.9.4 # via pre-commit
|
toml==0.9.4 # via pre-commit
|
||||||
tqdm==4.25.0 # via twine
|
tqdm==4.24.0 # via twine
|
||||||
twine==1.11.0
|
twine==1.11.0
|
||||||
urllib3==1.23 # via requests
|
urllib3==1.23 # via requests
|
||||||
virtualenv==16.0.0 # via pre-commit
|
virtualenv==16.0.0 # via pre-commit
|
||||||
|
|
|
@ -79,7 +79,7 @@ s3transfer==0.1.13
|
||||||
six==1.11.0
|
six==1.11.0
|
||||||
snowballstemmer==1.2.1 # via sphinx
|
snowballstemmer==1.2.1 # via sphinx
|
||||||
sphinx-rtd-theme==0.4.1
|
sphinx-rtd-theme==0.4.1
|
||||||
sphinx==1.7.7
|
sphinx==1.7.6
|
||||||
sphinxcontrib-httpdomain==1.7.0
|
sphinxcontrib-httpdomain==1.7.0
|
||||||
sphinxcontrib-websupport==1.1.0 # via sphinx
|
sphinxcontrib-websupport==1.1.0 # via sphinx
|
||||||
sqlalchemy-utils==0.33.3
|
sqlalchemy-utils==0.33.3
|
||||||
|
|
|
@ -8,9 +8,9 @@ asn1crypto==0.24.0 # via cryptography
|
||||||
atomicwrites==1.1.5 # via pytest
|
atomicwrites==1.1.5 # via pytest
|
||||||
attrs==18.1.0 # via pytest
|
attrs==18.1.0 # via pytest
|
||||||
aws-xray-sdk==0.95 # via moto
|
aws-xray-sdk==0.95 # via moto
|
||||||
boto3==1.7.82 # via moto
|
boto3==1.7.79 # via moto
|
||||||
boto==2.49.0 # via moto
|
boto==2.49.0 # via moto
|
||||||
botocore==1.10.82 # via boto3, moto, s3transfer
|
botocore==1.10.79 # via boto3, moto, s3transfer
|
||||||
certifi==2018.8.13 # via requests
|
certifi==2018.8.13 # via requests
|
||||||
cffi==1.11.5 # via cryptography
|
cffi==1.11.5 # via cryptography
|
||||||
chardet==3.0.4 # via requests
|
chardet==3.0.4 # via requests
|
||||||
|
@ -47,7 +47,7 @@ pycryptodome==3.6.6 # via python-jose
|
||||||
pyflakes==2.0.0
|
pyflakes==2.0.0
|
||||||
pytest-flask==0.10.0
|
pytest-flask==0.10.0
|
||||||
pytest-mock==1.10.0
|
pytest-mock==1.10.0
|
||||||
pytest==3.7.2
|
pytest==3.7.1
|
||||||
python-dateutil==2.7.3 # via botocore, faker, freezegun, moto
|
python-dateutil==2.7.3 # via botocore, faker, freezegun, moto
|
||||||
python-jose==2.0.2 # via moto
|
python-jose==2.0.2 # via moto
|
||||||
pytz==2018.5 # via moto
|
pytz==2018.5 # via moto
|
||||||
|
@ -59,7 +59,7 @@ s3transfer==0.1.13 # via boto3
|
||||||
six==1.11.0 # via cryptography, docker, docker-pycreds, faker, freezegun, mock, more-itertools, moto, pytest, python-dateutil, python-jose, requests-mock, responses, websocket-client
|
six==1.11.0 # via cryptography, docker, docker-pycreds, faker, freezegun, mock, more-itertools, moto, pytest, python-dateutil, python-jose, requests-mock, responses, websocket-client
|
||||||
text-unidecode==1.2 # via faker
|
text-unidecode==1.2 # via faker
|
||||||
urllib3==1.23 # via requests
|
urllib3==1.23 # via requests
|
||||||
websocket-client==0.51.0 # via docker
|
websocket-client==0.49.0 # via docker
|
||||||
werkzeug==0.14.1 # via flask, moto, pytest-flask
|
werkzeug==0.14.1 # via flask, moto, pytest-flask
|
||||||
wrapt==1.10.11 # via aws-xray-sdk
|
wrapt==1.10.11 # via aws-xray-sdk
|
||||||
xmltodict==0.11.0 # via moto
|
xmltodict==0.11.0 # via moto
|
||||||
|
|
|
@ -13,8 +13,8 @@ asn1crypto==0.24.0 # via cryptography
|
||||||
asyncpool==1.0
|
asyncpool==1.0
|
||||||
bcrypt==3.1.4 # via flask-bcrypt, paramiko
|
bcrypt==3.1.4 # via flask-bcrypt, paramiko
|
||||||
blinker==1.4 # via flask-mail, flask-principal, raven
|
blinker==1.4 # via flask-mail, flask-principal, raven
|
||||||
boto3==1.7.82
|
boto3==1.7.79
|
||||||
botocore==1.10.82 # via boto3, s3transfer
|
botocore==1.10.79 # via boto3, s3transfer
|
||||||
certifi==2018.8.13
|
certifi==2018.8.13
|
||||||
cffi==1.11.5 # via bcrypt, cryptography, pynacl
|
cffi==1.11.5 # via bcrypt, cryptography, pynacl
|
||||||
chardet==3.0.4 # via requests
|
chardet==3.0.4 # via requests
|
||||||
|
@ -73,7 +73,7 @@ retrying==1.3.3
|
||||||
s3transfer==0.1.13 # via boto3
|
s3transfer==0.1.13 # via boto3
|
||||||
six==1.11.0
|
six==1.11.0
|
||||||
sqlalchemy-utils==0.33.3
|
sqlalchemy-utils==0.33.3
|
||||||
sqlalchemy==1.2.11 # via alembic, flask-sqlalchemy, marshmallow-sqlalchemy, sqlalchemy-utils
|
sqlalchemy==1.2.10 # via alembic, flask-sqlalchemy, marshmallow-sqlalchemy, sqlalchemy-utils
|
||||||
tabulate==0.8.2
|
tabulate==0.8.2
|
||||||
urllib3==1.23 # via requests
|
urllib3==1.23 # via requests
|
||||||
werkzeug==0.14.1 # via flask
|
werkzeug==0.14.1 # via flask
|
||||||
|
|
1
setup.py
1
setup.py
|
@ -59,7 +59,6 @@ class SmartInstall(install):
|
||||||
If the package indicator is missing, this will also force a run of
|
If the package indicator is missing, this will also force a run of
|
||||||
`build_static` which is required for JavaScript assets and other things.
|
`build_static` which is required for JavaScript assets and other things.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def _needs_static(self):
|
def _needs_static(self):
|
||||||
return not os.path.exists(os.path.join(ROOT, 'lemur/static/dist'))
|
return not os.path.exists(os.path.join(ROOT, 'lemur/static/dist'))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue