Avoid showing personal contact data in RDAP when not logged in

This CL changes the RDAP responses. When the requester asks for information about a domain, and is not logged in as the owning registrar, no contact information is shown. When the requester asks for information about a contact, and is not logged in as the owner registrar, the existence of the contact is shown, but not any personal data (the existence is shown to make things easier to test).

The login uses the same functionality as the registrar console.

For the most part, this CL does not include the necessary tests to make sure that data is not returned when not logged in. The CL is so large that I didn't want to burden it further. Those tests will be added in a follow-on CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168022034
This commit is contained in:
mountford 2017-09-08 11:24:21 -07:00 committed by jianglai
parent e892a2f0fe
commit c85dc0c089
23 changed files with 853 additions and 266 deletions

View file

@ -108,16 +108,16 @@
"active",
"associated"
],
"handle": "4-ROID",
"handle": "%CONTACT1ROID%",
"roles": [
"administrative"
],
"links": [
{
"href": "https://example.com/rdap/entity/4-ROID",
"href": "https://example.com/rdap/entity/%CONTACT1ROID%",
"type": "application/rdap+json",
"rel": "self",
"value": "https://example.com/rdap/entity/4-ROID"
"value": "https://example.com/rdap/entity/%CONTACT1ROID%"
}
],
"events": [
@ -201,16 +201,16 @@
"active",
"associated"
],
"handle": "6-ROID",
"handle": "%CONTACT2ROID%",
"roles": [
"technical"
],
"links": [
{
"href": "https://example.com/rdap/entity/6-ROID",
"href": "https://example.com/rdap/entity/%CONTACT2ROID%",
"type": "application/rdap+json",
"rel": "self",
"value": "https://example.com/rdap/entity/6-ROID"
"value": "https://example.com/rdap/entity/%CONTACT2ROID%"
}
],
"events": [
@ -294,16 +294,16 @@
"active",
"associated"
],
"handle": "2-ROID",
"handle": "%CONTACT3ROID%",
"roles": [
"registrant"
],
"links": [
{
"href": "https://example.com/rdap/entity/2-ROID",
"href": "https://example.com/rdap/entity/%CONTACT3ROID%",
"type": "application/rdap+json",
"rel": "self",
"value": "https://example.com/rdap/entity/2-ROID"
"value": "https://example.com/rdap/entity/%CONTACT3ROID%"
}
],
"events": [

View file

@ -109,16 +109,16 @@
"active",
"associated"
],
"handle": "4-ROID",
"handle": "%CONTACT1ROID%",
"roles": [
"administrative"
],
"links": [
{
"href": "https://example.com/rdap/entity/4-ROID",
"href": "https://example.com/rdap/entity/%CONTACT1ROID%",
"type": "application/rdap+json",
"rel": "self",
"value": "https://example.com/rdap/entity/4-ROID"
"value": "https://example.com/rdap/entity/%CONTACT1ROID%"
}
],
"events": [
@ -202,16 +202,16 @@
"active",
"associated"
],
"handle": "6-ROID",
"handle": "%CONTACT2ROID%",
"roles": [
"technical"
],
"links": [
{
"href": "https://example.com/rdap/entity/6-ROID",
"href": "https://example.com/rdap/entity/%CONTACT2ROID%",
"type": "application/rdap+json",
"rel": "self",
"value": "https://example.com/rdap/entity/6-ROID"
"value": "https://example.com/rdap/entity/%CONTACT2ROID%"
}
],
"events": [
@ -295,16 +295,16 @@
"active",
"associated"
],
"handle": "2-ROID",
"handle": "%CONTACT3ROID%",
"roles": [
"registrant"
],
"links": [
{
"href": "https://example.com/rdap/entity/2-ROID",
"href": "https://example.com/rdap/entity/%CONTACT3ROID%",
"type": "application/rdap+json",
"rel": "self",
"value": "https://example.com/rdap/entity/2-ROID"
"value": "https://example.com/rdap/entity/%CONTACT3ROID%"
}
],
"events": [

View file

@ -0,0 +1,115 @@
{
"objectClassName" : "domain",
"handle" : "17-Q9JYB4C",
"ldhName" : "cat.xn--q9jyb4c",
"unicodeName" : "cat.みんな",
"status" :
[
"client delete prohibited",
"client renew prohibited",
"client transfer prohibited",
"server update prohibited"
],
"links" :
[
{
"value" : "http://myserver.example.com/domain/cat.xn--q9jyb4c",
"rel" : "self",
"href" : "http://myserver.example.com/domain/cat.xn--q9jyb4c",
"type" : "application/rdap+json"
}
],
"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" :
[
{
"objectClassName" : "nameserver",
"handle" : "A-ROID",
"ldhName" : "ns1.cat.xn--q9jyb4c",
"unicodeName" : "ns1.cat.みんな",
"status" : ["active", "associated"],
"links" :
[
{
"value" : "http://myserver.example.com/nameserver/ns1.cat.xn--q9jyb4c",
"rel" : "self",
"href" : "http://myserver.example.com/nameserver/ns1.cat.xn--q9jyb4c",
"type" : "application/rdap+json"
}
],
"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"
}
],
"ipAddresses" :
{
"v4" : ["1.2.3.4"]
}
},
{
"objectClassName" : "nameserver",
"handle" : "C-ROID",
"ldhName" : "ns2.cat.xn--q9jyb4c",
"unicodeName" : "ns2.cat.みんな",
"status" : ["active", "associated"],
"links" :
[
{
"value" : "http://myserver.example.com/nameserver/ns2.cat.xn--q9jyb4c",
"rel" : "self",
"href" : "http://myserver.example.com/nameserver/ns2.cat.xn--q9jyb4c",
"type" : "application/rdap+json"
}
],
"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"
}
],
"ipAddresses" :
{
"v6" : ["bad:f00d:cafe::15:beef"]
}
}
],
"remarks": [
{
"title": "Contacts Hidden",
"description": [
"Domain contacts are visible only to the owning registrar."
],
"type": "object truncated due to unexplainable reasons"
}
]
}

View file

@ -0,0 +1,35 @@
{
"objectClassName" : "entity",
"handle" : "2-ROID",
"status" : ["active", "associated"],
"roles" : ["registrant"],
"links" :
[
{
"value" : "http://myserver.example.com/entity/2-ROID",
"rel" : "self",
"href" : "http://myserver.example.com/entity/2-ROID",
"type" : "application/rdap+json"
}
],
"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"
}
],
"remarks": [
{
"title": "Contact Personal Data Hidden",
"description": [
"Contact personal data is visible only to the owning registrar."
],
"type": "object truncated due to unexplainable reasons"
}
]
}

View file

@ -0,0 +1,43 @@
{
"objectClassName" : "entity",
"handle" : "2-ROID",
"status" : ["active", "associated"],
"roles" : ["registrant"],
"links" :
[
{
"value" : "http://myserver.example.com/entity/2-ROID",
"rel" : "self",
"href" : "http://myserver.example.com/entity/2-ROID",
"type" : "application/rdap+json"
}
],
"vcardArray" :
[
"vcard",
[
["version", {}, "text", "4.0"],
["fn", {}, "text", "(◕‿◕)"],
["org", {}, "text", "GOOGLE INCORPORATED <script>"],
["tel", {"type" : ["voice"]}, "uri", "tel:+1.2126660420"],
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
["email", {}, "text", "lol@cat.みんな"]
]
],
"remarks": [
{
"title": "Incomplete Data",
"description": [
"Summary data only. For complete data, send a specific query for the object."
],
"type": "object truncated due to unexplainable reasons"
},
{
"title": "Contact Personal Data Hidden",
"description": [
"Contact personal data is visible only to the owning registrar."
],
"type": "object truncated due to unexplainable reasons"
}
]
}