Skip to content

Can't delete CAA records that differ only in case #255

@zeromind

Description

@zeromind

It is currently noy possible to delete CAA resource records if there are multiple in DIM, that only differ in case.

$ ndcli delete rr example.com. caa 0 issue "foobar.com." -f -n
INFO - Dryrun mode, no data will be modified
ERROR - example.com. CAA 0 issue "foobar.com." is ambiguous

Root cause appears to be MariaDB, which does case-insensitive matches of values on selects.

Additionally, there is an API endpoint to delete records by ID, but there is no way to get the IDs via the API, as the endpoint for that also runs into the same issue.

pytest to reproduce:

def test_rr_delete_7(self):
        # delete CAA
        self.r.ipblock_create('12.0.0.0/8', status='Container')
        self.r.ippool_create('test')
        self.r.ippool_add_subnet('test', '12.0.0.0/24')
        self.r.zone_create('test.com')
        self.r.zone_create_view('test.com', 'other')
        self.r.rr_create(zone='test.com', name='@', views=['default'], type='CAA', caa_flags='0', property_tag='issue', property_value='foobar.com.')
        self.r.rr_create(zone='test.com', name='@', views=['default'], type='CAA', caa_flags='0', property_tag='issue', property_value='Foobar.com.')
        self.r.rr_delete(zone='test.com', name='@', views=['default'], type='CAA', caa_flags='0', property_tag='issue', property_value='Foobar.com.')

internal issue: ITOUDP-4349

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions