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

Caddyfile adapter wraps localhost into automation policy for public names #4220

Closed
mholt opened this issue Jun 25, 2021 · 1 comment
Closed
Assignees
Labels
bug 🐞 Something isn't working
Milestone

Comments

@mholt
Copy link
Member

mholt commented Jun 25, 2021

This minimal Caddyfile:

{
	email foo@bar
}

localhost {
}

example.com {
}

yields automation policies in JSON:

[
  {
    "subjects": [
      "example.com",
      "localhost"
    ],
    "issuers": [
      {
        "email": "foo@bar",
        "module": "acme"
      },
      {
        "email": "foo@bar",
        "module": "zerossl"
      }
    ]
  }
]

which is clearly wrong, because localhost can't get a cert from Let's Encrypt or ZeroSSL (or any publicly-trusted CA).

Already have a fix incoming. Just making this issue for future reference.

(Edit: Looks like we have a test that is actually enforcing this behavior, global_options_preferred_chains.txt - but there's no way that's intentional, right?)

@mholt mholt added bug 🐞 Something isn't working in progress 🏃‍♂️ Being actively worked on labels Jun 25, 2021
@mholt mholt added this to the v2.4.4 milestone Jun 25, 2021
@mholt mholt self-assigned this Jun 25, 2021
@francislavoie
Copy link
Member

Yeah - that test is incorrect. 👍

@mholt mholt closed this as completed in b3d35a4 Jun 25, 2021
@mholt mholt removed the in progress 🏃‍♂️ Being actively worked on label Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants