* Fixing email notification

* Adding endpoint expiration

* Fixing endpoint type for ELBs

* Allowing verisign to include additional SANs
This commit is contained in:
kevgliss
2016-12-08 15:52:27 -08:00
committed by GitHub
parent a4b32b0d31
commit 968dd52f6f
6 changed files with 44 additions and 5 deletions

View File

@ -147,7 +147,7 @@ class AWSSourcePlugin(SourcePlugin):
endpoint = dict(
name=e['LoadBalancerName'],
dnsname=e['DNSName'],
type='e',
type='elb',
port=listener['Listener']['LoadBalancerPort'],
certificate_name=iam.get_name_from_arn(listener['Listener']['SSLCertificateId'])
)

View File

@ -31,7 +31,7 @@ def render_html(template_name, message):
return template.render(dict(messages=message, hostname=current_app.config.get('LEMUR_HOSTNAME')))
def send_via_ses(subject, body, targets):
def send_via_smtp(subject, body, targets):
"""
Attempts to deliver email notification via SES service.
@ -46,7 +46,7 @@ def send_via_ses(subject, body, targets):
smtp_mail.send(msg)
def send_via_smtp(subject, body, targets):
def send_via_ses(subject, body, targets):
"""
Attempts to deliver email notification via SMTP.
:param subject:

View File

@ -94,6 +94,10 @@ def process_options(options):
'email': current_app.config.get("VERISIGN_EMAIL")
}
if options.get('extensions'):
if options['extensions'].get('sub_alt_names'):
data['subject_alt_names'] = ",".join(x['value'] for x in options['extensions']['sub_alt_names']['names'])
if options.get('validity_end'):
period = get_default_issuance(options)
data['specificEndDate'] = options['validity_end'].format("MM/DD/YYYY")