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

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

Open
zeromind opened this issue Oct 24, 2022 · 0 comments
Open

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

zeromind opened this issue Oct 24, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@zeromind
Copy link
Collaborator

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

@zeromind zeromind added the bug Something isn't working label Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant