mirror of
https://github.com/google/nomulus.git
synced 2025-05-20 11:19:35 +02:00
Add more tests for RDAP contact data permissioning
This CL adds extra tests to make sure that contact data is hidden for RDAP domain and contact requests when not logged in as the proper registrar. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=168234733
This commit is contained in:
parent
4b83615513
commit
985d14b51f
11 changed files with 573 additions and 87 deletions
25
javatests/google/registry/rdap/testdata/rdap_associated_contact_no_personal_data.json
vendored
Normal file
25
javatests/google/registry/rdap/testdata/rdap_associated_contact_no_personal_data.json
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "%NAME%",
|
||||
"status" : ["active", "associated"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "https://example.com/rdap/entity/%NAME%",
|
||||
"rel" : "self",
|
||||
"href": "https://example.com/rdap/entity/%NAME%",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last update of RDAP database",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
}
|
||||
]
|
||||
}
|
34
javatests/google/registry/rdap/testdata/rdap_contact_no_personal_data_with_remark.json
vendored
Normal file
34
javatests/google/registry/rdap/testdata/rdap_contact_no_personal_data_with_remark.json
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "%NAME%",
|
||||
"status" : ["active"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "https://example.com/rdap/entity/%NAME%",
|
||||
"rel" : "self",
|
||||
"href": "https://example.com/rdap/entity/%NAME%",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last update of RDAP database",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"remarks": [
|
||||
{
|
||||
"title": "Contact Personal Data Hidden",
|
||||
"description": [
|
||||
"Contact personal data is visible only to the owning registrar."
|
||||
],
|
||||
"type": "object truncated due to unexplainable reasons"
|
||||
}
|
||||
]
|
||||
}
|
106
javatests/google/registry/rdap/testdata/rdap_domain_no_contacts.json
vendored
Normal file
106
javatests/google/registry/rdap/testdata/rdap_domain_no_contacts.json
vendored
Normal file
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
"status": [
|
||||
"client delete prohibited",
|
||||
"client renew prohibited",
|
||||
"client transfer prohibited",
|
||||
"server update prohibited"
|
||||
],
|
||||
"handle": "%HANDLE%",
|
||||
"links": [
|
||||
{
|
||||
"href": "https://example.com/rdap/domain/%NAME%",
|
||||
"type": "application/rdap+json",
|
||||
"rel": "self",
|
||||
"value": "https://example.com/rdap/domain/%NAME%"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "expiration",
|
||||
"eventDate": "2110-10-08T00:44:59.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last changed",
|
||||
"eventDate": "2009-05-29T20:13:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last update of RDAP database",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"nameservers": [
|
||||
{
|
||||
"status": [
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "8-ROID",
|
||||
"links": [
|
||||
{
|
||||
"href": "https://example.com/rdap/nameserver/ns1.cat.lol",
|
||||
"type": "application/rdap+json",
|
||||
"rel": "self",
|
||||
"value": "https://example.com/rdap/nameserver/ns1.cat.lol"
|
||||
}
|
||||
],
|
||||
"ldhName": "ns1.cat.lol",
|
||||
"ipAddresses": {
|
||||
"v4": [
|
||||
"1.2.3.4"
|
||||
]
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1999-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last update of RDAP database",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"objectClassName": "nameserver"
|
||||
},
|
||||
{
|
||||
"status": [
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "A-ROID",
|
||||
"links": [
|
||||
{
|
||||
"href": "https://example.com/rdap/nameserver/ns2.cat.lol",
|
||||
"type": "application/rdap+json",
|
||||
"rel": "self",
|
||||
"value": "https://example.com/rdap/nameserver/ns2.cat.lol"
|
||||
}
|
||||
],
|
||||
"ldhName": "ns2.cat.lol",
|
||||
"ipAddresses": {
|
||||
"v6": [
|
||||
"bad:f00d:cafe::15:beef"
|
||||
]
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1998-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last update of RDAP database",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"objectClassName": "nameserver"
|
||||
}
|
||||
],
|
||||
"ldhName": "%NAME%",
|
||||
"objectClassName": "domain"
|
||||
}
|
115
javatests/google/registry/rdap/testdata/rdap_domain_no_contacts_with_remark.json
vendored
Normal file
115
javatests/google/registry/rdap/testdata/rdap_domain_no_contacts_with_remark.json
vendored
Normal file
|
@ -0,0 +1,115 @@
|
|||
{
|
||||
"status": [
|
||||
"client delete prohibited",
|
||||
"client renew prohibited",
|
||||
"client transfer prohibited",
|
||||
"server update prohibited"
|
||||
],
|
||||
"handle": "%HANDLE%",
|
||||
"links": [
|
||||
{
|
||||
"href": "https://example.com/rdap/domain/%NAME%",
|
||||
"type": "application/rdap+json",
|
||||
"rel": "self",
|
||||
"value": "https://example.com/rdap/domain/%NAME%"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "expiration",
|
||||
"eventDate": "2110-10-08T00:44:59.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last changed",
|
||||
"eventDate": "2009-05-29T20:13:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last update of RDAP database",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"nameservers": [
|
||||
{
|
||||
"status": [
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "8-ROID",
|
||||
"links": [
|
||||
{
|
||||
"href": "https://example.com/rdap/nameserver/ns1.cat.lol",
|
||||
"type": "application/rdap+json",
|
||||
"rel": "self",
|
||||
"value": "https://example.com/rdap/nameserver/ns1.cat.lol"
|
||||
}
|
||||
],
|
||||
"ldhName": "ns1.cat.lol",
|
||||
"ipAddresses": {
|
||||
"v4": [
|
||||
"1.2.3.4"
|
||||
]
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1999-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last update of RDAP database",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"objectClassName": "nameserver"
|
||||
},
|
||||
{
|
||||
"status": [
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "A-ROID",
|
||||
"links": [
|
||||
{
|
||||
"href": "https://example.com/rdap/nameserver/ns2.cat.lol",
|
||||
"type": "application/rdap+json",
|
||||
"rel": "self",
|
||||
"value": "https://example.com/rdap/nameserver/ns2.cat.lol"
|
||||
}
|
||||
],
|
||||
"ldhName": "ns2.cat.lol",
|
||||
"ipAddresses": {
|
||||
"v6": [
|
||||
"bad:f00d:cafe::15:beef"
|
||||
]
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1998-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last update of RDAP database",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"objectClassName": "nameserver"
|
||||
}
|
||||
],
|
||||
"ldhName": "%NAME%",
|
||||
"objectClassName": "domain",
|
||||
"remarks": [
|
||||
{
|
||||
"title": "Contacts Hidden",
|
||||
"description": [
|
||||
"Domain contacts are visible only to the owning registrar."
|
||||
],
|
||||
"type": "object truncated due to unexplainable reasons"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue