TXT record data length limit is too short

Bug #1595265 reported by Paul Glass
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Low
Emanuel Andrecut

Bug Description

A similar bug is reported here as "fixed" https://bugs.launchpad.net/designate/+bug/1474012. The limit on TXT data is now 255 bytes, which is too short for certain use cases. Designate should support creation of TXT records with data much longer than 255 bytes.

Revision history for this message
Kiall Mac Innes (kiall) wrote :
Download full text (3.4 KiB)

Some notes on this:

 <mugsie> #topic bug triage
 * openstack has changed topic for #openstack-meeting-alt to: "bug triage (Meeting topic: Designate)"
 <timsim> https://bugs.launchpad.net/designate/+bug/1595265
 <openstack> Launchpad bug 1595265 in Designate "TXT record data length limit is too short" [Undecided,New]
 <Kiall> I think we already have a bug for that
 <mugsie> its closed
 <Kiall> No, a diff one
 <Kiall> 1 sec
 <mugsie> oh
 --> sdake_ (~sdake@fedora/sdake) has joined #openstack-meeting-alt
 --> tango (~tonanhngo@232.sub-72-104-180.myvzw.com) has joined #openstack-meeting-alt
 <Kiall> https://bugs.launchpad.net/designate/+bug/1474012 is closed alright
 <openstack> Launchpad bug 1474012 in Designate "Incorrect length limit for TXT record data" [Medium,Fix committed] - Assigned to Federico Ceratto (federico-ceratto)
 <mugsie> I think this is more of a feature req ?
 <-- Sukhdev (~<email address hidden>) has quit (Quit: My Mac has gone to sleep. ZZZzzz…)
 <federico3> since quite a while
 <Kiall> So - I think it's a rather large change to make it work with longer than 255 chars
 <mugsie> yeah
 <timsim> Kiall: We don't use a varchar(255) col for it
 <Kiall> Technically, we support only single part TXT recrods, where each part is at most 255 charas
 <mugsie> as it will change who it is stored, and how we conncatinate it in mdns
 <Kiall> anything more needs to be split in the DNS wire format response... but.. where do we split?
 <-- sdake (~sdake@fedora/sdake) has quit (Ping timeout: 246 seconds)
 <Kiall> i.e. TXT is defined as an array of strings, each up to 255 chars long.
 <Kiall> we don't have it modeled as an array
 <timsim> So we'd have to split it every 255 into multiple records?
 <timsim> oh i see
 <mugsie> I dont think we can target this to a particular relase anyway
 <Kiall> Not multiple records, just in the TXT's rdata
 <mugsie> we can mark it as low ?
 <mugsie> and if someone has cycles, propose a spec to show how we can fix it?
 <Kiall> i.e. foo.com. IN TXT "255 chars" "255 chars" "255 chars"
 <timsim> pglass what was the thing that made us run into this?
 --> sarob (~<email address hidden>) has joined #openstack-meeting-alt
 --> cleong (~corey@97-100-220-44.res.bhn.net) has joined #openstack-meeting-alt
 <pglass> uhh, it's not big enough for spf records or something
 <Kiall> <sidenote>Use SPF inclides</sidenote>
 <Kiall> includes*
 <Kiall> We *may* be able to hard split on 255, or split on word boundaries, or something.. but I've no clue how valid that is
 <-- tango (~tonanhngo@232.sub-72-104-180.myvzw.com) has quit (Ping timeout: 250 seconds)
 <mugsie> Kiall: can you dump ^ into the bug?
 <-- sarob (~<email address hidden>) has quit (Remote host closed the connection)
 <mugsie> and say we will want a spec for any fix
 <Kiall> <sidenode> SPF includes look like this.... _spf.google.com. 295 IN TXT "v=spf1 include:_netblocks.google.com include:_netblocks2.google.com include:_netblocks3.google.com ~all"</sidenote>
 <-- shaohe_feng (shaohe_fen@nat/intel/x-ygbwirwmlwnwrhsi) has quit (Remote host closed the connection)
 --> sarob (~sarob@m...

Read more...

Tim Simmons (timsim)
Changed in designate:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Dmitry Galkin (galkindmitrii) wrote :
Download full text (7.4 KiB)

Hi All,

I've wrote a patch to address this issue and it allows to create TXT records that are longer than 255 chars. But there is a question below that, perhaps, somebody can answer.

[root@aio1-utility-container-10fda1d7 ~]# openstack recordset show 50bb30dd-5c84-42fc-b2e7-fc37a198ccfd aeb5681d-edca-4f30-8aec-47c3f35adbc0
+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| action | NONE |
| created_at | 2017-12-15T10:17:13.000000 |
| description | test |
| id | aeb5681d-edca-4f30-8aec-47c3f35adbc0 |
| name | test7.openstack.tech. |
| project_id | b8a1e1371d22406cb89afd936cb20d0e |
| records | bbbbbbbbbbbb...

Read more...

Revision history for this message
Graham Hayes (grahamhayes) wrote :

The problem is that for long txt records, it is actually a list of strings, each under 255.

We would need to split the string then send that to eventlet's DNS sub system

Revision history for this message
Chris Clonch (cacack) wrote :

Sorry to dig up an old bug, but I think I'm being blocked by this. I have a TXT record (DKIM) which uses a longer key length and the resulting record is 408 characters. Seems the limit is still 255 chars... https://opendev.org/openstack/designate/src/branch/master/designate/objects/rrdata_txt.py#L29

Revision history for this message
Olaf Seibert (oseibert-sys11) wrote :

Ping! This is still a problem.

Changed in designate:
assignee: nobody → Emanuel Andrecut (andrecutm)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/designate/+/814730

Revision history for this message
Adrian Andreias (adrian-fleio) wrote :

Checked in our production and this fixed the issue https://review.opendev.org/c/openstack/designate/+/814730

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.opendev.org/c/openstack/designate/+/814730
Committed: https://opendev.org/openstack/designate/commit/03a5d5d74eb5de3f37b2e7ac5f28ae139ae436a5
Submitter: "Zuul (22348)"
Branch: master

commit 03a5d5d74eb5de3f37b2e7ac5f28ae139ae436a5
Author: Emanuel Andrecut <email address hidden>
Date: Wed Oct 20 11:48:18 2021 +0300

    Allow TXT record over 255 characters if split

    As defined in RFC1035 section 3.3.14 TXT-DATA
    can be one or more <character-strings>s.
    Before this commit Designate threw errors
    when saving TXT records that are split
    into multiple strings because validations on
    the field did not consider allowing this
    in a single DNS record as per RFC7208
    section 3.3.

    This patch allows longer TXT record data
    but only if it is split according to RFC
    definitions mentioned above. If data
    is made of more <character-string>s,
    each one is individually validated with
    the same validations as if the data was
    not split.

    Closes-Bug: 1595265
    Change-Id: I4e3e51b32ab01efc4202c297708eff5a2e2b4985
    Signed-off-by: Emanuel Andrecut (<email address hidden>)

Changed in designate:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/designate/+/818888

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/designate/+/818888
Committed: https://opendev.org/openstack/designate/commit/5e9cca1b02a8e115e0f4cb471b180427db4c3993
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 5e9cca1b02a8e115e0f4cb471b180427db4c3993
Author: Emanuel Andrecut <email address hidden>
Date: Wed Oct 20 11:48:18 2021 +0300

    Allow TXT record over 255 characters if split

    As defined in RFC1035 section 3.3.14 TXT-DATA
    can be one or more <character-strings>s.
    Before this commit Designate threw errors
    when saving TXT records that are split
    into multiple strings because validations on
    the field did not consider allowing this
    in a single DNS record as per RFC7208
    section 3.3.

    This patch allows longer TXT record data
    but only if it is split according to RFC
    definitions mentioned above. If data
    is made of more <character-string>s,
    each one is individually validated with
    the same validations as if the data was
    not split.

    Closes-Bug: 1595265
    Change-Id: I4e3e51b32ab01efc4202c297708eff5a2e2b4985
    Signed-off-by: Emanuel Andrecut (<email address hidden>)
    (cherry picked from commit 03a5d5d74eb5de3f37b2e7ac5f28ae139ae436a5)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/designate/+/830529

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/designate 14.0.0.0rc1

This issue was fixed in the openstack/designate 14.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/designate/+/830529
Committed: https://opendev.org/openstack/designate/commit/0323c4244929aaf199ecbb7c8d32138764029cc2
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 0323c4244929aaf199ecbb7c8d32138764029cc2
Author: Emanuel Andrecut <email address hidden>
Date: Wed Oct 20 11:48:18 2021 +0300

    Allow TXT record over 255 characters if split

    As defined in RFC1035 section 3.3.14 TXT-DATA
    can be one or more <character-strings>s.
    Before this commit Designate threw errors
    when saving TXT records that are split
    into multiple strings because validations on
    the field did not consider allowing this
    in a single DNS record as per RFC7208
    section 3.3.

    This patch allows longer TXT record data
    but only if it is split according to RFC
    definitions mentioned above. If data
    is made of more <character-string>s,
    each one is individually validated with
    the same validations as if the data was
    not split.

    Closes-Bug: 1595265
    Change-Id: I4e3e51b32ab01efc4202c297708eff5a2e2b4985
    Signed-off-by: Emanuel Andrecut (<email address hidden>)
    (cherry picked from commit 03a5d5d74eb5de3f37b2e7ac5f28ae139ae436a5)
    (cherry picked from commit 5e9cca1b02a8e115e0f4cb471b180427db4c3993)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/designate 13.0.1

This issue was fixed in the openstack/designate 13.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/designate 12.1.0

This issue was fixed in the openstack/designate 12.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.