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

Updated to support latest Cloudflare Registrar responses #719

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tresni
Copy link
Contributor

@tresni tresni commented Oct 2, 2021

Description

It appears that the /registrar API has been through some improvements since this module was written. I want to support cloudflare as a registrar in dnscontrol but the existing code doesn't return nameservers and other data. The publicly documented API does not match response being returned from the API at this time.

e.g.

This is the accounts/[id]/registrar/domain output for a domain I currently control (I've censored the domain, but everything else is real)

{
    "errors": [],
    "messages": [],
    "result": {
        "administrator_contact_id": 526506,
        "auto_renew": true,
        "available": false,
        "billing_contact_id": 1081360,
        "can_register": false,
        "cloudflare_dns": false,
        "cloudflare_registration": true,
        "contacts": {
            "administrator_id": 526506,
            "billing_id": 1081360,
            "registrant_id": 249079,
            "technical_id": 803933
        },
        "contacts_updated_at": "2020-07-26T04:18:28Z",
        "created_at": "2018-09-10T05:16:19Z",
        "created_registrar": "Unknown (Verisign-sbscorp)",
        "current_registrar": "Cloudflare",
        "dns": [],
        "ds_records": [],
        "email_verified": true,
        "expires_at": "2022-09-10T05:16:19Z",
        "fees": {
            "icann_fee": 0.18,
            "redemption_fee": 40.0,
            "registration_fee": 9.77,
            "renewal_fee": 9.77,
            "transfer_fee": 9.77
        },
        "last_known_status": "registrationActive",
        "last_transferred_at": "2020-07-26T04:18:28Z",
        "locked": true,
        "name": "THISISNOTTHEREAL.COM",
        "name_servers": [
            "daisy.ns.cloudflare.com",
            "vin.ns.cloudflare.com"
        ],
        "payment_expires_at": "2022-09-10T05:16:19Z",
        "pending_transfer": false,
        "permissions": [
            "show_private_data",
            "modify_contacts",
            "renew",
            "transfer_out",
            "change_nameservers",
            "delete"
        ],
        "previous_registrar": "Internet Domain Service BS",
        "privacy": true,
        "registered_at": null,
        "registrant_contact_id": 249079,
        "registry_object_id": "######_DOMAIN_NET-VRSN",
        "registry_statuses": "clienttransferprohibited",
        "supported_tld": true,
        "technical_contact_id": 803933,
        "transfer_conditions": {
            "exists": true,
            "not_premium": true,
            "not_secure": true,
            "not_started": true,
            "not_waiting": true,
            "supported_tld": true
        },
        "updated_at": "2021-08-12T05:06:21Z",
        "updated_registrar": "Cloudflare",
        "using_created_registrar_nameservers": false,
        "using_current_registrar_nameservers": false,
        "using_previous_registrar_nameservers": false,
        "using_updated_registrar_nameservers": false,
        "whois": {
            "administrator": {
                "address": "DATA REDACTED",
                "city": "DATA REDACTED",
                "country": "US",
                "email": "https://domaincontact.cloudflareregistrar.com/THISISNOTTHEREAL.COM",
                "fax": "DATA REDACTED",
                "first_name": "DATA REDACTED",
                "last_name": "DATA REDACTED",
                "organization": "DATA REDACTED",
                "phone": "DATA REDACTED",
                "state": "ID",
                "zip": "DATA REDACTED"
            },
            "billing": {
                "address": "DATA REDACTED",
                "city": "DATA REDACTED",
                "country": "US",
                "email": "https://domaincontact.cloudflareregistrar.com/THISISNOTTHEREAL.COM",
                "fax": "DATA REDACTED",
                "first_name": "DATA REDACTED",
                "last_name": "DATA REDACTED",
                "organization": "DATA REDACTED",
                "phone": "DATA REDACTED",
                "state": "ID",
                "zip": "DATA REDACTED"
            },
            "privacy": true,
            "raw": "Domain name: THISISNOTTHEREAL.COM\nRegistry Domain ID: \nRegistrar WHOIS Server: whois.cloudflare.com\nRegistrar URL: https://www.cloudflare.com/\nUpdated Date: 2021-08-12T05:06:21Z\nCreation Date: 2018-09-10T05:16:19Z\nRegistrar Registration Expiration Date: 2022-09-10T05:16:19Z\nRegistrar: Cloudflare, Inc.\nRegistrar IANA ID: 1910\nRegistrar Abuse Contact Email: support@cloudflare.com\nRegistrar Abuse Contact Phone: +1-650-319-8936\nDomain Status: clienttransferprohibited (https://www.icann.org/epp#clienttransferprohibited)\nRegistry Registrant ID: \nRegistrant Name: DATA REDACTED DATA REDACTED\nRegistrant Organization: DATA REDACTED\nRegistrant Street: DATA REDACTED \nRegistrant City: DATA REDACTED\nRegistrant State/Province: ID\nRegistrant Postal Code: DATA REDACTED\nRegistrant Country: US\nRegistrant Phone: DATA REDACTED\nRegistrant Phone Ext: \nRegistrant Fax: DATA REDACTED\nRegistrant Fax Ext: \nRegistrant Email: https://domaincontact.cloudflareregistrar.com/THISISNOTTHEREAL.COM\nRegistry Admin ID: \nAdmin Name: DATA REDACTED DATA REDACTED\nAdmin Organization: DATA REDACTED\nAdmin Street: DATA REDACTED \nAdmin City: DATA REDACTED\nAdmin State/Province: ID\nAdmin Postal Code: DATA REDACTED\nAdmin Country: US\nAdmin Phone: DATA REDACTED\nAdmin Phone Ext: \nAdmin Fax: DATA REDACTED\nAdmin Fax Ext: \nAdmin Email: https://domaincontact.cloudflareregistrar.com/THISISNOTTHEREAL.COM\nRegistry Tech ID: \nTech Name: DATA REDACTED DATA REDACTED\nTech Organization: DATA REDACTED\nTech Street: DATA REDACTED \nTech City: DATA REDACTED\nTech State/Province: ID\nTech Postal Code: DATA REDACTED\nTech Country: US\nTech Phone: DATA REDACTED\nTech Phone Ext: \nTech Fax: DATA REDACTED\nTech Fax Ext: \nTech Email: https://domaincontact.cloudflareregistrar.com/THISISNOTTHEREAL.COM\nName Server: DAISY.NS.CLOUDFLARE.COM\nName Server: VIN.NS.CLOUDFLARE.COM\nDNSSEC: unsigned\nURL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/\n>>> Last update of WHOIS database: 2020-07-26T04:18:28Z <<<\n\nThe Data in Cloudflare's WHOIS database is provided by Cloudflare for\ninformation purposes, and to assist persons in obtaining information about or\nrelated to a domain name registration record.  Cloudflare does not guarantee\nits accuracy.  By submitting a WHOIS query, you agree that you will use this Data\nonly for lawful purposes and that, under no circumstances will you use this Data to:\n (1) allow, enable, or otherwise support the transmission of mass unsolicited,\n     commercial advertising or solicitations via e-mail (spam); or\n (2) enable high volume, automated, electronic processes that apply to\n     Cloudflare (or its systems).\nCloudflare reserves the right to modify these terms at any time.\nBy submitting this query, you agree to abide by this policy.",
            "registrant": {
                "address": "DATA REDACTED",
                "city": "DATA REDACTED",
                "country": "US",
                "email": "https://domaincontact.cloudflareregistrar.com/THISISNOTTHEREAL.COM",
                "fax": "DATA REDACTED",
                "first_name": "DATA REDACTED",
                "last_name": "DATA REDACTED",
                "organization": "DATA REDACTED",
                "phone": "DATA REDACTED",
                "state": "ID",
                "zip": "DATA REDACTED"
            },
            "technical": {
                "address": "DATA REDACTED",
                "city": "DATA REDACTED",
                "country": "US",
                "email": "https://domaincontact.cloudflareregistrar.com/THISISNOTTHEREAL.COM",
                "fax": "DATA REDACTED",
                "first_name": "DATA REDACTED",
                "last_name": "DATA REDACTED",
                "organization": "DATA REDACTED",
                "phone": "DATA REDACTED",
                "state": "ID",
                "zip": "DATA REDACTED"
            }
        }
    },
    "success": true
}

A bunch of things from the documented API are missing (e.g. registrant_contact, id, transfer_in) and a ton of new (and useful) fields have been added. So the existing documentation doesn't match the current implementation.

Has your change been tested?

I added new tests and have used this with my personal account. I was unable to test transfers as they are no longer documented on the API page and I don't have a domain to transfer in at the moment.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented (api.cloudflare.com or developers.cloudflare.com) and stable APIs.

Also adds registrar/contacts support since registrant_contact does not actually appear to be a thing anymore in the normal case.  I am not able to test on a transfer in as I don't have a domain to transfer in right now.
@jacobbednarz
Copy link
Member

Thanks but as mentioned in the PR template, we don't merge functionality here that isn't publicly documented in the API docs. That ensures we don't build functionality that isn't considered stable by the service teams.

Happy to leave this open, but won't merge until the service team update the documentation.

@tresni
Copy link
Contributor Author

tresni commented Oct 2, 2021

@jacobbednarz Totally understand, I'm somewhat hoping that this pushes someone to update the docs. The current docs don't match the current response data from the API and it's not directly backwards compatible due to the missing fields I mentioned.

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 16, 2022
@tresni
Copy link
Contributor Author

tresni commented May 8, 2022

Any chance the documentation will be updated anytime soon? This has now been at least 9 months since the documentation for your registrar endpoint stopped aligning with the output actually generated by your API.

@jacobbednarz
Copy link
Member

still no ETA on this. i've nudged the service team responsible for this endpoint on the ticket they already have tracking this.

@tresni
Copy link
Contributor Author

tresni commented Mar 3, 2023

Pinging now after 18 months since my PR was opened. The API documentation still does not match the actual API responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants