mirror of
https://github.com/google/nomulus.git
synced 2025-08-05 09:21:49 +02:00
Disallow renaming of external hosts
EPP host spec section 3.2.5 requires that attempts to update hosts that are linked to different registrars must fail with error code 2305. This is complicated to do, as linked status is eventually consistent, and even more painful when checking links to those of different registrars. This change forbids external-to-anything renames entirely. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=150336754
This commit is contained in:
parent
e1c9395749
commit
443e260f91
23 changed files with 357 additions and 156 deletions
18
javatests/google/registry/flows/testdata/domain_create_fakesite_no_nameservers.xml
vendored
Normal file
18
javatests/google/registry/flows/testdata/domain_create_fakesite_no_nameservers.xml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>fakesite.example</domain:name>
|
||||
<domain:period unit="y">2</domain:period>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
19
javatests/google/registry/flows/testdata/domain_create_response_superordinate.xml
vendored
Normal file
19
javatests/google/registry/flows/testdata/domain_create_response_superordinate.xml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<response>
|
||||
<result code="1000">
|
||||
<msg>Command completed successfully</msg>
|
||||
</result>
|
||||
<resData>
|
||||
<domain:creData
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
<domain:crDate>2000-06-02T00:00:00.0Z</domain:crDate>
|
||||
<domain:exDate>2002-06-02T00:00:00.0Z</domain:exDate>
|
||||
</domain:creData>
|
||||
</resData>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
<svTRID>server-trid</svTRID>
|
||||
</trID>
|
||||
</response>
|
||||
</epp>
|
34
javatests/google/registry/flows/testdata/domain_info_response_fakesite_inactive.xml
vendored
Normal file
34
javatests/google/registry/flows/testdata/domain_info_response_fakesite_inactive.xml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<response>
|
||||
<result code="1000">
|
||||
<msg>Command completed successfully</msg>
|
||||
</result>
|
||||
<resData>
|
||||
<domain:infData
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>fakesite.example</domain:name>
|
||||
<domain:roid>%ROID%</domain:roid>
|
||||
<domain:status s="inactive"/>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:clID>NewRegistrar</domain:clID>
|
||||
<domain:crID>NewRegistrar</domain:crID>
|
||||
<domain:crDate>2000-06-01T00:04:00Z</domain:crDate>
|
||||
<domain:exDate>2002-06-01T00:04:00Z</domain:exDate>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:infData>
|
||||
</resData>
|
||||
<extension>
|
||||
<rgp:infData xmlns:rgp="urn:ietf:params:xml:ns:rgp-1.0">
|
||||
<rgp:rgpStatus s="addPeriod"/>
|
||||
</rgp:infData>
|
||||
</extension>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
<svTRID>server-trid</svTRID>
|
||||
</trID>
|
||||
</response>
|
||||
</epp>
|
|
@ -13,7 +13,7 @@
|
|||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns3.fakesite.example</domain:hostObj>
|
||||
<domain:hostObj>ns1.example.external</domain:hostObj>
|
||||
<domain:hostObj>ns2.example.external</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:host>ns3.fakesite.example</domain:host>
|
||||
|
|
13
javatests/google/registry/flows/testdata/host_create_example.xml
vendored
Normal file
13
javatests/google/registry/flows/testdata/host_create_example.xml
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<host:create xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>ns1.example.tld</host:name>
|
||||
<host:addr ip="v4">192.0.2.2</host:addr>
|
||||
<host:addr ip="v4">192.0.2.29</host:addr>
|
||||
<host:addr ip="v6">1080:0:0:0:8:800:200C:417A</host:addr>
|
||||
</host:create>
|
||||
</create>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
13
javatests/google/registry/flows/testdata/host_create_fakesite2.xml
vendored
Normal file
13
javatests/google/registry/flows/testdata/host_create_fakesite2.xml
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<host:create xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>ns4.fakesite.example</host:name>
|
||||
<host:addr ip="v4">192.0.2.3</host:addr>
|
||||
<host:addr ip="v4">192.0.2.30</host:addr>
|
||||
<host:addr ip="v6">1080:0:0:0:8:800:200C:417B</host:addr>
|
||||
</host:create>
|
||||
</create>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
17
javatests/google/registry/flows/testdata/host_create_response_example.xml
vendored
Normal file
17
javatests/google/registry/flows/testdata/host_create_response_example.xml
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<response>
|
||||
<result code="1000">
|
||||
<msg>Command completed successfully</msg>
|
||||
</result>
|
||||
<resData>
|
||||
<host:creData xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>ns1.example.tld</host:name>
|
||||
<host:crDate>2000-06-02T00:01:00Z</host:crDate>
|
||||
</host:creData>
|
||||
</resData>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
<svTRID>server-trid</svTRID>
|
||||
</trID>
|
||||
</response>
|
||||
</epp>
|
17
javatests/google/registry/flows/testdata/host_create_response_fakesite2.xml
vendored
Normal file
17
javatests/google/registry/flows/testdata/host_create_response_fakesite2.xml
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<response>
|
||||
<result code="1000">
|
||||
<msg>Command completed successfully</msg>
|
||||
</result>
|
||||
<resData>
|
||||
<host:creData xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>ns4.fakesite.example</host:name>
|
||||
<host:crDate>2000-06-09T00:01:00Z</host:crDate>
|
||||
</host:creData>
|
||||
</resData>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
<svTRID>server-trid</svTRID>
|
||||
</trID>
|
||||
</response>
|
||||
</epp>
|
|
@ -2,7 +2,7 @@
|
|||
<command>
|
||||
<info>
|
||||
<host:info xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>ns1.example.external</host:name>
|
||||
<host:name>ns4.fakesite.example</host:name>
|
||||
</host:info>
|
||||
</info>
|
||||
<clTRID>ABC-12345</clTRID>
|
|
@ -1,10 +0,0 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<info>
|
||||
<host:info xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>ns2.example.external</host:name>
|
||||
</host:info>
|
||||
</info>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
25
javatests/google/registry/flows/testdata/host_info_response_fakesite2.xml
vendored
Normal file
25
javatests/google/registry/flows/testdata/host_info_response_fakesite2.xml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<response>
|
||||
<result code="1000">
|
||||
<msg>Command completed successfully</msg>
|
||||
</result>
|
||||
<resData>
|
||||
<host:infData
|
||||
xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>ns4.fakesite.example</host:name>
|
||||
<host:roid>NS1_EXAMPLE1-REP</host:roid>
|
||||
<host:status s="ok"/>
|
||||
<host:addr ip="v4">192.0.2.30</host:addr>
|
||||
<host:addr ip="v4">192.0.2.3</host:addr>
|
||||
<host:addr ip="v6">1080::8:800:200c:417b</host:addr>
|
||||
<host:clID>NewRegistrar</host:clID>
|
||||
<host:crID>NewRegistrar</host:crID>
|
||||
<host:crDate>2000-06-09T00:01:00Z</host:crDate>
|
||||
</host:infData>
|
||||
</resData>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
<svTRID>server-trid</svTRID>
|
||||
</trID>
|
||||
</response>
|
||||
</epp>
|
25
javatests/google/registry/flows/testdata/host_info_response_fakesite_ok.xml
vendored
Normal file
25
javatests/google/registry/flows/testdata/host_info_response_fakesite_ok.xml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<response>
|
||||
<result code="1000">
|
||||
<msg>Command completed successfully</msg>
|
||||
</result>
|
||||
<resData>
|
||||
<host:infData
|
||||
xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>ns3.fakesite.example</host:name>
|
||||
<host:roid>NS1_EXAMPLE1-REP</host:roid>
|
||||
<host:status s="ok"/>
|
||||
<host:addr ip="v4">192.0.2.29</host:addr>
|
||||
<host:addr ip="v4">192.0.2.2</host:addr>
|
||||
<host:addr ip="v6">1080::8:800:200c:417a</host:addr>
|
||||
<host:clID>NewRegistrar</host:clID>
|
||||
<host:crID>NewRegistrar</host:crID>
|
||||
<host:crDate>2000-06-06T00:01:00Z</host:crDate>
|
||||
</host:infData>
|
||||
</resData>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
<svTRID>server-trid</svTRID>
|
||||
</trID>
|
||||
</response>
|
||||
</epp>
|
|
@ -9,13 +9,12 @@
|
|||
<host:name>ns3.fakesite.example</host:name>
|
||||
<host:roid>NS1_EXAMPLE1-REP</host:roid>
|
||||
<host:status s="ok"/>
|
||||
<host:status s="linked"/>
|
||||
<host:addr ip="v4">192.0.2.29</host:addr>
|
||||
<host:addr ip="v4">192.0.2.2</host:addr>
|
||||
<host:addr ip="v6">1080::8:800:200c:417a</host:addr>
|
||||
<host:clID>NewRegistrar</host:clID>
|
||||
<host:crID>NewRegistrar</host:crID>
|
||||
<host:crDate>2000-06-01T00:02:00.000Z</host:crDate>
|
||||
<host:crDate>2000-06-02T00:01:00Z</host:crDate>
|
||||
<host:upID>NewRegistrar</host:upID>
|
||||
<host:upDate>2002-05-30T01:01:00Z</host:upDate>
|
||||
</host:infData>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<response>
|
||||
<result code="2302">
|
||||
<msg>Object with given ID (ns2.example.external) already exists</msg>
|
||||
<msg>Object with given ID (ns4.fakesite.example) already exists</msg>
|
||||
</result>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
|
|
16
javatests/google/registry/flows/testdata/host_update_fakesite1_to_fakesite2.xml
vendored
Normal file
16
javatests/google/registry/flows/testdata/host_update_fakesite1_to_fakesite2.xml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<update>
|
||||
<host:update xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>ns3.fakesite.example</host:name>
|
||||
<host:add>
|
||||
<host:status s="clientUpdateProhibited"/>
|
||||
</host:add>
|
||||
<host:chg>
|
||||
<host:name>ns4.fakesite.example</host:name>
|
||||
</host:chg>
|
||||
</host:update>
|
||||
</update>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -2,12 +2,7 @@
|
|||
<command>
|
||||
<update>
|
||||
<host:update xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>ns1.example.external</host:name>
|
||||
<host:add>
|
||||
<host:addr ip="v4">192.0.2.2</host:addr>
|
||||
<host:addr ip="v4">192.0.2.29</host:addr>
|
||||
<host:addr ip="v6">1080:0:0:0:8:800:200C:417A</host:addr>
|
||||
</host:add>
|
||||
<host:name>ns1.example.tld</host:name>
|
||||
<host:rem/>
|
||||
<host:chg>
|
||||
<host:name>ns3.fakesite.example</host:name>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue