From 76108f83bf59bd754a003874df169b51dc262da6 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 22 Jan 2015 16:09:57 +0200 Subject: [PATCH 01/10] Updated contact doc --- app/models/contact.rb | 4 +-- doc/epp/contact.md | 65 +++++++++++++++++++++++++++++----------- spec/epp/contact_spec.rb | 2 +- 3 files changed, 50 insertions(+), 21 deletions(-) diff --git a/app/models/contact.rb b/app/models/contact.rb index 06a819616..328186518 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -1,6 +1,5 @@ class Contact < ActiveRecord::Base # TODO: Foreign contact will get email with activation link/username/temp password - # TODO: Phone number validation, in first phase very minimam in order to support current registries include EppErrors @@ -20,7 +19,8 @@ class Contact < ActiveRecord::Base validates :name, :phone, :email, :ident, :address, :registrar, :ident_type, presence: true - validates :phone, format: /\+[0-9]{1,3}\.[0-9]{1,14}?/ # /\+\d{3}\.\d+/ + # Phone nr validation is very minimam in order to support legacy requirements + validates :phone, format: /\+[0-9]{1,3}\.[0-9]{1,14}?/ validates :email, format: /@/ validates :ident, format: /\d{4}-\d{2}-\d{2}/, if: proc { |c| c.ident_type == 'birthday' } diff --git a/doc/epp/contact.md b/doc/epp/contact.md index bd2e1df3f..a1959310a 100644 --- a/doc/epp/contact.md +++ b/doc/epp/contact.md @@ -2,25 +2,54 @@ ### Contact create - Field name Min-max Field description - ----------------------- ------- ----------------- - 1 - 1 Attribute: xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" - 1 Phone - 1 E-mail - 1 Contact identificator. - Attribute: type="ico / op / passport / birthday" - 1 Contact information - 1 Full name - 1 Address - 0-1 Street name - 1 City name - ` 1 Country code - 0-1 - 0-1 Attribute: xmlns:eis="urn:ee:eis:xml:epp:eis-1.0" - 1 Base64 encoded document. Attribute: type="pdf" - 0-1 Client transaction id + Field name Min-max Field description + ----------------------- ------- ----------------- + 1 + 1 Attribute: xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" + 1 Postal information container + 1 Full name of the contact + 0-1 Name of organization + 1 Address container + 0-n Street name + 1 City name + 0-1 State or province + 0-1 Postal code + ` 1 Country code, 2 letters uppercase + 1 Phone number in format \+ddd.d+ + 1 E-mail + 1 Contact identificator. + + 0-1 + 0-1 Attribute: xmlns:eis="urn:ee:eis:xml:epp:eis-1.0" + 1 Base64 encoded document. Attribute: type="pdf" + 0-1 Client transaction id NB! Extension is not implemented yet! [EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-create-command-successfully-creates-a-contact) + +### Contact update + + Field name Min-max Field description + ----------------------- ------- ----------------- + 1 + 1 Attribute: xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" + 1 contact id, required + 1 Change container + 1 Postal information container + 0-1 Full name of the contact + 0-1 Name of organization + 0-1 Address container + 0-n Street name + 0-1 City name + 0-1 State or province + 0-1 Postal code + 0-1 Country code + 0-1 Phone number in format \+ddd.d+ + 0-1 E-mail + 1 Contact identificator. + 0-1 Required if registrar is not the owner of the contact. + 1 Contact password. Attribute: roid="String" + + +[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-update-command-is-succesful) diff --git a/spec/epp/contact_spec.rb b/spec/epp/contact_spec.rb index 84cdad784..a190f4e41 100644 --- a/spec/epp/contact_spec.rb +++ b/spec/epp/contact_spec.rb @@ -18,7 +18,7 @@ describe 'EPP Contact', epp: true do let(:epp_xml) { EppXml::Contact.new(cl_trid: 'ABC-12345') } context 'with valid user' do - before(:each) do + before do Fabricate(:epp_user) Fabricate(:epp_user, username: 'zone', registrar: zone) Fabricate(:epp_user, username: 'elkdata', registrar: elkdata) From ef93f5b2154a084d14de5d82ddcd8bdb4e31c4a9 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 22 Jan 2015 16:23:13 +0200 Subject: [PATCH 02/10] Added contact mapping protocol --- doc/epp/contact.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/epp/contact.md b/doc/epp/contact.md index a1959310a..64f3fc056 100644 --- a/doc/epp/contact.md +++ b/doc/epp/contact.md @@ -1,5 +1,8 @@ ## Contact related functions +Please study Cantact Mapping protocol: +http://tools.ietf.org/html/rfc5733 + ### Contact create Field name Min-max Field description From 8fa0aca40fe28ed27dc06fb356f955118e8fc9d0 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 22 Jan 2015 16:29:39 +0200 Subject: [PATCH 03/10] Added links to official protocols --- doc/epp-doc.md | 3 +++ doc/epp/contact.md | 6 +++++- doc/epp/domain.md | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/epp-doc.md b/doc/epp-doc.md index a986ec85c..9aa7706fc 100644 --- a/doc/epp-doc.md +++ b/doc/epp-doc.md @@ -6,3 +6,6 @@ Introduction text here [[Contact related functions](epp/contact.md)] [[Domain related functions](epp/domain.md)] [[Keyrelay related functions](epp/keyrelay.md)] + +Please study official The Extensible Provisioning Protocol (EPP): +http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol diff --git a/doc/epp/contact.md b/doc/epp/contact.md index 64f3fc056..dbe158efc 100644 --- a/doc/epp/contact.md +++ b/doc/epp/contact.md @@ -1,8 +1,12 @@ ## Contact related functions -Please study Cantact Mapping protocol: +Please study official Cantact Mapping protocol: http://tools.ietf.org/html/rfc5733 +More info at http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol + +Contact Mapping protocol short version: + ### Contact create Field name Min-max Field description diff --git a/doc/epp/domain.md b/doc/epp/domain.md index 29ee2787e..c788ec142 100644 --- a/doc/epp/domain.md +++ b/doc/epp/domain.md @@ -1,5 +1,13 @@ ## Domain related functions +Please study official Domain Name Mapping protocol: +http://tools.ietf.org/html/rfc5731 + +More info at http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol + +Domain name mapping protocol short version: + + ### Domain create Field name Min-max Field description From 9339458af627ca99e526d479b885802669e19488 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 22 Jan 2015 16:32:36 +0200 Subject: [PATCH 04/10] Added link to official protocol --- doc/epp/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/epp/README.md b/doc/epp/README.md index 4c842ff64..7556a16cf 100644 --- a/doc/epp/README.md +++ b/doc/epp/README.md @@ -6,3 +6,6 @@ Introduction text here [[Contact related functions](contact.md)] [[Domain related functions](domain.md)] [[Keyrelay related functions](keyrelay.md)] + +Please study official The Extensible Provisioning Protocol (EPP): +http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol From dd270706a820747607fd47711856fec0e5da5514 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 22 Jan 2015 16:34:48 +0200 Subject: [PATCH 05/10] readme update --- doc/epp/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/epp/README.md b/doc/epp/README.md index 7556a16cf..fd6a47dca 100644 --- a/doc/epp/README.md +++ b/doc/epp/README.md @@ -2,10 +2,10 @@ ## Introduction Introduction text here -[[Session related functions](session.md)] -[[Contact related functions](contact.md)] -[[Domain related functions](domain.md)] -[[Keyrelay related functions](keyrelay.md)] +[[Session related functions](session.md) +[[Contact related functions](contact.md) +[[Domain related functions](domain.md) +[[Keyrelay related functions](keyrelay.md) Please study official The Extensible Provisioning Protocol (EPP): http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol From 6a659aaa793b18a35196f15c208ba1d2e027ca4f Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 22 Jan 2015 16:36:47 +0200 Subject: [PATCH 06/10] Redirect old doc to new location --- doc/epp-doc.md | 10 +--------- doc/epp/README.md | 8 ++++---- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/doc/epp-doc.md b/doc/epp-doc.md index 9aa7706fc..9c6988ed8 100644 --- a/doc/epp-doc.md +++ b/doc/epp-doc.md @@ -1,11 +1,3 @@ # EPP integration specification for Estonian Internet Foundation -## Introduction -Introduction text here -[[Session related functions](epp/session.md)] -[[Contact related functions](epp/contact.md)] -[[Domain related functions](epp/domain.md)] -[[Keyrelay related functions](epp/keyrelay.md)] - -Please study official The Extensible Provisioning Protocol (EPP): -http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol +Document moved to [new_location][/doc/epp/Readme.md] diff --git a/doc/epp/README.md b/doc/epp/README.md index fd6a47dca..126aa7f18 100644 --- a/doc/epp/README.md +++ b/doc/epp/README.md @@ -2,10 +2,10 @@ ## Introduction Introduction text here -[[Session related functions](session.md) -[[Contact related functions](contact.md) -[[Domain related functions](domain.md) -[[Keyrelay related functions](keyrelay.md) +[Session related functions](session.md) +[Contact related functions](contact.md) +[Domain related functions](domain.md) +[Keyrelay related functions](keyrelay.md) Please study official The Extensible Provisioning Protocol (EPP): http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol From c8ca39ad2b480e157b986cf4fbf43599460608d2 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 22 Jan 2015 16:37:34 +0200 Subject: [PATCH 07/10] typo fix --- doc/epp-doc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/epp-doc.md b/doc/epp-doc.md index 9c6988ed8..249d74bae 100644 --- a/doc/epp-doc.md +++ b/doc/epp-doc.md @@ -1,3 +1,3 @@ # EPP integration specification for Estonian Internet Foundation -Document moved to [new_location][/doc/epp/Readme.md] +Document moved to [new_location](/doc/epp/Readme.md) From ac8a172392539b0b32e36757dbddae092ad8265b Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 22 Jan 2015 16:38:09 +0200 Subject: [PATCH 08/10] url update --- doc/epp-doc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/epp-doc.md b/doc/epp-doc.md index 249d74bae..26fc7581b 100644 --- a/doc/epp-doc.md +++ b/doc/epp-doc.md @@ -1,3 +1,3 @@ # EPP integration specification for Estonian Internet Foundation -Document moved to [new_location](/doc/epp/Readme.md) +Document moved to [new_location](/doc/epp/) From 3e852fd6e39e361f526329faf1981f6247e983d9 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 22 Jan 2015 16:38:54 +0200 Subject: [PATCH 09/10] updated epp readme --- doc/epp/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/epp/README.md b/doc/epp/README.md index 126aa7f18..1c2df2870 100644 --- a/doc/epp/README.md +++ b/doc/epp/README.md @@ -7,5 +7,5 @@ Introduction text here [Domain related functions](domain.md) [Keyrelay related functions](keyrelay.md) -Please study official The Extensible Provisioning Protocol (EPP): +Please study official The Extensible Provisioning Protocol (EPP):
http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol From f61bd77ad9e182ae3062a4ac4af1a4378ba59f74 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 22 Jan 2015 17:01:50 +0200 Subject: [PATCH 10/10] Updated contact doc --- doc/epp/contact.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/doc/epp/contact.md b/doc/epp/contact.md index dbe158efc..b84d62c6a 100644 --- a/doc/epp/contact.md +++ b/doc/epp/contact.md @@ -60,3 +60,44 @@ NB! Extension is not implemented yet! [EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-update-command-is-succesful) + +### Contact delete + + Field name Min-max Field description + ----------------------- ------- ----------------- + 1 + 1 Attribute: xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" + 1 Contact id + 0-1 Client transaction id + +[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-delete-command-deletes-contact) + + +### Contact check + + Field name Min-max Field description + ----------------------- ------- ----------------- + 1 + 1 Attribute: xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" + 1-n Contact id + 0-1 Client transaction id + +[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-check-command-returns-info-about-contact-availability) + + +### Contact info + + Field name Min-max Field description + ----------------------- ------- ----------------- + 1 + 1 Attribute: xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" + 1-n Contact id + 0-1 Client transaction id + +[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-info-command-discloses-items-to-owner) + + +### Domain renew + +Renewal semantics do not apply to contact objects, so there is no +mapping defined for the EPP command.