Added subdomain dns check for domain verification.#50
Conversation
aabebcf to
3755c69
Compare
|
Why was it decided to verify the Requiring issuers to prove their ability to add Note that verifying against the main domain name requires checking all This also has the advantage of discoverability, as users can query for |
|
It would be awesome if this used @TheBlueMatt's With the current HTTP-based verification method, we basically tell users that we looked and found the verification file at some point in the past, but can't prove it to them. The user has to take our word for it, or issue an HTTP request to check themselves - which requires costly IO (esp if you're looking to verify the registry in bulk), has privacy implications (your DNS provider and network observers can tell which assets you're interested in, which likely means you have them in your wallet) and may fail due to some temporary connection error or because the file was since removed. If it does fail, the user can't tell if we lied or if something changed since. And even if they can somehow tell we lied, they wouldn't be able to prove it. With Edit: also, |
|
Some other alternatives for the DNS address to use for the TXT records:
|
|
I liked the fixed subdomain approach. I considered putting the TXT records on the main domain but I didn't want to interfere with any existing TXT records infrastructure an issuer may have already set up. I also think discoverability of assets for a particular domain is desirable over downloading and searching the index.json file from asset_registry_db. I'll also look more into the dnssec-prover you mentioned because it sounds like there would be a lot of upside for issuers if implemented. Edit: I added a description to this pull request to give the motivation behind this change |
|
Thanks for better explaining the motivation. So basically that issuers don't have to manage a webserver in addition to the DNS they must already manage either way. Makes sense. I suggest we use a a more compact verification string for the TXT record rather than the human-readable sentence we use for HTTP-based verification. And also include the ticker name in there. Perhaps something like It should be noted that the TXT record only verifies the linkage in one direction - that the domain owner verifiably agreed to associate their domain name to the specified asset id (and ticker if we add that). But it doesn't verify that the on-chain issuance associated itself with the domain name via the contract hash commitment. I think there's value in providing just that one-way verification (typically the trust anchor for the user is the domain name and not the asset id, so while it makes sense for an asset to try and impersonate itself as related to a domain, it doesn't really seem to make sense for a domain owner to impersonate an asset id), but we could theoretically do better if we wanted to - A two-way verification requires 3 more pieces of information: the The We can get the However getting the A simple solution is splitting the |
|
Multiple users have been asking for DNS-verification. I think the two-way verification is interesting but I don't want it to delay this PR. |
Agreed. Just wanted to share my thoughts and put this out there as an option, I wouldn't prioritize this either. (It's perhaps worth noting that other similar domain-based solutions like Lightning Address and TheBlueMatt's Human Readable Payment Instructions don't do two-way either. also, two-way is possible here, just not through the TXT records) So we just need to finalize the DNS address to use and the TXT record contents. Also |
|
Updated the PR but haven't been able to get the tests to run Edit: Working after updating packages with |
0e90c99 to
034c87c
Compare
4868488 to
cfc3be5
Compare
|
@shesek Anything else needed to get this PR in? |
c457916 to
490996b
Compare
|
@shesek ? |
There was a problem hiding this comment.
I'm not so sure about @TheBlueMatt's suggestion (I think it might've been tongue in cheek? like if you're not doing it the right way, you might as well..)
For me, using the standard DNS protocol is preferable over using Google's dns.google even if we're using Google's 8.8.8.8, as there's no vendor lock-in and we could freely and easily switch to another DNS server at any time.
If using Google's DNS servers isn't desirable, we could also use Resolver::from_system_conf(), which will use the DNS servers from /etc/resolve.conf (probably the datacenter's DNS?), or define any other DNS server we want.
Also, if we do end up deciding to use DNS, perhaps we could look into switching from trust_dns_resolver to hickory_resolver? The former mentions on its README that the latter is its continuation.
Oh huh, I just realized that this would actually also be Google, since this is hosted on GCP... |
No I don't think he was, considering the default that's used for hickory-dns (and trust-dns) is google and that the dependency list is already pretty bulky (with rust-bitcoin and rust-elements). The newer versions of hickory-dns had some kind of dependency conflict so trust-dns was used to avoid having to making any changes to dependency versions (which are already extremely out of date given that there hasn't been a commit in 2 years). |
490996b to
861cf53
Compare
|
Updated PR |
|
@shesek is there anything pending here before this can be merged? |
|
I'm still not convinced that avoiding an extra dependency is worth relying on a non-standard Google-only API. If it is decided to go with this approach, the implementation itself looks good to me. But there appears to be some unintentionally committed changes to |
|
Not mistaken, but reverted since #52 seems to do a more comprehensive update. |
We'd like to proceed with this implementation. |
We'd like to proceed with the implementation.
Currently domains are validated using a well-known uri located at
https://{domain}/.well-known/liquid-asset-issuer-proof-{asset_id}but this change aims to add an alternative verification method leveraging DNS TXT records. This would empower issuers to add proofs using their DNS provider and avoid the requirement of hosting at a particular domain.