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

Add provided certificate checking before LE certificate generation with OnHostRule option #1772

Merged

Conversation

nmengin
Copy link
Contributor

@nmengin nmengin commented Jun 19, 2017

During the code review of PR #1260, it appears that the provided certificates are not checked before LE certificate checking with the OnHostRule option.

Adding this check allows to generate a LE certificate only if domains have no provided certificates.

Thanks to it, PR #1260 will be modified to apply filter on domains to check by provided certificate in place of domains to ignore during LE certificate generation.

cc/ @CyrilPeponnet

Copy link
Member

@emilevauge emilevauge left a comment

Choose a reason for hiding this comment

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

Hey @nmengin !
Ideally, adding (integration) tests would be better on this, but overall, seems good :)

@nmengin
Copy link
Contributor Author

nmengin commented Jun 20, 2017

@emilevauge I am agree with you for the tests.
We discussed about it with @ldez .

We believe that it can be nice to upgrade the boulder image and create ACME tests into a new PR.
I'm going to propose a new PR about this subject ASAP.

"time"

"github.com/go-check/check"

"errors"

Copy link
Contributor

Choose a reason for hiding this comment

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

could you reformat imports?

@@ -9,6 +9,9 @@ import (
"testing"
"time"

"crypto/tls"
Copy link
Contributor

Choose a reason for hiding this comment

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

could you reformat imports?

)

// ACME test suites (using libcompose)
type AcmeSuite struct {
BaseSuite
onDemand bool
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's better to create a dedicated struct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The others tests use one struct for BaseSuite and all the arguments they need.
I used only one to be homogeneous, but I can changed it if it's really necessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

they provide data shared between test (from the setup), not for tests data.

@ldez ldez added this to the 1.3 milestone Jun 26, 2017
Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

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

Great Job 👍

LGTM

@nmengin nmengin force-pushed the fix_provided_certificates_checking_for_OnHostRule branch from 3cd5ec5 to 266fbd2 Compare June 26, 2017 10:18
Copy link
Contributor

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

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

Awesome work!

LGTM

:shipit:

Copy link
Member

@emilevauge emilevauge left a comment

Choose a reason for hiding this comment

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

@nmengin 👏 awesome job 😍
LGTM

@ldez ldez force-pushed the fix_provided_certificates_checking_for_OnHostRule branch from 266fbd2 to d986a1e Compare June 26, 2017 15:55
…ificate when OnHostRule is activated

- ADD TI to check the new behaviour with onHostRule and provided certificates
- ADD TU on the getProvidedCertificate method
@ldez ldez force-pushed the fix_provided_certificates_checking_for_OnHostRule branch from d986a1e to bdab298 Compare June 26, 2017 16:02
@ldez ldez merged commit 631079a into traefik:v1.3 Jun 26, 2017
@nmengin nmengin deleted the fix_provided_certificates_checking_for_OnHostRule branch June 27, 2017 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants