Bug 1937712 - Designate DNS – create TLD using valid Unicode string
Summary: Designate DNS – create TLD using valid Unicode string
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-designate
Version: 17.0 (Wallaby)
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: beta
: ---
Assignee: Nate Johnston
QA Contact: Toni Freger
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-11 12:02 UTC by Arkady Shtempler
Modified: 2023-08-01 14:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-01 14:38:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-15208 0 None None None 2022-05-12 15:52:20 UTC

Description Arkady Shtempler 2021-03-11 12:02:33 UTC
Scenario:
Try to create a new TLD using unicode string, for example: “例え”

Actual Result:
API fails with: 
Details: {'code': 400, 'type': 'invalid_object', 'message': 'Provided object is not valid. Got a ValueError error with message \u4f8b\u3048 is not an TLD', 'request_id': 'req-fa7cb43e-a6e9-41f2-b878-1ced6a853a2a'}

Expected Result:
Should  pass 

Notes:
1) There is an tempest patch could be used to reproduce the scenario:
https://review.opendev.org/c/openstack/designate-tempest-plugin/+/779558

2) Documentation: https://docs.openstack.org/api-ref/dns/?expanded=get-the-name-servers-for-a-zone-detail,list-all-recordsets-owned-by-project-detail,create-zone-detail,create-tld-detail#create-tld

Comment 1 Michael Johnson 2021-03-12 20:32:48 UTC
The designate API is inconsistently accepting multi-byte strings.

For example, the string above can be used for the TLD description, but not the TLD name even though it is a valid TLD.

The Designate objects are performing a regex on the input value here: https://opendev.org/openstack/designate/src/branch/master/designate/objects/fields.py#L293

With the regex here:
https://opendev.org/openstack/designate/src/branch/master/designate/objects/fields.py#L98

Making the assumption that the TLD will be ascii only.


Note You need to log in before you can comment on or make changes to this bug.