Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Generate better self-signed certs #51

Merged
merged 3 commits into from
Jul 27, 2018
Merged

Generate better self-signed certs #51

merged 3 commits into from
Jul 27, 2018

Conversation

froboy
Copy link
Contributor

@froboy froboy commented Jul 9, 2018

As per https://security.stackexchange.com/a/166645.

To test:

  • pull into a box with ansible_https_enabled = true
  • vagrant reload --provision
  • open your site in a browser
  • observe the certificate has a SAN

screenshot_7_9_18__5_56_pm

- follow these instructions https://deliciousbrains.com/https-locally-without-browser-privacy-errors/#installing-certificate to locally trust the certificate - refresh the page and observe GREEN!

page_not_found___northcentral_technical_college

# The extentions to add to a self-signed cert
subjectKeyIdentifier = hash
basicConstraints = critical,CA:false
subjectAltName = DNS:{{ hostname }},DNS:www.{{ hostname }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this line include *.{{ hostname }}?

Also, should we pass the extra_hostnames array through to Ansible in the Vagrantfile, and include those here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if * would work, but that's definitely possible. I forgot about extra_hostnames... we might need to do some processing to prefix them all with DNS: but if you can do that easily that'd be awesome.

@becw becw merged commit 49b266d into develop Jul 27, 2018
@becw becw deleted the self-signed-san branch July 27, 2018 22:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants