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 support for SVCB and HTTPS records #1176

Merged
merged 8 commits into from
Jun 7, 2024

Conversation

pieterlexis-tomtom
Copy link
Contributor

These records are defined in RFC 9460 and are used for "Service Binding" and provide clients with all connection information for network services.

Modern browsers already query for these records and several larger websites have adopted usage of HTTPS records already.

I have added a few XXX comments that indicate some questions I had regarding the internal data structure.
But by-and-large, parsing and generating these records works well.

These records are defined in [RFC 9460](https://datatracker.ietf.org/doc/html/rfc9460)
and are used for "Service Binding" and provide clients with all
connection information for network services.

Modern browsers already query for these records and several larger
websites have [adopted usage of HTTPS
records](https://blog.apnic.net/2023/12/18/use-of-https-resource-records/)
already.
@ross
Copy link
Contributor

ross commented May 30, 2024

Will probably take me a couple days to read up on the new record types and develop an opinion on them.

Looks like the dig on OSX is not new enough for the types, but you can use a dockerized version:

coho:~ ross$ docker run --rm -ti toolbelt/dig +short https google.com.
1 . alpn="h2,h3"
coho:~ ross$ docker run --rm -ti toolbelt/dig +short https cloudflare.com.
1 . alpn="h3,h2" ipv4hint=104.16.132.229,104.16.133.229 ipv6hint=2606:4700::6810:84e5,2606:4700::6810:85e5
coho:~ ross$ docker run --rm -ti toolbelt/dig +short https facebook.com.
coho:~ ross$

Seems to be about 50/50 for the big "name brand" sites I've tested.

Once I'm caught up I'll take a look at the code/XXXs

Copy link
Contributor

@ross ross left a comment

Choose a reason for hiding this comment

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

Overall solid & thorough PR. Made a pass through answering the XXX bits and a couple other minor things.

Thanks.

octodns/record/svcb.py Outdated Show resolved Hide resolved
octodns/record/svcb.py Outdated Show resolved Hide resolved
octodns/record/svcb.py Show resolved Hide resolved
tests/zones/unit.tests.tst Show resolved Hide resolved
@pieterlexis-tomtom
Copy link
Contributor Author

I think this is ready for review

octodns/record/svcb.py Outdated Show resolved Hide resolved
@ross
Copy link
Contributor

ross commented Jun 6, 2024

Interesting, guess that wasn't enough. I'll poke around and see what I can find:

Screenshot 2024-06-06 at 3 33 55 PM

@ross
Copy link
Contributor

ross commented Jun 6, 2024

Pushed a slight reworking to get rid of the continue and instead use an else which afaict is logically equivilent and maybe a little more readable. Will hold off merging this until @pieterlexis-tomtom gets a change to 👀 and give a 👍, but I think it's good to go now.

if len(paramvalue) != 0:
params[paramkey] = paramvalue[0]
parse_rdata_text = SUPPORTED_PARAMS.get(paramkey, {}).get(
'parse_rdata_text', None
)
if parse_rdata_text is not None:
params[paramkey] = parse_rdata_text(paramvalue[0])
else:
params[paramkey] = None

@pieterlexis-tomtom
Copy link
Contributor Author

Pushed a slight reworking to get rid of the continue and instead use an else which afaict is logically equivilent and maybe a little more readable. Will hold off merging this until @pieterlexis-tomtom gets a change to 👀 and give a 👍, but I think it's good to go now.

LGTM!

@ross ross merged commit 3455a7a into octodns:main Jun 7, 2024
7 checks passed
@ross
Copy link
Contributor

ross commented Jun 7, 2024

Thanks

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