Add NNS Challenge support #1
Labels
No labels
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/certificates#1
Loading…
Reference in a new issue
No description provided.
Delete branch "mbiryukova/certificates:feature/add_nns_challenge"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -393,3 +393,3 @@
chTypes = []acme.ChallengeType{acme.HTTP01, acme.TLSALPN01}
case acme.DNS:
chTypes = []acme.ChallengeType{acme.DNS01}
chTypes = []acme.ChallengeType{acme.DNS01, acme.NNS01}
why can't we add separate case
case acme.NNS:
cause we can add this type in acme/order.go
This is the type of identifier (domain) for which order is generated on the client side. DNS and NNS, as far as I know, have the same domain name structure, so it is impossible to distinguish them
@ -49,6 +49,7 @@ const (
TLSALPN01 ChallengeType = "tls-alpn-01"
// DEVICEATTEST01 is the device-attest-01 ACME challenge type
DEVICEATTEST01 ChallengeType = "device-attest-01"
NNS01 ChallengeType = "nns-01"
can you add a comment here?
@ -26,6 +26,7 @@ const (
TLS_ALPN_01 ACMEChallenge = "tls-alpn-01"
// DEVICE_ATTEST_01 is the device-attest-01 ACME challenge.
DEVICE_ATTEST_01 ACMEChallenge = "device-attest-01"
NNS_01 ACMEChallenge = "nns-01"
and comment here
4cbe9ebb66
to91f372b7b9
91f372b7b9
to4630fe2cf2
@ -503,0 +509,4 @@
nns := NNS{}
// TODO: retrieve NNS server URL from config
err := nns.Dial("http://localhost:30333")
There is an issue with
Dial
: it does not close connection. See TrueCloudLab/frostfs-sdk-go#69Let's modify
nns
package and add some sort of aClose()
method and call it there withdefer
.@ -503,0 +511,4 @@
// TODO: retrieve NNS server URL from config
err := nns.Dial("http://localhost:30333")
if err != nil {
panic(err)
Can we return error here instead of panic? Network might be unstable, so it is kinda "expected" error to process.
@ -47,0 +56,4 @@
golang.org/x/sync v0.3.0 // indirect
)
require (
Is it formatted by
go mod
command? Can we keep singlerequire
section?Also, commits from TrueCloudLab members usually include:
[#xxx]
wherexxx
is an issue number or PR number (1 in this case)git commit -s
), see https://docs.pi-hole.net/guides/github/how-to-signoff/4630fe2cf2
to6af99af9d3
6af99af9d3
to92a4884f2d
@ -0,0 +36,4 @@
invoker interface {
Call(contract util.Uint160, operation string, params ...any) (*result.Invoke, error)
}
I suggest to simplify code a little bit and drop
invoker
interface. We useclient
for all actions here: to init connection, to close it. MoveCall
method tomultiSchemeClient
interface, it will be much easier to read, I think.92a4884f2d
tof4dfed3bf3
It would be nice to describe NNS-01 challenge as it's done for DNS Challenge in RFC8555.