Addressing comments. Updating copyrights. Added function to determine authorative name server

This commit is contained in:
Curtis Castrapel 2018-05-29 10:18:16 -07:00
parent ae26e44cc2
commit 544a02ca3f
123 changed files with 251 additions and 150 deletions

View File

@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier same "printed page" as the copyright notice for easier
identification within third-party archives. identification within third-party archives.
Copyright 2014 Netflix, Inc. Copyright 2018 Netflix, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View File

@ -59,7 +59,7 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'lemur' project = u'lemur'
copyright = u'2015, Netflix Inc.' copyright = u'2018, Netflix Inc.'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the

View File

@ -15,4 +15,4 @@ __author__ = "The Lemur developers"
__email__ = "security@netflix.com" __email__ = "security@netflix.com"
__license__ = "Apache License, Version 2.0" __license__ = "Apache License, Version 2.0"
__copyright__ = "Copyright 2017 {0}".format(__author__) __copyright__ = "Copyright 2018 {0}".format(__author__)

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur .. module: lemur
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.api_keys.cli .. module: lemur.api_keys.cli
:platform: Unix :platform: Unix
:copyright: (c) 2017 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Eric Coan <kungfury@instructure.com> .. moduleauthor:: Eric Coan <kungfury@instructure.com>
""" """

View File

@ -2,7 +2,7 @@
.. module: lemur.api_keys.models .. module: lemur.api_keys.models
:platform: Unix :platform: Unix
:synopsis: This module contains all of the models need to create an api key within Lemur. :synopsis: This module contains all of the models need to create an api key within Lemur.
:copyright: (c) 2017 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Eric Coan <kungfury@instructure.com> .. moduleauthor:: Eric Coan <kungfury@instructure.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.api_keys.schemas .. module: lemur.api_keys.schemas
:platform: Unix :platform: Unix
:copyright: (c) 2017 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Eric Coan <kungfury@instructure.com> .. moduleauthor:: Eric Coan <kungfury@instructure.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.api_keys.service .. module: lemur.api_keys.service
:platform: Unix :platform: Unix
:copyright: (c) 2017 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Eric Coan <kungfury@instructure.com> .. moduleauthor:: Eric Coan <kungfury@instructure.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.api_keys.views .. module: lemur.api_keys.views
:platform: Unix :platform: Unix
:copyright: (c) 2017 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Eric Coan <kungfury@instructure.com> .. moduleauthor:: Eric Coan <kungfury@instructure.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.auth.ldap .. module: lemur.auth.ldap
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Ian Stahnke <ian.stahnke@myob.com> .. moduleauthor:: Ian Stahnke <ian.stahnke@myob.com>
""" """

View File

@ -2,7 +2,7 @@
.. module: lemur.auth.permissions .. module: lemur.auth.permissions
:platform: Unix :platform: Unix
:synopsis: This module defines all the permission used within Lemur :synopsis: This module defines all the permission used within Lemur
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -3,7 +3,7 @@
:platform: Unix :platform: Unix
:synopsis: This module contains all of the authentication duties for :synopsis: This module contains all of the authentication duties for
lemur lemur
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.auth.views .. module: lemur.auth.views
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -2,7 +2,7 @@
.. module: lemur.authorities.models .. module: lemur.authorities.models
:platform: unix :platform: unix
:synopsis: This module contains all of the models need to create an authority within Lemur. :synopsis: This module contains all of the models need to create an authority within Lemur.
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.authorities.schemas .. module: lemur.authorities.schemas
:platform: unix :platform: unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -3,7 +3,7 @@
:platform: Unix :platform: Unix
:synopsis: This module contains all of the services level functions used to :synopsis: This module contains all of the services level functions used to
administer authorities in Lemur administer authorities in Lemur
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.authorities.views .. module: lemur.authorities.views
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.authorizations.models .. module: lemur.authorizations.models
:platform: unix :platform: unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Netflix Secops <secops@netflix.com> .. moduleauthor:: Netflix Secops <secops@netflix.com>
""" """
@ -12,7 +12,7 @@ from lemur.database import db
from lemur.plugins.base import plugins from lemur.plugins.base import plugins
class Authorizations(db.Model): class Authorization(db.Model):
__tablename__ = 'pending_dns_authorizations' __tablename__ = 'pending_dns_authorizations'
id = Column(Integer, primary_key=True, autoincrement=True) id = Column(Integer, primary_key=True, autoincrement=True)
account_number = Column(String(128)) account_number = Column(String(128))
@ -25,7 +25,7 @@ class Authorizations(db.Model):
return plugins.get(self.plugin_name) return plugins.get(self.plugin_name)
def __repr__(self): def __repr__(self):
return "Authorizations(id={id})".format(label=self.id) return "Authorization(id={id})".format(label=self.id)
def __init__(self, account_number, domains, dns_provider_type, options=None): def __init__(self, account_number, domains, dns_provider_type, options=None):
self.account_number = account_number self.account_number = account_number

View File

@ -1,18 +1,18 @@
""" """
.. module: lemur.pending_certificates.service .. module: lemur.pending_certificates.service
Copyright (c) 2017 and onwards Instart Logic, Inc. All rights reserved. Copyright (c) 2018 and onwards Netflix, Inc. All rights reserved.
.. moduleauthor:: Secops <secops@netflix.com> .. moduleauthor:: Secops <secops@netflix.com>
""" """
from lemur import database from lemur import database
from lemur.authorizations.models import Authorizations from lemur.authorizations.models import Authorization
def get(authorization_id): def get(authorization_id):
""" """
Retrieve dns authorization by ID Retrieve dns authorization by ID
""" """
return database.get(Authorizations, authorization_id) return database.get(Authorization, authorization_id)
def create(account_number, domains, dns_provider_type, options=None): def create(account_number, domains, dns_provider_type, options=None):
@ -20,5 +20,5 @@ def create(account_number, domains, dns_provider_type, options=None):
Creates a new dns authorization. Creates a new dns authorization.
""" """
authorization = Authorizations(account_number, domains, dns_provider_type, options) authorization = Authorization(account_number, domains, dns_provider_type, options)
return database.create(authorization) return database.create(authorization)

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.certificate.cli .. module: lemur.certificate.cli
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -3,7 +3,7 @@ Debugging hooks for dumping imported or generated CSR and certificate details to
.. module: lemur.certificates.hooks .. module: lemur.certificates.hooks
:platform: Unix :platform: Unix
:copyright: (c) 2016-2017 by Marti Raudsepp, see AUTHORS for more :copyright: (c) 2018 by Marti Raudsepp, see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Marti Raudsepp <marti@juffo.org> .. moduleauthor:: Marti Raudsepp <marti@juffo.org>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.certificates.models .. module: lemur.certificates.models
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.certificates.schemas .. module: lemur.certificates.schemas
:platform: unix :platform: unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.certificate.service .. module: lemur.certificate.service
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.certificates.verify .. module: lemur.certificates.verify
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.certificates.views .. module: lemur.certificates.views
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.common.fields .. module: lemur.common.fields
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.common.health .. module: lemur.common.health
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.common.managers .. module: lemur.common.managers
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.common.schema .. module: lemur.common.schema
:platform: unix :platform: unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.common.utils .. module: lemur.common.utils
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,6 +1,6 @@
""" """
.. module: lemur.constants .. module: lemur.constants
:copyright: (c) 2015 by Netflix Inc. :copyright: (c) 2018 by Netflix Inc.
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
""" """
SAN_NAMING_TEMPLATE = "SAN-{subject}-{issuer}-{not_before}-{not_after}" SAN_NAMING_TEMPLATE = "SAN-{subject}-{issuer}-{not_before}-{not_after}"

View File

@ -4,7 +4,7 @@
:synopsis: This module contains all of the database related methods :synopsis: This module contains all of the database related methods
needed for lemur to interact with a datastore needed for lemur to interact with a datastore
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.defaults.schemas .. module: lemur.defaults.schemas
:platform: unix :platform: unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,6 +1,6 @@
""" """
.. module: lemur.defaults.views .. module: lemur.defaults.views
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
""" """
from flask import current_app, Blueprint from flask import current_app, Blueprint

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.destinations.models .. module: lemur.destinations.models
:platform: unix :platform: unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.destinations.schemas .. module: lemur.destinations.schemas
:platform: unix :platform: unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.destinations.service .. module: lemur.destinations.service
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -2,7 +2,7 @@
.. module: lemur.destinations.views .. module: lemur.destinations.views
:platform: Unix :platform: Unix
:synopsis: This module contains all of the accounts view code. :synopsis: This module contains all of the accounts view code.
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -7,7 +7,7 @@ from lemur.plugins.base import plugins
from lemur.utils import Vault from lemur.utils import Vault
class DnsProviders(db.Model): class DnsProvider(db.Model):
__tablename__ = 'dns_providers' __tablename__ = 'dns_providers'
id = Column( id = Column(
Integer(), Integer(),
@ -34,4 +34,4 @@ class DnsProviders(db.Model):
return plugins.get(self.plugin_name) return plugins.get(self.plugin_name)
def __repr__(self): def __repr__(self):
return "DnsProviders(name={name})".format(name=self.name) return "DnsProvider(name={name})".format(name=self.name)

View File

@ -2,7 +2,7 @@ import json
from flask import current_app from flask import current_app
from lemur import database from lemur import database
from lemur.dns_providers.models import DnsProviders from lemur.dns_providers.models import DnsProvider
def render(args): def render(args):
@ -11,13 +11,13 @@ def render(args):
:param args: :param args:
:return: :return:
""" """
query = database.session_query(DnsProviders) query = database.session_query(DnsProvider)
return database.sort_and_page(query, DnsProviders, args) return database.sort_and_page(query, DnsProvider, args)
def get(dns_provider_id): def get(dns_provider_id):
provider = database.get(DnsProviders, dns_provider_id) provider = database.get(DnsProvider, dns_provider_id)
return provider return provider
@ -66,7 +66,7 @@ def create(data):
credentials = {} credentials = {}
for item in data.get("provider_type", {}).get("requirements", []): for item in data.get("provider_type", {}).get("requirements", []):
credentials[item["name"]] = item["value"] credentials[item["name"]] = item["value"]
dns_provider = DnsProviders( dns_provider = DnsProvider(
name=provider_name, name=provider_name,
description=data.get("description"), description=data.get("description"),
provider_type=data.get("provider_type").get("name"), provider_type=data.get("provider_type").get("name"),

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.dns)providers.views .. module: lemur.dns)providers.views
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Curtis Castrapel <ccastrapel@netflix.com> .. moduleauthor:: Curtis Castrapel <ccastrapel@netflix.com>
""" """
@ -118,7 +118,7 @@ class DnsProvidersList(AuthenticatedResource):
"type": "str", "type": "str",
"required": true, "required": true,
"helpMessage": "Cloudflare Email", "helpMessage": "Cloudflare Email",
"value": "test@netflix.com" "value": "test@example.com"
}, },
{ {
"name": "key", "name": "key",

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.domains.models .. module: lemur.domains.models
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.domains.schemas .. module: lemur.domains.schemas
:platform: unix :platform: unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.domains.service .. module: lemur.domains.service
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.domains.views .. module: lemur.domains.views
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.endpoints.cli .. module: lemur.endpoints.cli
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -2,7 +2,7 @@
.. module: lemur.endpoints.models .. module: lemur.endpoints.models
:platform: unix :platform: unix
:synopsis: This module contains all of the models need to create an authority within Lemur. :synopsis: This module contains all of the models need to create an authority within Lemur.
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.endpoints.schemas .. module: lemur.endpoints.schemas
:platform: unix :platform: unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -3,7 +3,7 @@
:platform: Unix :platform: Unix
:synopsis: This module contains all of the services level functions used to :synopsis: This module contains all of the services level functions used to
administer endpoints in Lemur administer endpoints in Lemur
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.endpoints.views .. module: lemur.endpoints.views
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,6 +1,6 @@
""" """
.. module: lemur.exceptions .. module: lemur.exceptions
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
""" """
from flask import current_app from flask import current_app

View File

@ -1,6 +1,6 @@
""" """
.. module: lemur.extensions .. module: lemur.extensions
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
""" """
from flask_sqlalchemy import SQLAlchemy from flask_sqlalchemy import SQLAlchemy

View File

@ -4,7 +4,7 @@
:synopsis: This module contains all the needed functions to allow :synopsis: This module contains all the needed functions to allow
the factory app creation. the factory app creation.
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -2,7 +2,7 @@
.. module: lemur.logs.models .. module: lemur.logs.models
:platform: unix :platform: unix
:synopsis: This module contains all of the models related private key audit log. :synopsis: This module contains all of the models related private key audit log.
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.logs.schemas .. module: lemur.logs.schemas
:platform: unix :platform: unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -3,7 +3,7 @@
:platform: Unix :platform: Unix
:synopsis: This module contains all of the services level functions used to :synopsis: This module contains all of the services level functions used to
administer logs in Lemur administer logs in Lemur
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.logs.views .. module: lemur.logs.views
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,6 +1,6 @@
""" """
.. module: lemur.metrics .. module: lemur.metrics
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
""" """
from flask import current_app from flask import current_app

View File

@ -0,0 +1,62 @@
"""Adding endpoint tables
Revision ID: 29d8c8455c86
Revises: 3307381f3b88
Create Date: 2016-06-28 16:05:25.720213
"""
# revision identifiers, used by Alembic.
revision = '29d8c8455c86'
down_revision = '3307381f3b88'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('ciphers',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=128), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('policy',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=128), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('policies_ciphers',
sa.Column('cipher_id', sa.Integer(), nullable=True),
sa.Column('policy_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['cipher_id'], ['ciphers.id'], ),
sa.ForeignKeyConstraint(['policy_id'], ['policy.id'], )
)
op.create_index('policies_ciphers_ix', 'policies_ciphers', ['cipher_id', 'policy_id'], unique=False)
op.create_table('endpoints',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('owner', 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('type', sa.String(length=128), nullable=True),
sa.Column('active', sa.Boolean(), 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('policy_id', sa.Integer(), nullable=True),
sa.Column('certificate_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['certificate_id'], ['certificates.id'], ),
sa.ForeignKeyConstraint(['policy_id'], ['policy.id'], ),
sa.PrimaryKeyConstraint('id')
)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_table('endpoints')
op.drop_index('policies_ciphers_ix', table_name='policies_ciphers')
op.drop_table('policies_ciphers')
op.drop_table('policy')
op.drop_table('ciphers')
### end Alembic commands ###

View File

@ -4,7 +4,7 @@
:synopsis: This module contains all of the associative tables :synopsis: This module contains all of the associative tables
that help define the many to many relationships established in Lemur that help define the many to many relationships established in Lemur
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.notifications.cli .. module: lemur.notifications.cli
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -2,7 +2,7 @@
.. module: lemur.notifications.messaging .. module: lemur.notifications.messaging
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.notifications.models .. module: lemur.notifications.models
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.notifications.schemas .. module: lemur.notifications.schemas
:platform: unix :platform: unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -2,7 +2,7 @@
.. module: lemur.notifications.service .. module: lemur.notifications.service
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -2,7 +2,7 @@
.. module: lemur.notifications.views .. module: lemur.notifications.views
:platform: Unix :platform: Unix
:synopsis: This module contains all of the accounts view code. :synopsis: This module contains all of the accounts view code.
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -14,11 +14,6 @@ from lemur.users import service as user_service
manager = Manager(usage="Handles pending certificate related tasks.") manager = Manager(usage="Handles pending certificate related tasks.")
# Need to call this multiple times and store status of the cert in DB. If it is being worked on by a worker, and which
# worker.
# Then open up an arbitrary number of copies of this? every minute??
# Or instead how about you send in a list of all pending certificates, make all the dns changes at once, then loop
# through and wait for each one to complete?
@manager.option('-i', dest='ids', action='append', help='IDs of pending certificates to fetch') @manager.option('-i', dest='ids', action='append', help='IDs of pending certificates to fetch')
def fetch(ids): def fetch(ids):
""" """

View File

@ -1,6 +1,6 @@
""" """
.. module: lemur.pending_certificates.models .. module: lemur.pending_certificates.models
Copyright (c) 2017 and onwards Instart Logic, Inc. All rights reserved. Copyright (c) 2018 and onwards Netflix, Inc. All rights reserved.
.. moduleauthor:: James Chuong <jchuong@instartlogic.com> .. moduleauthor:: James Chuong <jchuong@instartlogic.com>
""" """
from datetime import datetime as dt from datetime import datetime as dt

View File

@ -1,6 +1,6 @@
""" """
.. module: lemur.pending_certificates.service .. module: lemur.pending_certificates.service
Copyright (c) 2017 and onwards Instart Logic, Inc. All rights reserved. Copyright (c) 2018 and onwards Netflix, Inc. All rights reserved.
.. moduleauthor:: James Chuong <jchuong@instartlogic.com> .. moduleauthor:: James Chuong <jchuong@instartlogic.com>
""" """
import arrow import arrow

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.base .. module: lemur.plugins.base
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,6 +1,6 @@
""" """
.. module: lemur.plugins.base.manager .. module: lemur.plugins.base.manager
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson (kglisson@netflix.com) .. moduleauthor:: Kevin Glisson (kglisson@netflix.com)

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.base.v1 .. module: lemur.plugins.base.v1
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.bases.destination .. module: lemur.plugins.bases.destination
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.bases.export .. module: lemur.plugins.bases.export
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.bases.issuer .. module: lemur.plugins.bases.issuer
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.bases.metric .. module: lemur.plugins.bases.metric
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.bases.notification .. module: lemur.plugins.bases.notification
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.bases.source .. module: lemur.plugins.bases.source
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,6 +1,10 @@
import time import time
import dns
import dns.exception import dns.exception
import dns.name
import dns.query
import dns.resolver
import dns.resolver import dns.resolver
from dyn.tm.errors import DynectCreateError from dyn.tm.errors import DynectCreateError
from dyn.tm.session import DynectSession from dyn.tm.session import DynectSession
@ -22,7 +26,7 @@ def _has_dns_propagated(name, token):
txt_records = [] txt_records = []
try: try:
dns_resolver = dns.resolver.Resolver() dns_resolver = dns.resolver.Resolver()
dns_resolver.nameservers = ['8.8.8.8'] dns_resolver.nameservers = [get_authoritative_nameserver(name)]
dns_response = dns_resolver.query(name, 'TXT') dns_response = dns_resolver.query(name, 'TXT')
for rdata in dns_response: for rdata in dns_response:
for txt_record in rdata.strings: for txt_record in rdata.strings:
@ -87,3 +91,42 @@ def delete_txt_record(change_id, account_number, domain, token):
current_app.logger.debug("Deleting TXT record name: {0}".format(fqdn)) current_app.logger.debug("Deleting TXT record name: {0}".format(fqdn))
txt_record.delete() txt_record.delete()
zone.publish() zone.publish()
def get_authoritative_nameserver(domain):
n = dns.name.from_text(domain)
depth = 2
default = dns.resolver.get_default_resolver()
nameserver = default.nameservers[0]
last = False
while not last:
s = n.split(depth)
last = s[0].to_unicode() == u'@'
sub = s[1]
query = dns.message.make_query(sub, dns.rdatatype.NS)
response = dns.query.udp(query, nameserver)
rcode = response.rcode()
if rcode != dns.rcode.NOERROR:
if rcode == dns.rcode.NXDOMAIN:
raise Exception('%s does not exist.' % sub)
else:
raise Exception('Error %s' % dns.rcode.to_text(rcode))
if len(response.authority) > 0:
rrset = response.authority[0]
else:
rrset = response.answer[0]
rr = rrset[0]
if rr.rdtype != dns.rdatatype.SOA:
authority = rr.target
nameserver = default.query(authority).rrset[0].to_text()
depth += 1
return nameserver

View File

@ -2,7 +2,7 @@
.. module: lemur.plugins.lemur_acme.plugin .. module: lemur.plugins.lemur_acme.plugin
:platform: Unix :platform: Unix
:synopsis: This module is responsible for communicating with an ACME CA. :synopsis: This module is responsible for communicating with an ACME CA.
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
Snippets from https://raw.githubusercontent.com/alex/letsencrypt-aws/master/letsencrypt-aws.py Snippets from https://raw.githubusercontent.com/alex/letsencrypt-aws/master/letsencrypt-aws.py

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.lemur_atlas.plugin .. module: lemur.plugins.lemur_atlas.plugin
:platform: Unix :platform: Unix
:copyright: (c) 2016 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -2,7 +2,7 @@
.. module: lemur.plugins.lemur_aws.iam .. module: lemur.plugins.lemur_aws.iam
:platform: Unix :platform: Unix
:synopsis: Contains helper functions for interactive with AWS IAM Apis. :synopsis: Contains helper functions for interactive with AWS IAM Apis.
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.lemur_aws.plugin .. module: lemur.plugins.lemur_aws.plugin
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
Terraform example to setup the destination bucket: Terraform example to setup the destination bucket:

View File

@ -2,7 +2,7 @@
.. module: lemur.plugins.lemur_aws.s3 .. module: lemur.plugins.lemur_aws.s3
:platform: Unix :platform: Unix
:synopsis: Contains helper functions for interactive with AWS S3 Apis. :synopsis: Contains helper functions for interactive with AWS S3 Apis.
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.lemur_aws.sts .. module: lemur.plugins.lemur_aws.sts
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -2,7 +2,7 @@
.. module: lemur.plugins.lemur_cfssl.plugin .. module: lemur.plugins.lemur_cfssl.plugin
:platform: Unix :platform: Unix
:synopsis: This module is responsible for communicating with the CFSSL private CA. :synopsis: This module is responsible for communicating with the CFSSL private CA.
:copyright: (c) 2016 by Thomson Reuters :copyright: (c) 2018 by Thomson Reuters
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Charles Hendrie <chad.hendrie@tr.com> .. moduleauthor:: Charles Hendrie <chad.hendrie@tr.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.lemur_cryptography.plugin .. module: lemur.plugins.lemur_cryptography.plugin
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.lemur_email.plugin .. module: lemur.plugins.lemur_email.plugin
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.lemur_java.plugin .. module: lemur.plugins.lemur_java.plugin
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.lemur_kubernetes.plugin .. module: lemur.plugins.lemur_kubernetes.plugin
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.lemur_openssl.plugin .. module: lemur.plugins.lemur_openssl.plugin
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -2,7 +2,7 @@
.. module: lemur.plugins.lemur_sftp.plugin .. module: lemur.plugins.lemur_sftp.plugin
:platform: Unix :platform: Unix
:synopsis: Allow the uploading of certificates to SFTP. :synopsis: Allow the uploading of certificates to SFTP.
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
Allow the uploading of certificates to SFTP. Allow the uploading of certificates to SFTP.

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.plugins.lemur_slack.plugin .. module: lemur.plugins.lemur_slack.plugin
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Harm Weites <harm@weites.com> .. moduleauthor:: Harm Weites <harm@weites.com>

View File

@ -2,7 +2,7 @@
.. module: lemur.plugins.lemur_verisign.plugin .. module: lemur.plugins.lemur_verisign.plugin
:platform: Unix :platform: Unix
:synopsis: This module is responsible for communicating with the VeriSign VICE 2.0 API. :synopsis: This module is responsible for communicating with the VeriSign VICE 2.0 API.
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -1,7 +1,7 @@
""" """
.. module: service .. module: service
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -2,7 +2,7 @@
.. module: lemur.plugins.utils .. module: lemur.plugins.utils
:platform: Unix :platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>

View File

@ -2,7 +2,7 @@
.. module: lemur.plugins.views .. module: lemur.plugins.views
:platform: Unix :platform: Unix
:synopsis: This module contains all of the accounts view code. :synopsis: This module contains all of the accounts view code.
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -1,7 +1,7 @@
""" """
.. module: lemur.policies.cli .. module: lemur.policies.cli
:platform: Unix :platform: Unix
:copyright: (c) 2017 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

View File

@ -2,7 +2,7 @@
.. module: lemur.policies.models .. module: lemur.policies.models
:platform: unix :platform: unix
:synopsis: This module contains all of the models need to create a certificate policy within Lemur. :synopsis: This module contains all of the models need to create a certificate policy within Lemur.
:copyright: (c) 2017 by Netflix Inc., see AUTHORS for more :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details. :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> .. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
""" """

Some files were not shown because too many files have changed in this diff Show More