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

support DNS challenge for LE / ACME #120

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nbys
Copy link
Contributor

@nbys nbys commented Dec 12, 2021

For #110

@nbys nbys force-pushed the support_acme_dnschallenge branch 2 times, most recently from 89e695c to 2c59c94 Compare December 12, 2021 20:48
@nbys nbys force-pushed the support_acme_dnschallenge branch from c4f2766 to c103535 Compare January 9, 2022 16:07
@nbys nbys changed the title added dns challenge logic support DNS challenge for LE / ACME Jan 9, 2022
@nbys
Copy link
Contributor Author

nbys commented Jan 9, 2022

@umputun finally, I managed to obtain the certificates from LE. It is still a work in progress and not quite ready for review. But I would like to hear your opinion regarding this PR.
I separated the logic into two parts: 1) DNS challenge with LE and 2) creation of TXT records within DNS provider.
DNS challenge logic I implemented using the crypto/acme library as you proposed in the issue. It is working fine.
Currently, I have the implementation only for one provider - Cloudns. Unfortunately, we have to implement each provider separately. There is no library or smth that we can use. If a new provider is needed, it is only to implement of dnsprovider.Provider interface. Maybe the topic for Good First Issue(s)?
Would it be acceptable?

@umputun
Copy link
Owner

umputun commented Jan 17, 2022

here is no library or smth that we can use. If a new provider is needed, it is only to implement of dnsprovider.Provider interface. Maybe the topic for Good First Issue(s)? Would it be acceptable?

Yeah, I have expected smth like this, makes sense

@nbys nbys closed this Jan 20, 2022
@nbys nbys reopened this Jan 20, 2022
@nbys nbys force-pushed the support_acme_dnschallenge branch 4 times, most recently from 56ff477 to f3fd5dd Compare January 23, 2022 17:18
@nbys
Copy link
Contributor Author

nbys commented Jan 23, 2022

@umputun I implement tests for my code. I mock some dependencies. It is rather hard to mock others. For example, it is not feasible to test code that does nameservers DNS lookup with a mock. I am testing some methods using my account in Cloudns. It would be very nice if we had a test account for one of the DNS providers designated for reproxy. We could test the DNS challenge and certificates issue against the LetsEncrypt staging environment. Would these efforts make sense?

@nbys nbys force-pushed the support_acme_dnschallenge branch 2 times, most recently from 8c2e113 to 5f9eb33 Compare February 4, 2022 17:31
@nbys nbys marked this pull request as ready for review February 4, 2022 17:33
@nbys nbys requested a review from umputun as a code owner February 4, 2022 17:33
Copy link
Owner

@umputun umputun left a comment

Choose a reason for hiding this comment

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

Thx, impressive work!

I have not reviewed yet the core logic and implementation, had time for a quick look only.

app/main.go Outdated Show resolved Hide resolved
app/main.go Outdated Show resolved Hide resolved
app/acme/dnsprovider/cloudns.go Outdated Show resolved Hide resolved
@nbys nbys marked this pull request as draft February 6, 2022 20:53
@nbys nbys force-pushed the support_acme_dnschallenge branch 4 times, most recently from e5704b8 to 6a7f778 Compare February 8, 2022 19:19
@nbys nbys marked this pull request as ready for review February 10, 2022 09:14
// "github.com/stretchr/testify/assert"
// )

// var mockDNSResolver *mockdns.Server
Copy link
Contributor Author

@nbys nbys Feb 10, 2022

Choose a reason for hiding this comment

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

The library github.com/foxcpp/go-mockdns I use for mock a DNS Nameserver blows up the dependency list. I am not quite sure, is there a way to add this dependency for the tests but avoid in in go.sum for reproxy itself?

@nbys
Copy link
Contributor Author

nbys commented Feb 10, 2022

@umputun overall it is ready for your review. I have two DNS providers implemented: Route53 and ClouDNS. I tested it with both and it looks good to me.

@nbys nbys requested a review from umputun February 14, 2022 19:00
@nbys
Copy link
Contributor Author

nbys commented Feb 22, 2022

@umputun somehow this PR stuck in the status Changes requested. Is this still something that I should take care of?

@umputun
Copy link
Owner

umputun commented Feb 22, 2022

@nbys - sorry, missed this one. Will try to get to this soon

@umputun
Copy link
Owner

umputun commented May 14, 2023

I've been in the process of consolidating all the pending PRs for our next release, which is expected to be the final one before v1. I've gone ahead and rebased your branch with the latest master, and also tackled a few minor linter issues, primarily related to redundant Sprintf.

I hope you're still keen on making this happen. My plan is to wrap up the review today or tomorrow, but before I proceed, I wanted to check in and make sure you're still on board. I realize it's been quite a while, and I take full responsibility for the delay. However, as the saying goes, better late than never, right? ;)

Looking forward to hearing from you.

@nbys
Copy link
Contributor Author

nbys commented May 14, 2023

@umputun yes, I am still on board. But before you do review I'd like to take a look myself. So I will convert this PR to a draft and check if it still works after master was merged into it. of course if it is okay for you?

@nbys nbys marked this pull request as draft May 14, 2023 11:09
@umputun
Copy link
Owner

umputun commented May 14, 2023

sure, take yout time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants