You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by GitBox <gi...@apache.org> on 2020/05/31 16:58:43 UTC
[GitHub] [libcloud] doddo opened a new issue #1463: DNSProviders cannot handle Certification Authority Authorization (CAA) records
doddo opened a new issue #1463:
URL: https://github.com/apache/libcloud/issues/1463
## Summary
Libcloud DNSProviders cannot handle Certification Authority Authorization (CAA) records
## Detailed Information
First I manage a dns zone with CAA records in it.
Reproducer:
```python
#!/usr/bin/env python
from libcloud.dns.providers import get_driver as get_dns_driver
from libcloud.dns.types import Provider as DNSProvider
import os
cls = get_dns_driver(DNSProvider.GANDI_LIVE)
driver = cls(os.getenv('TOKEN'))
for zone in driver.list_zones():
for record in zone.list_records():
print(record)
```
Produces this issue:
```
./caa.py
Traceback (most recent call last):
File "./caa.py", line 12, in <module>
for record in zone.list_records():
File "/home/petter/caa/venv/lib/python3.8/site-packages/libcloud/dns/base.py", line 81, in list_records
return self.driver.list_records(zone=self)
File "/home/petter/caa/venv/lib/python3.8/site-packages/libcloud/dns/drivers/gandi_live.py", line 136, in list_records
return self._to_records(records.object, zone)
File "/home/petter/caa/venv/lib/python3.8/site-packages/libcloud/dns/drivers/gandi_live.py", line 434, in _to_records
records += self._to_record(r, zone)
File "/home/petter/caa/venv/lib/python3.8/site-packages/libcloud/dns/drivers/gandi_live.py", line 388, in _to_record
record = self._to_record_sub(data, zone, rrset_value)
File "/home/petter/caa/venv/lib/python3.8/site-packages/libcloud/dns/drivers/gandi_live.py", line 424, in _to_record_sub
type=self._string_to_record_type(data['rrset_type']),
File "/home/petter/caa/venv/lib/python3.8/site-packages/libcloud/dns/base.py", line 584, in _string_to_record_type
record_type = getattr(RecordType, string)
```
And indeed, CAA record is missing from `RecordType` class. I don't know how much more work it'd be to add support for this one, aside from adding it to the RecordType class. Anyhow creating a bug report seemed to be a prudent first step.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [libcloud] Kami closed issue #1463: DNSProviders cannot handle Certification Authority Authorization (CAA) records
Posted by GitBox <gi...@apache.org>.
Kami closed issue #1463:
URL: https://github.com/apache/libcloud/issues/1463
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [libcloud] Kami commented on issue #1463: DNSProviders cannot handle Certification Authority Authorization (CAA) records
Posted by GitBox <gi...@apache.org>.
Kami commented on issue #1463:
URL: https://github.com/apache/libcloud/issues/1463#issuecomment-636534630
Yeah, most likely just adding it to the base ``RecordType`` enum class + GANGI_LIVE (https://github.com/apache/libcloud/blob/trunk/libcloud/dns/drivers/gandi.py#L90) provider should do the trick.
But you might also need to utilize ``extra`` dictionary in case you want to manage all the tags (issue, issuewild, iodef).
For simplicity / ease of use, we should likely default ``tag`` to ``issue`` if only ``value`` is provided, but ``extra['tag']`` is not.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [libcloud] doddo commented on issue #1463: DNSProviders cannot handle Certification Authority Authorization (CAA) records
Posted by GitBox <gi...@apache.org>.
doddo commented on issue #1463:
URL: https://github.com/apache/libcloud/issues/1463#issuecomment-636974254
neat!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [libcloud] Kami commented on issue #1463: DNSProviders cannot handle Certification Authority Authorization (CAA) records
Posted by GitBox <gi...@apache.org>.
Kami commented on issue #1463:
URL: https://github.com/apache/libcloud/issues/1463#issuecomment-636902455
#1464 should do it.
I only tested and implemented it for the CloudFlare and Gandi Live driver.
Other drivers will likely also require some minor modifications to make them support CAA record type.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org