Merge pull request #340 from internetee/registry-270

Registry 270
This commit is contained in:
Timo Võhmar 2017-01-16 13:39:27 +02:00 committed by GitHub
commit e951b471b7
29 changed files with 389 additions and 232 deletions

View file

@ -1,3 +1,7 @@
08.01.2017
* EPP XML schema "eis-1.0.xsd" replaced with "ee-1.1.xsd"
* .ddoc legal document format support dropped
22.12.2016
* Return business registry code and country for 'org' type registrants in WHOIS and Rest-WHOIS

View file

@ -84,7 +84,7 @@ gem 'deep_cloneable', '2.1.1'
gem 'digidoc_client', '0.2.1'
gem 'epp', '1.5.0', github: 'internetee/epp'
gem 'epp-xml', '1.1.0', github: 'internetee/epp-xml'
gem 'epp-xml', github: 'internetee/epp-xml', branch: 'epp-xml-6'
gem 'uuidtools', '2.1.5' # For unique IDs (used by the epp gem)
# que

View file

@ -18,9 +18,10 @@ GIT
GIT
remote: https://github.com/internetee/epp-xml.git
revision: 5dd542e67ef26d58365f30e553254d6db809277d
revision: e483de16c06856a2d0dfe29aef74ddcbc901704b
branch: epp-xml-6
specs:
epp-xml (1.1.0)
epp-xml (2.0.0)
activesupport (~> 4.1)
builder (~> 3.2)
@ -594,7 +595,7 @@ DEPENDENCIES
devise (= 3.5.4)
digidoc_client (= 0.2.1)
epp (= 1.5.0)!
epp-xml (= 1.1.0)!
epp-xml!
fabrication (= 2.13.2)
factory_girl_rails
figaro (= 1.1.1)

View file

@ -6,7 +6,7 @@ class LegalDocument < ActiveRecord::Base
if ENV['legal_document_types'].present?
TYPES = ENV['legal_document_types'].split(',').map(&:strip)
else
TYPES = %w(pdf bdoc ddoc zip rar gz tar 7z odt doc docx).freeze
TYPES = %w(pdf bdoc zip rar gz tar 7z odt doc docx).freeze
end
attr_accessor :body

View file

@ -80,7 +80,7 @@ xml.epp_head do
end
if can? :view_full_info, @contact, @password
xml.tag!('extension') do
xml.tag!('eis:extdata', 'xmlns:eis' => 'https://epp.tld.ee/schema/eis-1.0.xsd') do
xml.tag!('eis:extdata', 'xmlns:eis' => 'https://epp.tld.ee/schema/ee-1.1.xsd') do
xml.tag!('eis:ident', @contact.ident,
type: @contact.ident_type, cc: @contact.ident_country_code)
end

View file

@ -11,7 +11,7 @@ xml.epp_head do
xml.objURI 'urn:ietf:params:xml:ns:keyrelay-1.0'
xml.svcExtension do
xml.extURI 'urn:ietf:params:xml:ns:secDNS-1.1'
xml.extURI 'https://epp.tld.ee/schema/eis-1.0.xsd'
xml.extURI 'https://epp.tld.ee/schema/ee-1.1.xsd'
end
end

View file

@ -20,7 +20,7 @@
</contact:create>
</create>
<extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd">
<eis:ident type="org" cc="EE">123</eis:ident>
<eis:legalDocument type="pdf">
dGVzdCBmYWlsCg==

View file

@ -11,7 +11,7 @@
</contact:delete>
</delete>
<extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd">
<eis:legalDocument type="pdf">
dGVzdCBmYWlsCg==
</eis:legalDocument>

View file

@ -25,7 +25,7 @@
</contact:update>
</update>
<extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd">
<eis:legalDocument type="pdf">
dGVzdCBmYWlsCg==
</eis:legalDocument>

View file

@ -31,7 +31,7 @@
<secDNS:pubKey>AwEAAddt2AkLfYGKgiEZB5SmIF8EvrjxNMH6HtxWEA4RJ9Ao6LCWheg8</secDNS:pubKey>
</secDNS:keyData>
</secDNS:create>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd">
<eis:legalDocument type="pdf">
dGVzdCBmYWlsCg==
</eis:legalDocument>

View file

@ -8,7 +8,7 @@
</domain:delete>
</delete>
<extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd">
<eis:legalDocument type="pdf">
dGVzdCBmYWlsCg==
</eis:legalDocument>

View file

@ -11,7 +11,7 @@
</domain:transfer>
</transfer>
<extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd">
<eis:legalDocument type="pdf">
dGVzdCBmYWlsCg==
</eis:legalDocument>

View file

@ -43,7 +43,7 @@
</secDNS:keyData>
</secDNS:rem>
</secDNS:update>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd">
<eis:legalDocument type="pdf">
dGVzdCBmYWlsCg==
</eis:legalDocument>

View file

@ -16,7 +16,7 @@
<ext:relative>P1D</ext:relative>
</ext:expiry>
</ext:keyrelay>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd">
<eis:legalDocument type="pdf">dGVzdCBmYWlsCg==</eis:legalDocument>
</eis:extdata>
<ext:clTRID>1422542244</ext:clTRID>

View file

@ -66,8 +66,8 @@ contact_org_enabled: 'false'
# iptables_server_ip: '127.0.0.1'
# Custom legal document types. Changing this requires updating EPP extension schema for allowed legalDocEnumType values.
# System default for legal document types is: pdf,bdoc,ddoc,zip,rar,gz,tar,7z,odt,doc,docx
# legal_document_types: "pdf,bdoc,ddoc,zip,rar,gz,tar,7z,odt,doc,docx"
# System default for legal document types is: pdf,bdoc,zip,rar,gz,tar,7z,odt,doc,docx
# legal_document_types: "pdf,bdoc,zip,rar,gz,tar,7z,odt,doc,docx"
#

View file

@ -1 +1 @@
EPP_ALL_SCHEMA = Nokogiri::XML::Schema(File.read('lib/schemas/all-ee-1.1.xsd'))
EPP_ALL_SCHEMA = Nokogiri::XML::Schema(File.read('lib/schemas/all-ee-1.2.xsd'))

File diff suppressed because it is too large Load diff

View file

@ -30,7 +30,9 @@
### .ee-specific
* [all-ee-1.0.xsd](/lib/schemas/all-ee-1.0.xsd)
* [all-ee-1.1.xsd](/lib/schemas/all-ee-1.1.xsd)
* [all-ee-1.2.xsd](/lib/schemas/all-ee-1.2.xsd)
* [eis-1.0.xsd](/lib/schemas/eis-1.0.xsd)
* [ee-1.1.xsd](/lib/schemas/ee-1.1.xsd)
* [epp-ee-1.0.xsd](/lib/schemas/epp-ee-1.0.xsd)
* [domain-eis-1.0.xsd](/lib/schemas/domain-eis-1.0.xsd)
* [contact-eis-1.0.xsd](/lib/schemas/contact-eis-1.0.xsd)

View file

@ -34,7 +34,7 @@ More info: https://en.wikipedia.org/wiki/Latin_script_in_Unicode
<contact:voice> 1 Phone number in format \+ddd.d+
<contact:email> 1 E-mail
<extension> 1
<eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
<eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd"
<eis:ident> 1 Contact identificator
Attribute: "type"
"org" # Business registry code
@ -43,7 +43,7 @@ More info: https://en.wikipedia.org/wiki/Latin_script_in_Unicode
Attribute: "cc"
"EE" # Country code in ISO_3166-1 aplha 2
<eis:legalDocument> 0-1 Base64 encoded document
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
Attribute: type="pdf/bdoc/zip/rar/gz/tar/7z"
<clTRID> 0-1 Client transaction id
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-create-command-successfully-creates-a-contact)
@ -70,7 +70,7 @@ More info: https://en.wikipedia.org/wiki/Latin_script_in_Unicode
<contact:authInfo> 0-1 Required if registrar is not the owner of the contact.
<contact:pw> 1 Contact password. Attribute: roid="String"
<extension> 0-1
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd"
<eis:ident> 0-1 Contact identificator
Attribute: "type"
"org" # Business registry code
@ -79,7 +79,7 @@ More info: https://en.wikipedia.org/wiki/Latin_script_in_Unicode
Attribute: "cc"
"EE" # Country code in ISO_3166-1 aplha 2
<eis:legalDocument> 0-1 Base64 encoded document.
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
Attribute: type="pdf/bdoc/zip/rar/gz/tar/7z"
<clTRID> 0-1 Client transaction id
@ -95,9 +95,9 @@ More info: https://en.wikipedia.org/wiki/Latin_script_in_Unicode
<contact:authInfo> 0-1 Required if registrar is not the owner of the contact.
<contact:pw> 1 Contact password. Attribute: roid="String"
<extension> 0-1
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd"
<eis:legalDocument> 0-1 Base64 encoded document.
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
Attribute: type="pdf/bdoc/zip/rar/gz/tar/7z"
<clTRID> 0-1 Client transaction id
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-delete-command-deletes-contact)

View file

@ -34,9 +34,9 @@ Domain name mapping protocol short version:
<secDNS:protocol> 1 Allowed values: 3
<secDNS:alg> 1 Allowed values: 3, 5, 6, 7, 8, 10, 13, 14
<secDNS:pubKey> 1 Public key
<eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
<eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd"
<eis:legalDocument> 1 Base64 encoded document.
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
Attribute: type="pdf/bdoc/zip/rar/gz/tar/7z"
<eis:reserved> 0-1
<eis:pw> 0-1 Required if registering a reserved domain
<clTRID> 0-1 Client transaction id
@ -83,9 +83,9 @@ Domain name mapping protocol short version:
<secDNS:protocol> 1 Allowed values: 3
<secDNS:alg> 1 Allowed values: 3, 5, 6, 7, 8, 10, 13, 14
<secDNS:pubKey> 1 Public key
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd"
<eis:legalDocument> 0-1 Base64 encoded document. Required if registrant is changing.
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
Attribute: type="pdf/bdoc/zip/rar/gz/tar/7z"
<clTRID> 0-1 Client transaction id
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-domain-with-valid-domain-updates-domain-and-adds-objects)
@ -99,9 +99,9 @@ Domain name mapping protocol short version:
Optional attribute: verified="yes/no"
<domain:name> 1 Domain name. Can contain unicode characters.
<extension> 1
<eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
<eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd"
<eis:legalDocument> 1 Base64 encoded document.
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
Attribute: type="pdf/bdoc/zip/rar/gz/tar/7z"
<clTRID> 0-1 Client transaction id
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-domain-with-valid-domain-deletes-domain)
@ -132,9 +132,9 @@ Domain name mapping protocol short version:
Must add up to 1 / 2 / 3 years. Attribute: unit="y/m/d"
Default value is 1 year.
<extension> 0-1
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd"
<eis:legalDocument> 0-1 Base64 encoded document.
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
Attribute: type="pdf/bdoc/zip/rar/gz/tar/7z"
<clTRID> 0-1 Client transaction id
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-domain-with-valid-domain-renews-a-domain)
@ -149,9 +149,9 @@ Domain name mapping protocol short version:
<domain:authInfo> 1
<domain:pw> 1 Domain password. Attribute: roid="String"
<extension> 0-1
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd"
<eis:legalDocument> 0-1 Base64 encoded document.
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
Attribute: type="pdf/bdoc/zip/rar/gz/tar/7z"
<clTRID> 0-1 Client transaction id
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-domain-with-valid-domain-transfers-a-domain)

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This schema imports other schemas used for Estonian ccTLD
.ee EPP queries and responses.
-->
<schema targetNamespace="https://epp.tld.ee/schema/all-ee-1.2"
xmlns:all="https://epp.tld.ee/schema/all-ee-1.2"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import all schemas related to .ee EPP protocol.
Anytime the version of any imported schema is raised, the version of
'all' schema is also raised.
eppcom and epp schemas never change the version. This would result
in incompatibility with EPP standard.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"
schemaLocation="lib/schemas/eppcom-1.0.xsd"/>
<import namespace="https://epp.tld.ee/schema/epp-ee-1.0.xsd"
schemaLocation="lib/schemas/epp-ee-1.0.xsd"/>
<!-- EPP protocol extension: DNSSEC -->
<import namespace="urn:ietf:params:xml:ns:secDNS-1.1"
schemaLocation="lib/schemas/secDNS-1.1.xsd"/>
<!-- EPP protocol extension: DNSSEC keyrelay -->
<import namespace="urn:ietf:params:xml:ns:keyrelay-1.0"
schemaLocation="lib/schemas/keyrelay-1.0.xsd"/>
<import namespace="urn:ietf:params:xml:ns:host-1.0"
schemaLocation="lib/schemas/host-1.0.xsd"/>
<!-- EPP protocol extension: .ee specific -->
<import namespace="https://epp.tld.ee/schema/ee-1.1"
schemaLocation="lib/schemas/ee-1.1.xsd"/>
<import namespace="https://epp.tld.ee/schema/contact-ee-1.1"
schemaLocation="lib/schemas/contact-ee-1.1.xsd"/>
<import namespace="https://epp.tld.ee/schema/domain-eis-1.0"
schemaLocation="lib/schemas/domain-eis-1.0.xsd"/>
<annotation>
<documentation>
Extensible Provisioning Protocol v1.2
all schema's grouped together
</documentation>
</annotation>
</schema>

View file

@ -12,7 +12,7 @@
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"/>
<import namespace="https://epp.tld.ee/schema/epp-ee-1.0.xsd"/>
<import namespace="https://epp.tld.ee/schema/eis-1.0.xsd"/>
<import namespace="https://epp.tld.ee/schema/ee-1.1.xsd"/>
<annotation>
<documentation>

View file

@ -15,7 +15,7 @@ Import common element types.
<import namespace="https://epp.tld.ee/schema/epp-ee-1.0.xsd"/>
<import namespace="urn:ietf:params:xml:ns:host-1.0"/>
<import namespace="urn:ietf:params:xml:ns:secDNS-1.1"/>
<import namespace="https://epp.tld.ee/schema/eis-1.0.xsd"/>
<import namespace="https://epp.tld.ee/schema/ee-1.1.xsd"/>
<annotation>
<documentation>

104
lib/schemas/ee-1.1.xsd Normal file
View file

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema
targetNamespace="https://epp.tld.ee/schema/ee-1.1.xsd"
xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<annotation>
<documentation>
EIS Extensible Provisioning Protocol v1.1 extension schema.
</documentation>
</annotation>
<!--
Child elements found in EPP commands.
-->
<element name="extdata" type="eis:eisExtType"/>
<!--
Child elements supporting EIS specific values.
-->
<complexType name="eisExtType">
<sequence>
<element name="ident" type="eis:identType" minOccurs="0" maxOccurs="1"/>
<element name="legalDocument" type="eis:legalDocType" minOccurs="0" maxOccurs="1"/>
<element name="reserved" type="eis:reservedType" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<!--
Child elements of extdata
-->
<!--
Reserved for providing passwords for reserved domains
-->
<complexType name="reservedType">
<sequence>
<element name="pw" type="eis:pwType" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<simpleType name="pwType">
<restriction base="normalizedString">
<minLength value="1"/>
<maxLength value="255"/>
</restriction>
</simpleType>
<!--
Legal document, encoded in base64
-->
<complexType name="legalDocType">
<simpleContent>
<extension base="base64Binary">
<attribute name="type" type="eis:legalDocEnumType" use="required"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="legalDocEnumType">
<restriction base="token">
<enumeration value="pdf"/>
<enumeration value="bdoc"/>
<enumeration value="zip"/>
<enumeration value="rar"/>
<enumeration value="gz"/>
<enumeration value="tar"/>
<enumeration value="7z"/>
<enumeration value="odt"/>
<enumeration value="doc"/>
<enumeration value="docx"/>
</restriction>
</simpleType>
<!--
Ident with type and country code
-->
<complexType name="identType">
<simpleContent>
<extension base="normalizedString">
<attribute name="type" type="eis:identEnumType" use="required"/>
<attribute name="cc" type="eis:ccType"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="identEnumType">
<restriction base="token">
<enumeration value="org"/>
<enumeration value="priv"/>
<enumeration value="birthday"/>
</restriction>
</simpleType>
<simpleType name="ccType">
<restriction base="normalizedString">
<minLength value="2"/>
<maxLength value="2"/>
</restriction>
</simpleType>
</schema>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -52,7 +52,7 @@ RSpec.describe 'EPP domain:create' do
</domain:create>
</create>
<extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd">
<eis:legalDocument type="pdf">#{Base64.encode64('a' * 5000)}</eis:legalDocument>
</eis:extdata>
</extension>
@ -95,7 +95,7 @@ RSpec.describe 'EPP domain:create' do
</domain:create>
</create>
<extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd">
<eis:legalDocument type="pdf">#{Base64.encode64('a' * 5000)}</eis:legalDocument>
</eis:extdata>
</extension>

View file

@ -53,7 +53,7 @@ RSpec.describe 'EPP domain:create' do
</domain:create>
</create>
<extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd">
<eis:legalDocument type="pdf">#{Base64.encode64('a' * 5000)}</eis:legalDocument>
</eis:extdata>
</extension>
@ -83,7 +83,7 @@ RSpec.describe 'EPP domain:create' do
</domain:create>
</create>
<extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/ee-1.1.xsd">
<eis:legalDocument type="pdf">#{Base64.encode64('a' * 5000)}</eis:legalDocument>
</eis:extdata>
</extension>

View file

@ -18,7 +18,7 @@ module Requests
<objURI>urn:ietf:params:xml:ns:keyrelay-1.0</objURI>
<svcExtension>
<extURI>urn:ietf:params:xml:ns:secDNS-1.1</extURI>
<extURI>https://epp.tld.ee/schema/eis-1.0.xsd</extURI>
<extURI>https://epp.tld.ee/schema/ee-1.1.xsd</extURI>
</svcExtension>
</svcs>
</login>