Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Error from DKIM1 TXT entry

Greetings,
      I am trying to setup a 2048 byte DKIM1 record for my GSuite domain, but when I go to put in the key into a TXT field, it errors out with:

Record data must be in the format "Hello world!"

I confirmed that the record has quotes around the text, just like I did with the SPF record, but this time for a XXX.domain record within the domain.    I then tried to do the same via Cloud Shell ...   The error from the Cloud Shell is:

gcloud dns --project=automated-style-367117 record-sets create google._domainkey.collegebus.org. --zone="collegebus" --type="TXT" --ttl="300" --rrdatas="v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtuLIKAF0Cs+27IuWjGBkZjhuv/24v3QrwC+3XtF+xRoemRH9v8F+eybxAFNREYv3DCX30VT1EGTnFQPhAWhV9YmprnvJJJ3zR8DgFFWzPo0deJdPrjc3Htj9fBoa+qWf/ic5B3olUjs6+BxPasuejFAum1Vz2YcURXR5WrvJEyY/ndLKVue5qH1Qh6qSbt2zk8DPI+rJcjVi5GrvcLpoJMJCgDTJ+hyY2Xf2qHZEmExEtzcYFydA/AXSpCDWTBGEK3a295JWsnYrWosQAJze5OGO6MrKDIq2qW7dUjvp/9YC/KIjyEjfRn3GjEIU4zuizef25OZfrmvfpLWuBFj+wQIDAQAB"
ERROR: (gcloud.dns.record-sets.create) HTTPError 400: Invalid value for 'entity.rrset.rrdata[0]': '"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtuLIKAF0Cs+27IuWjGBkZjhuv/24v3QrwC+3XtF+xRoemRH9v8F+eybxAFNREYv3DCX30VT1EGTnFQPhAWhV9YmprnvJJJ3zR8DgFFWzPo0deJdPrjc3Htj9fBoa+qWf/ic5B3olUjs6+BxPasuejFAum1Vz2YcURXR5WrvJEyY/ndLKVue5qH1Qh6qSbt2zk8DPI+rJcjVi5GrvcLpoJMJCgDTJ+hyY2Xf2qHZEmExEtzcYFydA/AXSpCDWTBGEK3a295JWsnYrWosQAJze5OGO6MrKDIq2qW7dUjvp/9YC/KIjyEjfRn3GjEIU4zuizef25OZfrmvfpLWuBFj+wQIDAQAB"'

I changed the key to a 1024 byte key and it works, so it would seem that the Cloud DNS service is unable to accept text large enough to support a 2048 byte DKIM1 key.    Anybody know how to file a bug report for failing to accept it?

Thank you,
Charles

Solved Solved
0 3 4,818
1 ACCEPTED SOLUTION

It may be that you are hitting a 255 character limit on the TXT record, as per:

https://cloud.google.com/dns/docs/records-overview#supported_dns_record_types

There is guidance around handling this situation on this article:

https://support.google.com/a/answer/11613097

Let me know if that helps 🙂

View solution in original post