WIP: Add support for Acme/LetsEncrypt with DNS Provider integration

This commit is contained in:
Curtis Castrapel 2018-04-10 14:28:53 -07:00
parent d66dd543bf
commit b2e6938815
6 changed files with 21 additions and 4 deletions

View File

@ -102,7 +102,7 @@ class Certificate(db.Model):
serial = Column(String(128)) serial = Column(String(128))
cn = Column(String(128)) cn = Column(String(128))
deleted = Column(Boolean, index=True) deleted = Column(Boolean, index=True)
dns_provider_id = Column(Integer(), nullable=True) dns_provider = Column(Integer(), nullable=True)
not_before = Column(ArrowType) not_before = Column(ArrowType)
not_after = Column(ArrowType) not_after = Column(ArrowType)

View File

@ -132,3 +132,16 @@ pending_cert_role_associations = db.Table('pending_cert_role_associations',
) )
Index('pending_cert_role_associations_ix', pending_cert_role_associations.c.pending_cert_id, pending_cert_role_associations.c.role_id) Index('pending_cert_role_associations_ix', pending_cert_role_associations.c.pending_cert_id, pending_cert_role_associations.c.role_id)
dns_providers = db.Table('dns_providers',
Column('id', Integer(), nullable=False),
Column('name', String(length=256), nullable=True),
Column('description', String(length=1024), nullable=True),
Column('provider_type', String(length=256), nullable=True),
Column('credentials', String(length=256), nullable=True),
Column('api_endpoint', String(length=256), nullable=True),
Column('date_created', ArrowType(), server_default=text('now()'), nullable=False),
Column('status', String(length=128), nullable=True),
Column('options', JSON),
PrimaryKeyConstraint('id'),
UniqueConstraint('name'))

View File

@ -11,6 +11,7 @@
.. moduleauthor:: Mikhail Khodorovskiy <mikhail.khodorovskiy@jivesoftware.com> .. moduleauthor:: Mikhail Khodorovskiy <mikhail.khodorovskiy@jivesoftware.com>
""" """
import josepy as jose import josepy as jose
import json
from flask import current_app from flask import current_app

View File

@ -51,6 +51,7 @@ angular.module('lemur')
} }
}); });
}); });
console.log("HERE2")
$scope.getAuthoritiesByName = function (value) { $scope.getAuthoritiesByName = function (value) {
return AuthorityService.findAuthorityByName(value).then(function (authorities) { return AuthorityService.findAuthorityByName(value).then(function (authorities) {

View File

@ -1,4 +1,4 @@
<form name="trackingForm" novalidate> static/app/angular/certificates/certificate/tracking.tpl.html<form name="trackingForm" novalidate>
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group" <div class="form-group"
ng-class="{'has-error': trackingForm.ownerEmail.$invalid, 'has-success': !trackingForm.$invalid&&trackingForm.ownerEmail.$dirty}"> ng-class="{'has-error': trackingForm.ownerEmail.$invalid, 'has-success': !trackingForm.$invalid&&trackingForm.ownerEmail.$dirty}">

View File

@ -44,20 +44,22 @@ angular.module('lemur')
DestinationApi.get(editId).then(function (destination) { DestinationApi.get(editId).then(function (destination) {
$scope.destination = destination; $scope.destination = destination;
console.log("HERE1");
PluginService.getByType('destination').then(function (plugins) { PluginService.getByType('destination').then(function (plugins) {
$scope.plugins = plugins; $scope.plugins = plugins;
_.each($scope.plugins, function (plugin) { _.each($scope.plugins, function (plugin) {
console.log("HERE2");
if (plugin.slug === $scope.destination.plugin.slug) { if (plugin.slug === $scope.destination.plugin.slug) {
plugin.pluginOptions = $scope.destination.plugin.pluginOptions; plugin.pluginOptions = $scope.destination.plugin.pluginOptions;
$scope.destination.plugin = plugin; $scope.destination.plugin = plugin;
_.each($scope.destination.plugin.pluginOptions, function (option) { _.each($scope.destination.plugin.pluginOptions, function (option) {
console.log("HERE3");
if (option.type === 'export-plugin') { if (option.type === 'export-plugin') {
PluginService.getByType('export').then(function (plugins) { PluginService.getByType('export').then(function (plugins) {
$scope.exportPlugins = plugins; $scope.exportPlugins = plugins;
_.each($scope.exportPlugins, function (plugin) { _.each($scope.exportPlugins, function (plugin) {
console.log("HERE4");
if (plugin.slug === option.value.slug) { if (plugin.slug === option.value.slug) {
plugin.pluginOptions = option.value.pluginOptions; plugin.pluginOptions = option.value.pluginOptions;
option.value = plugin; option.value = plugin;