Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect ssl setup with ip address #301

Closed
kirrg001 opened this issue Jul 6, 2017 · 3 comments · Fixed by #553
Closed

Detect ssl setup with ip address #301

kirrg001 opened this issue Jul 6, 2017 · 3 comments · Fixed by #553
Assignees
Milestone

Comments

@kirrg001
Copy link
Contributor

kirrg001 commented Jul 6, 2017

If you install Ghost and you configure an ip address instead of a domain, you will get an error when running ghost setup ssl:

A ProcessError occured.

Error occurred running command: '/bin/sh -c /home/kate/ghost-kate/system/acme.sh --issue --domain 207.154.219.31 --webroot /home/kate/ghost-kate/system/nginx-root --accountemail kate@ghost.org --key-file /home/kate/ghost-kate/system/letsencrypt/privkey.pem --fullchain-file /home/kate/ghost-kate/system/letsencrypt/fullchain.pem'

Ghost-CLI log contains:

touch: cannot touch '/home/kate/.acme.sh/account.conf': No such file or directory
grep: /home/kate/.acme.sh/account.conf: No such file or directory
grep: /home/kate/.acme.sh/account.conf: No such file or directory
/home/kate/ghost-kate/system/acme.sh: 1816: /home/kate/ghost-kate/system/acme.sh: cannot create /home/kate/.acme.sh/account.conf: Directory nonexistent
grep: /home/kate/.acme.sh/account.conf: No such file or directory
[Thu Jul  6 19:19:11 UTC 2017] new-authz error: {"type":"urn:acme:error:malformed","detail":"Error creating new authz :: Issuance for IP addresses not supported","status": 400}
[Thu Jul  6 19:19:11 UTC 2017] Please add '--debug' or '--log' to check more details.
[Thu Jul  6 19:19:11 UTC 2017] See: https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh

We have to improve the error detection here. Simply checking if the url is an ip address would be helpful, because the error here looks not very clear.

e.g. touch: cannot touch '/home/kate/.acme.sh/account.conf': No such file or directory

SSL won't work with ip addresses.

@acburdine
Copy link
Member

What needs to happen here is before ssl generation even is tried, the URL needs to be checked and generation skipped if it's an IP rather than a domain name.

@acburdine acburdine self-assigned this Jul 6, 2017
@cobbspur
Copy link
Member

cobbspur commented Jul 7, 2017

Adding this from the discussion in slack.

If a user sets up ssl but previously entered non secure protocol as their url we should update the url in config. Conversely if the user added secure protocol then skips ssl we could downgrade the url to http. The only question is whether or not we don't to do the latter as it is possible a user can setup their own certificate? @ErisDS ?

@sebgie
Copy link
Contributor

sebgie commented Jul 11, 2017

We are combining 2 different issues here:

  • SSL with IP address

From https://community.letsencrypt.org/t/certificate-for-public-ip-without-domain-name/6082/5:

I think the current Baseline Requirements norm is not to issue certificates for private (RFC 1918-reserved) IP addresses, while certificates for public IP addresses are still permitted. However, Let's Encrypt has decided not to issue certificates for bare IP addresses even if this would be permitted by the Baseline Requirements.

  • Ghost SSL config

Is it okay to open a new issue for that, @cobbspur? Ghost supports multiple modes when SSL is available (force SSL for everything, force SSL for admin only, ...) and I'm not sure if we will pick the correct mode automatically?

@acburdine acburdine modified the milestones: 1.0.1, 1.1.0 Jul 23, 2017
acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Nov 23, 2017
closes TryGhost#301
- detect if the url is an IP address and skip if it is
acburdine added a commit that referenced this issue Nov 23, 2017
closes #301
- detect if the url is an IP address and skip if it is
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants