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

Gandi DNS inconsistency with CNAME pointing to '@' #20

Open
julianfoad opened this issue Jul 27, 2023 · 8 comments
Open

Gandi DNS inconsistency with CNAME pointing to '@' #20

julianfoad opened this issue Jul 27, 2023 · 8 comments

Comments

@julianfoad
Copy link

Gandi treats CNAME value '@' inconsistently. In DNS queries it's expanded, but in the API it's not.

In my Gandi DNS admin console I have some records like this:

pubsub 3600 IN CNAME @

In DNS queries, the '@' is expanded:

$ dig pubsub.example.net.
pubsub.example.net.		3575	IN	CNAME	example.net.

In Gandi's admin console, the "friendly" editor shows Your record will point to @.example.net.

This is inconsistent. Is the '@' supposed to be expanded or not? If so, the friendly editor display is wrong. If not, DNS queries are wrong.

Use of the '@' character is mentioned in RFC1035 - Domain Names - Implementation and Specification but this usage seems not sufficiently specified there.

OctoDNS error with Gandi DNS API: Exception when CNAME points to '@'

OctoDNS with its octodns-gandi module throws an exception when reading it:

$ octodns-dump --config-file=config/production.yaml --output-dir=tmp/ example.net. gandi
INFO  Manager __init__: config_file=config/production.yaml (octoDNS 0.9.21)
INFO  Manager __init__: provider=gandi (octodns_gandi 0.0.1)
...
octodns.record.ValidationError: Invalid record pubsub.example.net.
  - CNAME value "@.example.net." is not a valid FQDN

Should either Gandi's API or octodns-gandi expand the '@' in this case, I wonder? Or should this record have been disallowed in the first place?


[ This report is also posted on my blog: https://wrily.foad.me.uk/gandi-dns-inconsistency-with-cname-pointing-to-at ]

@ross
Copy link
Contributor

ross commented Jul 27, 2023

Interesting. I haven't run across that usage of @ before. Definitely seen it in some providers to mean the APEX, e.g. domain=foo.com., name=@ means fqdn=foo.com.. My (quick) skim of the RFC makes me think it's referring to that case, but I could see it including including referring to the APEX as well.

I just tried using @ in a couple other providers I have easy access too:

Azure doesn't allow it:

Screen Shot 2023-07-27 at 8 22 11 AM

NS1 does:

Screen Shot 2023-07-27 at 8 23 23 AM

Since octoDNS disallows @ for names, https://github.com/octodns/octodns/blob/7b2a1d44296ce66e347ad81e4cce54fbc55c1230/octodns/record/base.py#L72-L73, preferring '', I'd lean towards disallowing it for values with a similar error message as well, preferring the target fqdn.

We could fairly easily translate them in both cases if others feel that's preferable, /cc @octodns/review for thoughts?

@julianfoad
Copy link
Author

I filed an issue with Gandi. I'll report here when I get a case reference or reply. Seems to involve inconsistency on their side; not sure which parts of the behaviour should be deemed erroneous. Recommend waiting to see what they say before deciding anything.

@ross
Copy link
Contributor

ross commented Jul 27, 2023

I suspect they'll say it works as expected using, though testing NS1, which allows the value, further it returns a literal @:

coho:octodns ross$ dig +short apex.exxampled.com. @dns4.p07.nsone.net
\@.

So that's definitely inconsistent behavior and with that we have one that translates, one that doesn't allow it, and one that returns the literal value. Pretty strongly leaning towards octoDNS's best path forward to be disallowing @ as a value, either just leaving things as-is and erroring out, or potentially with an improved error message that recommends replacing the @ with the FQDN.

@julianfoad
Copy link
Author

Gandi case reference api-ote #16389785 .

@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 27, 2023
@julianfoad
Copy link
Author

Nothing heard from Gandi so far. Nothing's changed yet, as far as I know, although I haven't tested it again recently.

@github-actions github-actions bot removed the Stale label Oct 29, 2023
Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jan 28, 2024
@julianfoad
Copy link
Author

Still open.

@yzguy yzguy removed the Stale label Feb 19, 2024
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

No branches or pull requests

3 participants