mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Merge branch 'experimental-live-schema-support'
This commit is contained in:
commit
48af3e77cd
65 changed files with 1346 additions and 1205 deletions
10
Gemfile
10
Gemfile
|
@ -19,8 +19,8 @@ gem 'figaro', '~> 1.1.1'
|
||||||
gem 'pg', '~> 0.18.0'
|
gem 'pg', '~> 0.18.0'
|
||||||
gem 'ransack', '~> 1.5.1' # for searching
|
gem 'ransack', '~> 1.5.1' # for searching
|
||||||
# with polymorphic fix
|
# with polymorphic fix
|
||||||
gem 'paper_trail',
|
gem 'paper_trail',
|
||||||
github: 'airblade/paper_trail',
|
github: 'airblade/paper_trail',
|
||||||
ref: 'a453811226ec4ea59753ba6b827e390ced2fc140'
|
ref: 'a453811226ec4ea59753ba6b827e390ced2fc140'
|
||||||
gem 'rails-settings-cached', '~> 0.4.1' # for settings
|
gem 'rails-settings-cached', '~> 0.4.1' # for settings
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ gem 'digidoc_client', '~> 0.2.1'
|
||||||
|
|
||||||
# epp
|
# epp
|
||||||
gem 'epp', '~> 1.4.2', github: 'internetee/epp'
|
gem 'epp', '~> 1.4.2', github: 'internetee/epp'
|
||||||
gem 'epp-xml', '~> 1.0.3' # EIS EPP XMLs
|
gem 'epp-xml', '~> 1.0.4' # EIS EPP XMLs
|
||||||
gem 'uuidtools', '~> 2.1.4' # For unique IDs (used by the epp gem)
|
gem 'uuidtools', '~> 2.1.4' # For unique IDs (used by the epp gem)
|
||||||
|
|
||||||
# que
|
# que
|
||||||
|
@ -144,13 +144,13 @@ group :development, :test do
|
||||||
gem 'simplecov', '~> 0.10.0', require: false
|
gem 'simplecov', '~> 0.10.0', require: false
|
||||||
gem 'rubycritic', '~> 1.4.0'
|
gem 'rubycritic', '~> 1.4.0'
|
||||||
gem 'bullet', '~> 4.14.4' # for finding database optimizations
|
gem 'bullet', '~> 4.14.4' # for finding database optimizations
|
||||||
gem 'bundler-audit',
|
gem 'bundler-audit',
|
||||||
github: 'rubysec/bundler-audit',
|
github: 'rubysec/bundler-audit',
|
||||||
ref: 'f89ef7fae1090bbad825ea76812d56d72b417055' # for finding future vulnerable gems
|
ref: 'f89ef7fae1090bbad825ea76812d56d72b417055' # for finding future vulnerable gems
|
||||||
gem 'brakeman', '~> 3.0.5', require: false # for security audit'
|
gem 'brakeman', '~> 3.0.5', require: false # for security audit'
|
||||||
# tmp, otherwise conflics with breakman
|
# tmp, otherwise conflics with breakman
|
||||||
# gem 'html2haml', github: 'haml/html2haml', ref: '6984f50bdbbd6291535027726a5697f28778ee8d'
|
# gem 'html2haml', github: 'haml/html2haml', ref: '6984f50bdbbd6291535027726a5697f28778ee8d'
|
||||||
gem 'html2haml', '~> 2.0.0'
|
gem 'html2haml', '~> 2.0.0'
|
||||||
gem 'sdoc', '~> 0.4.0' # bundle exec rake doc:rails generates the API under doc/api.
|
gem 'sdoc', '~> 0.4.0' # bundle exec rake doc:rails generates the API under doc/api.
|
||||||
gem 'railroady', '~> 1.3.0' # to generate database diagrams
|
gem 'railroady', '~> 1.3.0' # to generate database diagrams
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ GEM
|
||||||
nokogiri (>= 1.4.0)
|
nokogiri (>= 1.4.0)
|
||||||
savon (>= 2.4.0)
|
savon (>= 2.4.0)
|
||||||
docile (1.1.5)
|
docile (1.1.5)
|
||||||
epp-xml (1.0.3)
|
epp-xml (1.0.4)
|
||||||
activesupport (~> 4.1)
|
activesupport (~> 4.1)
|
||||||
builder (~> 3.2)
|
builder (~> 3.2)
|
||||||
equalizer (0.0.11)
|
equalizer (0.0.11)
|
||||||
|
@ -564,7 +564,7 @@ DEPENDENCIES
|
||||||
devise (~> 3.5.1)
|
devise (~> 3.5.1)
|
||||||
digidoc_client (~> 0.2.1)
|
digidoc_client (~> 0.2.1)
|
||||||
epp (~> 1.4.2)!
|
epp (~> 1.4.2)!
|
||||||
epp-xml (~> 1.0.3)
|
epp-xml (~> 1.0.4)
|
||||||
fabrication (~> 2.13.2)
|
fabrication (~> 2.13.2)
|
||||||
faker (~> 1.4.3)
|
faker (~> 1.4.3)
|
||||||
figaro (~> 1.1.1)
|
figaro (~> 1.1.1)
|
||||||
|
|
|
@ -75,8 +75,8 @@ class Epp::SessionsController < EppController
|
||||||
end
|
end
|
||||||
|
|
||||||
if success
|
if success
|
||||||
if parsed_frame.css('newPW').first
|
if params[:parsed_frame].css('newPW').first
|
||||||
unless @api_user.update(password: parsed_frame.css('newPW').first.text)
|
unless @api_user.update(password: params[:parsed_frame].css('newPW').first.text)
|
||||||
response.headers['X-EPP-Returncode'] = '2500'
|
response.headers['X-EPP-Returncode'] = '2500'
|
||||||
handle_errors(@api_user) and return
|
handle_errors(@api_user) and return
|
||||||
end
|
end
|
||||||
|
@ -124,11 +124,8 @@ class Epp::SessionsController < EppController
|
||||||
### HELPER METHODS ###
|
### HELPER METHODS ###
|
||||||
|
|
||||||
def login_params
|
def login_params
|
||||||
ph = params_hash['epp']['command']['login']
|
user = params[:parsed_frame].css('clID').first.text
|
||||||
{ username: ph[:clID], password: ph[:pw] }
|
pw = params[:parsed_frame].css('pw').first.text
|
||||||
end
|
{ username: user, password: pw }
|
||||||
|
|
||||||
def parsed_frame
|
|
||||||
@parsed_frame ||= Nokogiri::XML(request.params[:raw_frame]).remove_namespaces!
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,6 +6,20 @@ class EppController < ApplicationController
|
||||||
|
|
||||||
before_action :generate_svtrid
|
before_action :generate_svtrid
|
||||||
before_action :latin_only
|
before_action :latin_only
|
||||||
|
|
||||||
|
before_action :validate_against_schema
|
||||||
|
def validate_against_schema
|
||||||
|
return if ['hello', 'error', 'keyrelay'].include?(params[:action])
|
||||||
|
schema.validate(params[:nokogiri_frame]).each do |error|
|
||||||
|
epp_errors << {
|
||||||
|
code: 2001,
|
||||||
|
msg: error
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
handle_errors and return if epp_errors.any?
|
||||||
|
end
|
||||||
|
|
||||||
before_action :validate_request
|
before_action :validate_request
|
||||||
before_action :update_epp_session
|
before_action :update_epp_session
|
||||||
|
|
||||||
|
@ -58,6 +72,13 @@ class EppController < ApplicationController
|
||||||
render_epp_response '/epp/error'
|
render_epp_response '/epp/error'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def schema
|
||||||
|
# TODO: Support multiple schemas
|
||||||
|
return DOMAIN_SCHEMA if params[:epp_object_type] == :domain
|
||||||
|
return CONTACT_SCHEMA if params[:epp_object_type] == :contact
|
||||||
|
EPP_SCHEMA
|
||||||
|
end
|
||||||
|
|
||||||
def generate_svtrid
|
def generate_svtrid
|
||||||
# rubocop: disable Style/VariableName
|
# rubocop: disable Style/VariableName
|
||||||
@svTRID = "ccReg-#{format('%010d', rand(10**10))}"
|
@svTRID = "ccReg-#{format('%010d', rand(10**10))}"
|
||||||
|
|
|
@ -3,7 +3,7 @@ require 'open3'
|
||||||
class ApiUser < User
|
class ApiUser < User
|
||||||
include EppErrors
|
include EppErrors
|
||||||
|
|
||||||
def epp_code_map
|
def epp_code_map
|
||||||
{
|
{
|
||||||
'2306' => [ # Parameter policy error
|
'2306' => [ # Parameter policy error
|
||||||
[:password, :blank]
|
[:password, :blank]
|
||||||
|
@ -16,6 +16,7 @@ class ApiUser < User
|
||||||
has_many :certificates
|
has_many :certificates
|
||||||
|
|
||||||
validates :username, :password, :registrar, :roles, presence: true
|
validates :username, :password, :registrar, :roles, presence: true
|
||||||
|
validates :password, length: { minimum: 6 }
|
||||||
validates :username, uniqueness: true
|
validates :username, uniqueness: true
|
||||||
|
|
||||||
# TODO: probably cache, because it's requested on every EPP
|
# TODO: probably cache, because it's requested on every EPP
|
||||||
|
|
|
@ -4,7 +4,7 @@ module Depp
|
||||||
include DisableHtml5Validation
|
include DisableHtml5Validation
|
||||||
|
|
||||||
attr_accessor :id, :name, :email, :phone, :org_name,
|
attr_accessor :id, :name, :email, :phone, :org_name,
|
||||||
:ident, :ident_type, :ident_country_code,
|
:ident, :ident_type, :ident_country_code,
|
||||||
:street, :city, :zip, :state, :country_code,
|
:street, :city, :zip, :state, :country_code,
|
||||||
:password, :legal_document, :statuses, :code
|
:password, :legal_document, :statuses, :code
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ module Depp
|
||||||
zip: res.css('postalInfo addr pc').text,
|
zip: res.css('postalInfo addr pc').text,
|
||||||
state: res.css('postalInfo addr sp').text,
|
state: res.css('postalInfo addr sp').text,
|
||||||
country_code: res.css('postalInfo addr cc').text,
|
country_code: res.css('postalInfo addr cc').text,
|
||||||
|
|
||||||
# authInfo
|
# authInfo
|
||||||
password: res.css('authInfo pw').text,
|
password: res.css('authInfo pw').text,
|
||||||
|
|
||||||
|
@ -145,25 +145,26 @@ module Depp
|
||||||
end
|
end
|
||||||
|
|
||||||
def save
|
def save
|
||||||
create_xml = Depp::Contact.epp_xml.create(
|
hash = {
|
||||||
{
|
id: { value: code },
|
||||||
id: { value: code },
|
postalInfo: {
|
||||||
email: { value: email },
|
name: { value: name },
|
||||||
voice: { value: phone },
|
org: { value: org_name },
|
||||||
postalInfo: {
|
addr: {
|
||||||
name: { value: name },
|
street: { value: street },
|
||||||
org: { value: org_name },
|
city: { value: city },
|
||||||
addr: {
|
sp: { value: state },
|
||||||
street: { value: street },
|
pc: { value: zip },
|
||||||
city: { value: city },
|
cc: { value: country_code }
|
||||||
pc: { value: zip },
|
|
||||||
sp: { value: state },
|
|
||||||
cc: { value: country_code }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
extension_xml
|
voice: { value: phone },
|
||||||
)
|
email: { value: email }
|
||||||
|
}
|
||||||
|
|
||||||
|
hash[:id] = nil if code.blank?
|
||||||
|
create_xml = Depp::Contact.epp_xml.create(hash, extension_xml)
|
||||||
|
|
||||||
data = Depp::Contact.user.request(create_xml)
|
data = Depp::Contact.user.request(create_xml)
|
||||||
self.id = data.css('id').text
|
self.id = data.css('id').text
|
||||||
handle_errors(data)
|
handle_errors(data)
|
||||||
|
@ -191,23 +192,23 @@ module Depp
|
||||||
{
|
{
|
||||||
id: { value: id },
|
id: { value: id },
|
||||||
chg: {
|
chg: {
|
||||||
voice: { value: phone },
|
|
||||||
email: { value: email },
|
|
||||||
postalInfo: {
|
postalInfo: {
|
||||||
name: { value: name },
|
name: { value: name },
|
||||||
org: { value: org_name },
|
org: { value: org_name },
|
||||||
addr: {
|
addr: {
|
||||||
street: { value: street },
|
street: { value: street },
|
||||||
city: { value: city },
|
city: { value: city },
|
||||||
pc: { value: zip },
|
|
||||||
sp: { value: state },
|
sp: { value: state },
|
||||||
|
pc: { value: zip },
|
||||||
cc: { value: country_code }
|
cc: { value: country_code }
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
voice: { value: phone },
|
||||||
|
email: { value: email },
|
||||||
|
authInfo: {
|
||||||
|
pw: { value: password }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
authInfo: {
|
|
||||||
pw: { value: password }
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
extension_xml
|
extension_xml
|
||||||
)
|
)
|
||||||
|
@ -250,7 +251,7 @@ module Depp
|
||||||
return {} if legal_document.blank?
|
return {} if legal_document.blank?
|
||||||
|
|
||||||
type = legal_document.original_filename.split('.').last.downcase
|
type = legal_document.original_filename.split('.').last.downcase
|
||||||
{
|
{
|
||||||
_anonymus: [
|
_anonymus: [
|
||||||
legalDocument: { value: Base64.encode64(legal_document.read), attrs: { type: type } }
|
legalDocument: { value: Base64.encode64(legal_document.read), attrs: { type: type } }
|
||||||
]
|
]
|
||||||
|
@ -274,7 +275,7 @@ module Depp
|
||||||
ident_type == 'priv'
|
ident_type == 'priv'
|
||||||
end
|
end
|
||||||
|
|
||||||
def persisted?
|
def persisted?
|
||||||
id.present?
|
id.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -282,13 +283,13 @@ module Depp
|
||||||
data.css('result').each do |x|
|
data.css('result').each do |x|
|
||||||
success_codes = %(1000, 1300, 1301)
|
success_codes = %(1000, 1300, 1301)
|
||||||
next if success_codes.include?(x['code'])
|
next if success_codes.include?(x['code'])
|
||||||
|
|
||||||
message = "#{x.css('msg').text} #{x.css('value').text}"
|
message = "#{x.css('msg').text} #{x.css('value').text}"
|
||||||
attr = message.split('[').last.strip.sub(']', '') if message.include?('[')
|
attr = message.split('[').last.strip.sub(']', '') if message.include?('[')
|
||||||
attr = :base if attr.nil?
|
attr = :base if attr.nil?
|
||||||
attr = 'phone' if attr == 'voice'
|
attr = 'phone' if attr == 'voice'
|
||||||
attr = 'zip' if attr == 'pc'
|
attr = 'zip' if attr == 'pc'
|
||||||
errors.add(attr, message)
|
errors.add(attr, message)
|
||||||
end
|
end
|
||||||
errors.blank?
|
errors.blank?
|
||||||
end
|
end
|
||||||
|
|
|
@ -36,15 +36,17 @@ module Depp
|
||||||
end
|
end
|
||||||
|
|
||||||
def create(domain_params)
|
def create(domain_params)
|
||||||
|
dns_hash = {}
|
||||||
|
keys = Domain.create_dnskeys_hash(domain_params)
|
||||||
|
dns_hash[:_anonymus] = keys if keys.any?
|
||||||
|
|
||||||
xml = epp_xml.create({
|
xml = epp_xml.create({
|
||||||
name: { value: domain_params[:name] },
|
name: { value: domain_params[:name] },
|
||||||
registrant: { value: domain_params[:registrant] },
|
|
||||||
period: { value: domain_params[:period].to_s[0], attrs: { unit: domain_params[:period].to_s[1] } },
|
period: { value: domain_params[:period].to_s[0], attrs: { unit: domain_params[:period].to_s[1] } },
|
||||||
ns: Domain.create_nameservers_hash(domain_params),
|
ns: Domain.create_nameservers_hash(domain_params),
|
||||||
|
registrant: { value: domain_params[:registrant] },
|
||||||
_anonymus: Domain.create_contacts_hash(domain_params)
|
_anonymus: Domain.create_contacts_hash(domain_params)
|
||||||
}, {
|
}, dns_hash, Domain.construct_custom_params_hash(domain_params))
|
||||||
_anonymus: Domain.create_dnskeys_hash(domain_params)
|
|
||||||
}, Domain.construct_custom_params_hash(domain_params))
|
|
||||||
|
|
||||||
current_user.request(xml)
|
current_user.request(xml)
|
||||||
end
|
end
|
||||||
|
@ -205,6 +207,16 @@ module Depp
|
||||||
contacts = array_difference(create_contacts_hash(old_domain_params), create_contacts_hash(domain_params))
|
contacts = array_difference(create_contacts_hash(old_domain_params), create_contacts_hash(domain_params))
|
||||||
rem_anon = contacts
|
rem_anon = contacts
|
||||||
|
|
||||||
|
add_arr = []
|
||||||
|
add_ns = create_nameservers_hash(domain_params) - create_nameservers_hash(old_domain_params)
|
||||||
|
add_arr << { ns: add_ns } if add_ns.any?
|
||||||
|
add_arr << { _anonymus: add_anon } if add_anon.any?
|
||||||
|
|
||||||
|
rem_arr = []
|
||||||
|
rem_ns = create_nameservers_hash(old_domain_params) - create_nameservers_hash(domain_params)
|
||||||
|
rem_arr << { ns: rem_ns } if rem_ns.any?
|
||||||
|
rem_arr << { _anonymus: rem_anon } if rem_anon.any?
|
||||||
|
|
||||||
if domain_params[:registrant] != old_domain_params[:registrant]
|
if domain_params[:registrant] != old_domain_params[:registrant]
|
||||||
chg = [{ registrant: { value: domain_params[:registrant] } }]
|
chg = [{ registrant: { value: domain_params[:registrant] } }]
|
||||||
end
|
end
|
||||||
|
@ -212,22 +224,18 @@ module Depp
|
||||||
{
|
{
|
||||||
name: { value: domain_params[:name] },
|
name: { value: domain_params[:name] },
|
||||||
chg: chg,
|
chg: chg,
|
||||||
add: [
|
add: add_arr,
|
||||||
{ ns: create_nameservers_hash(domain_params) - create_nameservers_hash(old_domain_params) },
|
rem: rem_arr
|
||||||
{ _anonymus: add_anon }
|
|
||||||
],
|
|
||||||
rem: [
|
|
||||||
{ ns: create_nameservers_hash(old_domain_params) - create_nameservers_hash(domain_params) },
|
|
||||||
{ _anonymus: rem_anon }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def construct_ext_edit_hash(domain_params, old_domain_params)
|
def construct_ext_edit_hash(domain_params, old_domain_params)
|
||||||
{
|
rem_keys = create_dnskeys_hash(old_domain_params) - create_dnskeys_hash(domain_params)
|
||||||
add: create_dnskeys_hash(domain_params) - create_dnskeys_hash(old_domain_params),
|
add_keys = create_dnskeys_hash(domain_params) - create_dnskeys_hash(old_domain_params)
|
||||||
rem: create_dnskeys_hash(old_domain_params) - create_dnskeys_hash(domain_params)
|
hash = {}
|
||||||
}
|
hash[:rem] = rem_keys if rem_keys.any?
|
||||||
|
hash[:add] = add_keys if add_keys.any?
|
||||||
|
hash
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_nameservers_hash(domain_params)
|
def create_nameservers_hash(domain_params)
|
||||||
|
|
|
@ -5,7 +5,7 @@ xml.epp_head do
|
||||||
end
|
end
|
||||||
|
|
||||||
xml.resData do
|
xml.resData do
|
||||||
xml.tag!('contact:chkData', 'xmlns:contact' => 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd') do
|
xml.tag!('contact:chkData', 'xmlns:contact' => 'https://epp.tld.ee/schema/contact-eis-1.0.xsd') do
|
||||||
@results.each do |result|
|
@results.each do |result|
|
||||||
xml.tag!('contact:cd') do
|
xml.tag!('contact:cd') do
|
||||||
xml.tag! "contact:id", result[:code], avail: result[:avail]
|
xml.tag! "contact:id", result[:code], avail: result[:avail]
|
||||||
|
|
|
@ -5,7 +5,7 @@ xml.epp_head do
|
||||||
end
|
end
|
||||||
|
|
||||||
xml.resData do
|
xml.resData do
|
||||||
xml.tag!('contact:creData', 'xmlns:contact' => 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd') do
|
xml.tag!('contact:creData', 'xmlns:contact' => 'https://epp.tld.ee/schema/contact-eis-1.0.xsd') do
|
||||||
xml.tag!('contact:id', @contact.code)
|
xml.tag!('contact:id', @contact.code)
|
||||||
xml.tag!('contact:crDate', @contact.created_at.try(:iso8601))
|
xml.tag!('contact:crDate', @contact.created_at.try(:iso8601))
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@ xml.epp_head do
|
||||||
end
|
end
|
||||||
|
|
||||||
xml.resData do
|
xml.resData do
|
||||||
xml.tag!('contact:infData', 'xmlns:contact' => 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd') do
|
xml.tag!('contact:infData', 'xmlns:contact' => 'https://epp.tld.ee/schema/contact-eis-1.0.xsd') do
|
||||||
xml.tag!('contact:id', @contact.code)
|
xml.tag!('contact:id', @contact.code)
|
||||||
xml.tag!('contact:roid', @contact.roid)
|
xml.tag!('contact:roid', @contact.roid)
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ xml.epp_head do
|
||||||
end
|
end
|
||||||
if can? :view_full_info, @contact, @password
|
if can? :view_full_info, @contact, @password
|
||||||
xml.tag!('extension') do
|
xml.tag!('extension') do
|
||||||
xml.tag!('eis:extdata', 'xmlns:eis' => 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd') do
|
xml.tag!('eis:extdata', 'xmlns:eis' => 'https://epp.tld.ee/schema/eis-1.0.xsd') do
|
||||||
xml.tag!('eis:ident', @contact.ident,
|
xml.tag!('eis:ident', @contact.ident,
|
||||||
type: @contact.ident_type, cc: @contact.ident_country_code)
|
type: @contact.ident_type, cc: @contact.ident_country_code)
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@ xml.epp_head do
|
||||||
end
|
end
|
||||||
|
|
||||||
xml.resData do
|
xml.resData do
|
||||||
xml.tag!('contact:creData', 'xmlns:contact' => 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd') do
|
xml.tag!('contact:creData', 'xmlns:contact' => 'https://epp.tld.ee/schema/contact-eis-1.0.xsd') do
|
||||||
xml.tag!('contact:id', @contact.code)
|
xml.tag!('contact:id', @contact.code)
|
||||||
xml.tag!('contact:crDate', @contact.created_at.try(:iso8601))
|
xml.tag!('contact:crDate', @contact.created_at.try(:iso8601))
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@ xml.epp_head do
|
||||||
end
|
end
|
||||||
|
|
||||||
xml.resData do
|
xml.resData do
|
||||||
xml.tag!('domain:chkData', 'xmlns:domain' => 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd') do
|
xml.tag!('domain:chkData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd') do
|
||||||
@domains.each do |x|
|
@domains.each do |x|
|
||||||
xml.tag!('domain:cd') do
|
xml.tag!('domain:cd') do
|
||||||
xml.tag!('domain:name', x[:name], 'avail' => x[:avail])
|
xml.tag!('domain:name', x[:name], 'avail' => x[:avail])
|
||||||
|
|
|
@ -5,7 +5,7 @@ xml.epp_head do
|
||||||
end
|
end
|
||||||
|
|
||||||
xml.resData do
|
xml.resData do
|
||||||
xml.tag!('domain:creData', 'xmlns:domain' => 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd') do
|
xml.tag!('domain:creData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd') do
|
||||||
xml.tag!('domain:name', @domain.name)
|
xml.tag!('domain:name', @domain.name)
|
||||||
xml.tag!('domain:crDate', @domain.created_at.try(:iso8601))
|
xml.tag!('domain:crDate', @domain.created_at.try(:iso8601))
|
||||||
xml.tag!('domain:exDate', @domain.valid_to.try(:iso8601))
|
xml.tag!('domain:exDate', @domain.valid_to.try(:iso8601))
|
||||||
|
|
|
@ -5,7 +5,7 @@ xml.epp_head do
|
||||||
end
|
end
|
||||||
|
|
||||||
xml.resData do
|
xml.resData do
|
||||||
xml.tag!('domain:infData', 'xmlns:domain' => 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd') do
|
xml.tag!('domain:infData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd') do
|
||||||
xml.tag!('domain:name', @domain.name)
|
xml.tag!('domain:name', @domain.name)
|
||||||
xml.tag!('domain:roid', @domain.roid)
|
xml.tag!('domain:roid', @domain.roid)
|
||||||
@domain.statuses.each do |s|
|
@domain.statuses.each do |s|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
builder.tag!('domain:trnData', 'xmlns:domain' => 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd') do
|
builder.tag!('domain:trnData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd') do
|
||||||
builder.tag!('domain:name', dt.domain_name)
|
builder.tag!('domain:name', dt.domain_name)
|
||||||
builder.tag!('domain:trStatus', dt.status)
|
builder.tag!('domain:trStatus', dt.status)
|
||||||
builder.tag!('domain:reID', dt.transfer_to.code)
|
builder.tag!('domain:reID', dt.transfer_to.code)
|
||||||
|
|
|
@ -5,7 +5,7 @@ xml.epp_head do
|
||||||
end
|
end
|
||||||
|
|
||||||
xml.resData do
|
xml.resData do
|
||||||
xml.tag!('domain:renData', 'xmlns:domain' => 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd') do
|
xml.tag!('domain:renData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd') do
|
||||||
xml.tag!('domain:name', @domain[:name])
|
xml.tag!('domain:name', @domain[:name])
|
||||||
xml.tag!('domain:exDate', @domain.valid_to.try(:iso8601))
|
xml.tag!('domain:exDate', @domain.valid_to.try(:iso8601))
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@ xml.instruct!(:xml, standalone: 'no')
|
||||||
xml.epp(
|
xml.epp(
|
||||||
'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
|
'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
|
||||||
'xmlns:secDNS' => 'urn:ietf:params:xml:ns:secDNS-1.1',
|
'xmlns:secDNS' => 'urn:ietf:params:xml:ns:secDNS-1.1',
|
||||||
'xmlns:domain' => 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd',
|
'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd',
|
||||||
'xmlns:keyrelay' => 'urn:ietf:params:xml:ns:keyrelay-1.0'
|
'xmlns:keyrelay' => 'urn:ietf:params:xml:ns:keyrelay-1.0'
|
||||||
) do
|
) do
|
||||||
xml.response do
|
xml.response do
|
||||||
|
|
|
@ -5,13 +5,13 @@ xml.epp_head do
|
||||||
xml.svcMenu do
|
xml.svcMenu do
|
||||||
xml.version '1.0'
|
xml.version '1.0'
|
||||||
xml.lang 'en'
|
xml.lang 'en'
|
||||||
xml.objURI 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd'
|
xml.objURI 'https://epp.tld.ee/schema/domain-eis-1.0.xsd'
|
||||||
xml.objURI 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd'
|
xml.objURI 'https://epp.tld.ee/schema/contact-eis-1.0.xsd'
|
||||||
xml.objURI 'urn:ietf:params:xml:ns:host-1.0'
|
xml.objURI 'urn:ietf:params:xml:ns:host-1.0'
|
||||||
xml.objURI 'urn:ietf:params:xml:ns:keyrelay-1.0'
|
xml.objURI 'urn:ietf:params:xml:ns:keyrelay-1.0'
|
||||||
xml.svcExtension do
|
xml.svcExtension do
|
||||||
xml.extURI 'urn:ietf:params:xml:ns:secDNS-1.1'
|
xml.extURI 'urn:ietf:params:xml:ns:secDNS-1.1'
|
||||||
xml.extURI 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd'
|
xml.extURI 'https://epp.tld.ee/schema/eis-1.0.xsd'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<check>
|
<check>
|
||||||
<contact:check
|
<contact:check
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:id>sh8013</contact:id>
|
<contact:id>sh8013</contact:id>
|
||||||
</contact:check>
|
</contact:check>
|
||||||
</check>
|
</check>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<check>
|
<check>
|
||||||
<contact:check
|
<contact:check
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:id>sh8013</contact:id>
|
<contact:id>sh8013</contact:id>
|
||||||
<contact:id>sh13</contact:id>
|
<contact:id>sh13</contact:id>
|
||||||
<contact:id>vsdfvq</contact:id>
|
<contact:id>vsdfvq</contact:id>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||||
<command>
|
<command>
|
||||||
<create>
|
<create>
|
||||||
<contact:create xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
<contact:create xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:postalInfo>
|
<contact:postalInfo>
|
||||||
<contact:name>Sillius Soddus</contact:name>
|
<contact:name>Sillius Soddus</contact:name>
|
||||||
<contact:addr>
|
<contact:addr>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
</contact:create>
|
</contact:create>
|
||||||
</create>
|
</create>
|
||||||
<extension>
|
<extension>
|
||||||
<eis:extdata xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd">
|
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||||
<eis:ident type="bic" cc="EE">123</eis:ident>
|
<eis:ident type="bic" cc="EE">123</eis:ident>
|
||||||
<eis:legalDocument type="pdf">
|
<eis:legalDocument type="pdf">
|
||||||
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<delete>
|
<delete>
|
||||||
<contact:delete
|
<contact:delete
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:id>sh8013</contact:id>
|
<contact:id>sh8013</contact:id>
|
||||||
<contact:authInfo>
|
<contact:authInfo>
|
||||||
<contact:pw>wrong-one</contact:pw>
|
<contact:pw>wrong-one</contact:pw>
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
</contact:delete>
|
</contact:delete>
|
||||||
</delete>
|
</delete>
|
||||||
<extension>
|
<extension>
|
||||||
<eis:extdata xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd">
|
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||||
<eis:legalDocument type="pdf">
|
<eis:legalDocument type="pdf">
|
||||||
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
||||||
</eis:legalDocument>
|
</eis:legalDocument>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||||
<command>
|
<command>
|
||||||
<info>
|
<info>
|
||||||
<contact:info xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
<contact:info xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:id>sh8013</contact:id>
|
<contact:id>sh8013</contact:id>
|
||||||
<contact:authInfo>
|
<contact:authInfo>
|
||||||
<contact:pw>Aas34fq</contact:pw>
|
<contact:pw>Aas34fq</contact:pw>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||||
<command>
|
<command>
|
||||||
<update>
|
<update>
|
||||||
<contact:update xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
<contact:update xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:id>sh8013</contact:id>
|
<contact:id>sh8013</contact:id>
|
||||||
<contact:chg>
|
<contact:chg>
|
||||||
<contact:postalInfo>
|
<contact:postalInfo>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</contact:update>
|
</contact:update>
|
||||||
</update>
|
</update>
|
||||||
<extension>
|
<extension>
|
||||||
<eis:extdata xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd">
|
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||||
<eis:legalDocument type="pdf">
|
<eis:legalDocument type="pdf">
|
||||||
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
||||||
</eis:legalDocument>
|
</eis:legalDocument>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<check>
|
<check>
|
||||||
<domain:check
|
<domain:check
|
||||||
xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd">
|
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||||
<domain:name>example.ee</domain:name>
|
<domain:name>example.ee</domain:name>
|
||||||
</domain:check>
|
</domain:check>
|
||||||
</check>
|
</check>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<create>
|
<create>
|
||||||
<domain:create
|
<domain:create
|
||||||
xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd">
|
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||||
<domain:name>example.ee</domain:name>
|
<domain:name>example.ee</domain:name>
|
||||||
<domain:period unit="y">1</domain:period>
|
<domain:period unit="y">1</domain:period>
|
||||||
<domain:ns>
|
<domain:ns>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
</secDNS:create>
|
</secDNS:create>
|
||||||
</extension>
|
</extension>
|
||||||
<extension>
|
<extension>
|
||||||
<eis:extdata xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd">
|
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||||
<eis:legalDocument type="pdf">
|
<eis:legalDocument type="pdf">
|
||||||
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
||||||
</eis:legalDocument>
|
</eis:legalDocument>
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
<command>
|
<command>
|
||||||
<delete>
|
<delete>
|
||||||
<domain:delete
|
<domain:delete
|
||||||
xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd">
|
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||||
<domain:name>example.ee</domain:name>
|
<domain:name>example.ee</domain:name>
|
||||||
</domain:delete>
|
</domain:delete>
|
||||||
</delete>
|
</delete>
|
||||||
<extension>
|
<extension>
|
||||||
<eis:extdata xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd">
|
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||||
<eis:legalDocument type="pdf">
|
<eis:legalDocument type="pdf">
|
||||||
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
||||||
</eis:legalDocument>
|
</eis:legalDocument>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<info>
|
<info>
|
||||||
<domain:info
|
<domain:info
|
||||||
xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd">
|
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||||
<domain:name hosts="all">example.ee</domain:name>
|
<domain:name hosts="all">example.ee</domain:name>
|
||||||
<domain:authInfo>
|
<domain:authInfo>
|
||||||
<domain:pw>2fooBAR</domain:pw>
|
<domain:pw>2fooBAR</domain:pw>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<renew>
|
<renew>
|
||||||
<domain:renew
|
<domain:renew
|
||||||
xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd">
|
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||||
<domain:name>example.ee</domain:name>
|
<domain:name>example.ee</domain:name>
|
||||||
<domain:curExpDate>2014-08-07</domain:curExpDate>
|
<domain:curExpDate>2014-08-07</domain:curExpDate>
|
||||||
<domain:period unit="y">1</domain:period>
|
<domain:period unit="y">1</domain:period>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<transfer op="query">
|
<transfer op="query">
|
||||||
<domain:transfer
|
<domain:transfer
|
||||||
xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd">
|
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||||
<domain:name>example.ee</domain:name>
|
<domain:name>example.ee</domain:name>
|
||||||
<domain:authInfo>
|
<domain:authInfo>
|
||||||
<domain:pw roid="JD1234-REP">2BARfoo</domain:pw>
|
<domain:pw roid="JD1234-REP">2BARfoo</domain:pw>
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
</domain:transfer>
|
</domain:transfer>
|
||||||
</transfer>
|
</transfer>
|
||||||
<extension>
|
<extension>
|
||||||
<eis:extdata xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd">
|
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||||
<eis:legalDocument type="pdf">
|
<eis:legalDocument type="pdf">
|
||||||
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
||||||
</eis:legalDocument>
|
</eis:legalDocument>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<update>
|
<update>
|
||||||
<domain:update
|
<domain:update
|
||||||
xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd">
|
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||||
<domain:name>example.ee</domain:name>
|
<domain:name>example.ee</domain:name>
|
||||||
<domain:chg>
|
<domain:chg>
|
||||||
<domain:registrant>mak21</domain:registrant>
|
<domain:registrant>mak21</domain:registrant>
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
</secDNS:update>
|
</secDNS:update>
|
||||||
</extension>
|
</extension>
|
||||||
<extension>
|
<extension>
|
||||||
<eis:extdata xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd">
|
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||||
<eis:legalDocument type="pdf">
|
<eis:legalDocument type="pdf">
|
||||||
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==
|
||||||
</eis:legalDocument>
|
</eis:legalDocument>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1" xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd" xmlns:ext="urn:ietf:params:xml:ns:keyrelay-1.0">
|
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1" xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd" xmlns:ext="urn:ietf:params:xml:ns:keyrelay-1.0">
|
||||||
<command>
|
<command>
|
||||||
<ext:keyrelay>
|
<ext:keyrelay>
|
||||||
<ext:name>example6.ee</ext:name>
|
<ext:name>example6.ee</ext:name>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
<ext:relative>P1D</ext:relative>
|
<ext:relative>P1D</ext:relative>
|
||||||
</ext:expiry>
|
</ext:expiry>
|
||||||
</ext:keyrelay>
|
</ext:keyrelay>
|
||||||
<eis:extdata xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd">
|
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||||
<eis:legalDocument type="pdf">JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==</eis:legalDocument>
|
<eis:legalDocument type="pdf">JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==</eis:legalDocument>
|
||||||
</eis:extdata>
|
</eis:extdata>
|
||||||
<ext:clTRID>1422542244</ext:clTRID>
|
<ext:clTRID>1422542244</ext:clTRID>
|
||||||
|
|
3
config/initializers/load_schemas.rb
Normal file
3
config/initializers/load_schemas.rb
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
EPP_SCHEMA = Nokogiri::XML::Schema(File.read("lib/schemas/epp-1.0.xsd"))
|
||||||
|
DOMAIN_SCHEMA = Nokogiri::XML::Schema(File.read("lib/schemas/domain-eis-1.0.xsd"))
|
||||||
|
CONTACT_SCHEMA = Nokogiri::XML::Schema(File.read("lib/schemas/contact-eis-1.0.xsd"))
|
|
@ -2,15 +2,15 @@ require 'epp_constraint'
|
||||||
|
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
namespace(:epp, defaults: { format: :xml }) do
|
namespace(:epp, defaults: { format: :xml }) do
|
||||||
match 'session/:action', controller: 'sessions', via: :all
|
match 'session/:action', controller: 'sessions', via: :all, constraints: EppConstraint.new(:session)
|
||||||
match 'session/pki/:action', controller: 'sessions', via: :all
|
match 'session/pki/:action', controller: 'sessions', via: :all, constraints: EppConstraint.new(:session)
|
||||||
|
|
||||||
post 'command/:action', controller: 'domains', constraints: EppConstraint.new(:domain)
|
post 'command/:action', controller: 'domains', constraints: EppConstraint.new(:domain)
|
||||||
post 'command/:action', controller: 'contacts', constraints: EppConstraint.new(:contact)
|
post 'command/:action', controller: 'contacts', constraints: EppConstraint.new(:contact)
|
||||||
post 'command/poll', to: 'polls#poll', constraints: EppConstraint.new(:poll)
|
post 'command/poll', to: 'polls#poll', constraints: EppConstraint.new(:poll)
|
||||||
post 'command/keyrelay', to: 'keyrelays#keyrelay', constraints: EppConstraint.new(:keyrelay)
|
post 'command/keyrelay', to: 'keyrelays#keyrelay', constraints: EppConstraint.new(:keyrelay)
|
||||||
|
|
||||||
post 'command/:command', to: 'errors#not_found' # fallback route
|
post 'command/:command', to: 'errors#not_found', constraints: EppConstraint.new(:not_found) # fallback route
|
||||||
|
|
||||||
get 'error/:command', to: 'errors#error'
|
get 'error/:command', to: 'errors#error'
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,15 +16,11 @@ Our implementation supports following protocols:
|
||||||
[RFC5910 - DNSSEC Mapping](http://tools.ietf.org/html/rfc5910)
|
[RFC5910 - DNSSEC Mapping](http://tools.ietf.org/html/rfc5910)
|
||||||
[RFC3735 - Guidelines for Extending the EPP](http://tools.ietf.org/html/rfc3735)
|
[RFC3735 - Guidelines for Extending the EPP](http://tools.ietf.org/html/rfc3735)
|
||||||
|
|
||||||
Related XML Schema Definitions (may differ from policies applied to registry):
|
EIS specific XML Schema Definitions (may differ from policies applied to registry):
|
||||||
|
|
||||||
[contact-eis-1.0.xsd](schemas/contact-eis-1.0.xsd)
|
[contact-eis-1.0.xsd](schemas/contact-eis-1.0.xsd)
|
||||||
[domain-eis-1.0.xsd](schemas/domain-eis-1.0.xsd)
|
[domain-eis-1.0.xsd](schemas/domain-eis-1.0.xsd)
|
||||||
[eis-1.0.xsd](schemas/eis-1.0.xsd)
|
[eis-1.0.xsd](schemas/eis-1.0.xsd)
|
||||||
[epp-1.0.xsd](schemas/epp-1.0.xsd)
|
|
||||||
[eppcom-1.0.xsd](schemas/eppcom-1.0.xsd)
|
|
||||||
[host-1.0.xsd](schemas/host-1.0.xsd)
|
|
||||||
[secDNS-1.1.xsd](schemas/secDNS-1.1.xsd)
|
|
||||||
|
|
||||||
More info about The Extensible Provisioning Protocol (EPP):<br>
|
More info about The Extensible Provisioning Protocol (EPP):<br>
|
||||||
http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol
|
http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol
|
||||||
|
|
1044
doc/epp-examples.md
1044
doc/epp-examples.md
File diff suppressed because it is too large
Load diff
|
@ -12,7 +12,7 @@ Contact Mapping protocol short version:
|
||||||
Field name Min-max Field description
|
Field name Min-max Field description
|
||||||
----------------------- ------- -----------------
|
----------------------- ------- -----------------
|
||||||
<create> 1
|
<create> 1
|
||||||
<contact:create> 1 Attribute: xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd"
|
<contact:create> 1 Attribute: xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd"
|
||||||
<contact:id> 0-1 Contact id, optional, string, no spaces, max 100 characters,
|
<contact:id> 0-1 Contact id, optional, string, no spaces, max 100 characters,
|
||||||
generated automatically if missing
|
generated automatically if missing
|
||||||
<contact:postalInfo> 1 Postal information container
|
<contact:postalInfo> 1 Postal information container
|
||||||
|
@ -27,7 +27,7 @@ Contact Mapping protocol short version:
|
||||||
<contact:voice> 1 Phone number in format \+ddd.d+
|
<contact:voice> 1 Phone number in format \+ddd.d+
|
||||||
<contact:email> 1 E-mail
|
<contact:email> 1 E-mail
|
||||||
<extension> 1
|
<extension> 1
|
||||||
<eis:extdata> 1 Attribute: xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd"
|
<eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
<eis:ident> 1 Contact identificator
|
<eis:ident> 1 Contact identificator
|
||||||
Attribute: "type"
|
Attribute: "type"
|
||||||
"bic" # Business registry code
|
"bic" # Business registry code
|
||||||
|
@ -46,7 +46,7 @@ Contact Mapping protocol short version:
|
||||||
Field name Min-max Field description
|
Field name Min-max Field description
|
||||||
----------------------- ------- -----------------
|
----------------------- ------- -----------------
|
||||||
<update> 1
|
<update> 1
|
||||||
<contact:update> 1 Attribute: xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd"
|
<contact:update> 1 Attribute: xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd"
|
||||||
<contact:id> 1 Contact id, required
|
<contact:id> 1 Contact id, required
|
||||||
<contact:chg> 1 Change container
|
<contact:chg> 1 Change container
|
||||||
<contact:postalInfo> 1 Postal information container
|
<contact:postalInfo> 1 Postal information container
|
||||||
|
@ -63,7 +63,7 @@ Contact Mapping protocol short version:
|
||||||
<contact:authInfo> 0-1 Required if registrar is not the owner of the contact.
|
<contact:authInfo> 0-1 Required if registrar is not the owner of the contact.
|
||||||
<contact:pw> 1 Contact password. Attribute: roid="String"
|
<contact:pw> 1 Contact password. Attribute: roid="String"
|
||||||
<extension> 0-1
|
<extension> 0-1
|
||||||
<eis:extdata> 0-1 Attribute: xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd"
|
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
<eis:ident> 0-1 Contact identificator
|
<eis:ident> 0-1 Contact identificator
|
||||||
Attribute: "type"
|
Attribute: "type"
|
||||||
"bic" # Business registry code
|
"bic" # Business registry code
|
||||||
|
@ -83,12 +83,12 @@ Contact Mapping protocol short version:
|
||||||
Field name Min-max Field description
|
Field name Min-max Field description
|
||||||
----------------------- ------- -----------------
|
----------------------- ------- -----------------
|
||||||
<delete> 1
|
<delete> 1
|
||||||
<contact:delete> 1 Attribute: xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd"
|
<contact:delete> 1 Attribute: xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd"
|
||||||
<contact:id> 1 Contact id
|
<contact:id> 1 Contact id
|
||||||
<contact:authInfo> 0-1 Required if registrar is not the owner of the contact.
|
<contact:authInfo> 0-1 Required if registrar is not the owner of the contact.
|
||||||
<contact:pw> 1 Contact password. Attribute: roid="String"
|
<contact:pw> 1 Contact password. Attribute: roid="String"
|
||||||
<extension> 0-1
|
<extension> 0-1
|
||||||
<eis:extdata> 0-1 Attribute: xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd"
|
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
<eis:legalDocument> 0-1 Base64 encoded document.
|
<eis:legalDocument> 0-1 Base64 encoded document.
|
||||||
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
|
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
@ -101,7 +101,7 @@ Contact Mapping protocol short version:
|
||||||
Field name Min-max Field description
|
Field name Min-max Field description
|
||||||
----------------------- ------- -----------------
|
----------------------- ------- -----------------
|
||||||
<check> 1
|
<check> 1
|
||||||
<contact:check> 1 Attribute: xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd"
|
<contact:check> 1 Attribute: xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd"
|
||||||
<contact:id> 1-n Contact id
|
<contact:id> 1-n Contact id
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ Contact Mapping protocol short version:
|
||||||
Field name Min-max Field description
|
Field name Min-max Field description
|
||||||
----------------------- ------- -----------------
|
----------------------- ------- -----------------
|
||||||
<info> 1
|
<info> 1
|
||||||
<contact:info> 1 Attribute: xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd"
|
<contact:info> 1 Attribute: xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd"
|
||||||
<contact:id> 1-n Contact id
|
<contact:id> 1-n Contact id
|
||||||
<contact:authInfo> 0-1 Required if registrar is not the owner of the contact.
|
<contact:authInfo> 0-1 Required if registrar is not the owner of the contact.
|
||||||
<contact:pw> 1 Contact password. Attribute: roid="String"
|
<contact:pw> 1 Contact password. Attribute: roid="String"
|
||||||
|
|
|
@ -13,7 +13,7 @@ Domain name mapping protocol short version:
|
||||||
Field name Min-max Field description
|
Field name Min-max Field description
|
||||||
------------------------- ------- -----------------
|
------------------------- ------- -----------------
|
||||||
<create> 1
|
<create> 1
|
||||||
<domain:create> 1 Attribute: xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd"
|
<domain:create> 1 Attribute: xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
|
||||||
<domain:name> 1 Domain name. Can contain unicode characters.
|
<domain:name> 1 Domain name. Can contain unicode characters.
|
||||||
<domain:period> 0-1 Registration period for domain.
|
<domain:period> 0-1 Registration period for domain.
|
||||||
Must add up to 1 / 2 / 3 years.
|
Must add up to 1 / 2 / 3 years.
|
||||||
|
@ -36,7 +36,7 @@ Domain name mapping protocol short version:
|
||||||
<secDNS:protocol> 1 Allowed values: 3
|
<secDNS:protocol> 1 Allowed values: 3
|
||||||
<secDNS:alg> 1 Allowed values: 3, 5, 6, 7, 8, 252, 253, 254, 255
|
<secDNS:alg> 1 Allowed values: 3, 5, 6, 7, 8, 252, 253, 254, 255
|
||||||
<secDNS:pubKey> 1 Public key
|
<secDNS:pubKey> 1 Public key
|
||||||
<eis:extdata> 1 Attribute: xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd"
|
<eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
<eis:legalDocument> 1 Base64 encoded document.
|
<eis:legalDocument> 1 Base64 encoded document.
|
||||||
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
|
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
|
||||||
<eis:reserved> 0-1
|
<eis:reserved> 0-1
|
||||||
|
@ -50,7 +50,7 @@ Domain name mapping protocol short version:
|
||||||
Field name Min-max Field description
|
Field name Min-max Field description
|
||||||
------------------------ -------- -----------------
|
------------------------ -------- -----------------
|
||||||
<update> 1
|
<update> 1
|
||||||
<domain:update> 1 Attribute: xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd"
|
<domain:update> 1 Attribute: xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
|
||||||
<domain:name> 1 Domain name. Can contain unicode characters.
|
<domain:name> 1 Domain name. Can contain unicode characters.
|
||||||
<domain:chg> 0-1 Attributes to change
|
<domain:chg> 0-1 Attributes to change
|
||||||
<domain:registrant> 0-1 Contact reference to the registrant
|
<domain:registrant> 0-1 Contact reference to the registrant
|
||||||
|
@ -85,7 +85,7 @@ Domain name mapping protocol short version:
|
||||||
<secDNS:rem> 0-1
|
<secDNS:rem> 0-1
|
||||||
<secDNS:keyData> 1-n
|
<secDNS:keyData> 1-n
|
||||||
<secDNS:pubKey> 1 Public key
|
<secDNS:pubKey> 1 Public key
|
||||||
<eis:extdata> 0-1 Attribute: xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd"
|
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
<eis:legalDocument> 0-1 Base64 encoded document. Required if registrant is changing.
|
<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/ddoc/zip/rar/gz/tar/7z"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
@ -97,11 +97,11 @@ Domain name mapping protocol short version:
|
||||||
Field name Min-max Field description
|
Field name Min-max Field description
|
||||||
----------------------- ------- -----------------
|
----------------------- ------- -----------------
|
||||||
<delete> 1
|
<delete> 1
|
||||||
<domain:delete> 1 Attribute: xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd"
|
<domain:delete> 1 Attribute: xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
|
||||||
Optional attribute: verified="yes/no"
|
Optional attribute: verified="yes/no"
|
||||||
<domain:name> 1 Domain name. Can contain unicode characters.
|
<domain:name> 1 Domain name. Can contain unicode characters.
|
||||||
<extension> 1
|
<extension> 1
|
||||||
<eis:extdata> 1 Attribute: xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd"
|
<eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
<eis:legalDocument> 1 Base64 encoded document.
|
<eis:legalDocument> 1 Base64 encoded document.
|
||||||
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
|
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
@ -113,7 +113,7 @@ Domain name mapping protocol short version:
|
||||||
Field name Min-max Field description
|
Field name Min-max Field description
|
||||||
----------------------- ------- -----------------
|
----------------------- ------- -----------------
|
||||||
<info> 1
|
<info> 1
|
||||||
<domain:info> 1 Attribute: xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd"
|
<domain:info> 1 Attribute: xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
|
||||||
<domain:name> 1 Domain name. Can contain unicode characters.
|
<domain:name> 1 Domain name. Can contain unicode characters.
|
||||||
Attribute: hosts="all / del / sub / none"
|
Attribute: hosts="all / del / sub / none"
|
||||||
<domain:authInfo> 0-1 Required if registrar is not the owner of the domain.
|
<domain:authInfo> 0-1 Required if registrar is not the owner of the domain.
|
||||||
|
@ -127,14 +127,14 @@ Domain name mapping protocol short version:
|
||||||
Field name Min-max Field description
|
Field name Min-max Field description
|
||||||
----------------------- ------- -----------------
|
----------------------- ------- -----------------
|
||||||
<renew> 1
|
<renew> 1
|
||||||
<domain:renew> 1 Attribute: xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd"
|
<domain:renew> 1 Attribute: xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
|
||||||
<domain:name> 1 Domain name. Can contain unicode characters.
|
<domain:name> 1 Domain name. Can contain unicode characters.
|
||||||
<domain:curExpDate> 1 Current expiry date (ISO8601 format)
|
<domain:curExpDate> 1 Current expiry date (ISO8601 format)
|
||||||
<domain:period> 0-1 Registration period for domain.
|
<domain:period> 0-1 Registration period for domain.
|
||||||
Must add up to 1 / 2 / 3 years. Attribute: unit="y/m/d"
|
Must add up to 1 / 2 / 3 years. Attribute: unit="y/m/d"
|
||||||
Default value is 1 year.
|
Default value is 1 year.
|
||||||
<extension> 0-1
|
<extension> 0-1
|
||||||
<eis:extdata> 0-1 Attribute: xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd"
|
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
<eis:legalDocument> 0-1 Base64 encoded document.
|
<eis:legalDocument> 0-1 Base64 encoded document.
|
||||||
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
|
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
@ -146,12 +146,12 @@ Domain name mapping protocol short version:
|
||||||
Field name Min-max Field description
|
Field name Min-max Field description
|
||||||
----------------------- ------- -----------------
|
----------------------- ------- -----------------
|
||||||
<transfer> 1 Attribute: op="request/query/approve/reject/cancel"
|
<transfer> 1 Attribute: op="request/query/approve/reject/cancel"
|
||||||
<domain:transfer> 1 Attribute: xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd"
|
<domain:transfer> 1 Attribute: xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
|
||||||
<domain:name> 1 Domain name. Can contain unicode characters.
|
<domain:name> 1 Domain name. Can contain unicode characters.
|
||||||
<domain:authInfo> 1
|
<domain:authInfo> 1
|
||||||
<domain:pw> 1 Domain password. Attribute: roid="String"
|
<domain:pw> 1 Domain password. Attribute: roid="String"
|
||||||
<extension> 0-1
|
<extension> 0-1
|
||||||
<eis:extdata> 0-1 Attribute: xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd"
|
<eis:extdata> 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
<eis:legalDocument> 0-1 Base64 encoded document.
|
<eis:legalDocument> 0-1 Base64 encoded document.
|
||||||
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
|
Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
@ -163,7 +163,7 @@ Domain name mapping protocol short version:
|
||||||
Field name Min-max Field description
|
Field name Min-max Field description
|
||||||
----------------------- ------- -----------------
|
----------------------- ------- -----------------
|
||||||
<check> 1
|
<check> 1
|
||||||
<domain:check> 1 Attribute: xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd"
|
<domain:check> 1 Attribute: xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
|
||||||
<domain:name> 1 Domain name. Can contain unicode characters.
|
<domain:name> 1 Domain name. Can contain unicode characters.
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<schema targetNamespace="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd"
|
<schema targetNamespace="https://epp.tld.ee/schema/contact-eis-1.0.xsd"
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd"
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd"
|
||||||
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
|
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
|
||||||
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
|
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
|
||||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||||
|
@ -10,9 +10,9 @@
|
||||||
<!--
|
<!--
|
||||||
Import common element types.
|
Import common element types.
|
||||||
-->
|
-->
|
||||||
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="doc/schemas/eppcom-1.0.xsd"/>
|
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="http://www.iana.org/assignments/xml-registry/schema/eppcom-1.0.xsd"/>
|
||||||
<import namespace="urn:ietf:params:xml:ns:epp-1.0" schemaLocation="doc/schemas/epp-1.0.xsd"/>
|
<import namespace="urn:ietf:params:xml:ns:epp-1.0" schemaLocation="http://www.iana.org/assignments/xml-registry/schema/epp-1.0.xsd"/>
|
||||||
<import namespace="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd" schemaLocation="doc/schemas/eis-1.0.xsd"/>
|
<import namespace="https://epp.tld.ee/schema/eis-1.0.xsd" schemaLocation="doc/schemas/eis-1.0.xsd"/>
|
||||||
|
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<schema targetNamespace="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd"
|
<schema targetNamespace="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
|
||||||
xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd"
|
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
|
||||||
xmlns:host="urn:ietf:params:xml:ns:host-1.0"
|
xmlns:host="urn:ietf:params:xml:ns:host-1.0"
|
||||||
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
|
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
|
||||||
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
|
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
|
||||||
|
@ -11,11 +11,11 @@
|
||||||
<!--
|
<!--
|
||||||
Import common element types.
|
Import common element types.
|
||||||
-->
|
-->
|
||||||
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="doc/schemas/eppcom-1.0.xsd"/>
|
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="http://www.iana.org/assignments/xml-registry/schema/eppcom-1.0.xsd"/>
|
||||||
<import namespace="urn:ietf:params:xml:ns:epp-1.0" schemaLocation="doc/schemas/epp-1.0.xsd"/>
|
<import namespace="urn:ietf:params:xml:ns:epp-1.0" schemaLocation="http://www.iana.org/assignments/xml-registry/schema/epp-1.0.xsd"/>
|
||||||
<import namespace="urn:ietf:params:xml:ns:host-1.0" schemaLocation="doc/schemas/host-1.0.xsd"/>
|
<import namespace="urn:ietf:params:xml:ns:host-1.0" schemaLocation="http://www.iana.org/assignments/xml-registry/schema/host-1.0.xsd"/>
|
||||||
<import namespace="urn:ietf:params:xml:ns:secDNS-1.1" schemaLocation="doc/schemas/secDNS-1.1.xsd"/>
|
<import namespace="urn:ietf:params:xml:ns:secDNS-1.1" schemaLocation="http://www.iana.org/assignments/xml-registry/schema/secDNS-1.1.xsd"/>
|
||||||
<import namespace="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd" schemaLocation="doc/schemas/eis-1.0.xsd"/>
|
<import namespace="https://epp.tld.ee/schema/eis-1.0.xsd" schemaLocation="doc/schemas/eis-1.0.xsd"/>
|
||||||
|
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<schema
|
<schema
|
||||||
targetNamespace="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd"
|
targetNamespace="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
xmlns:eis="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/eis-1.0.xsd"
|
xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class EppConstraint
|
class EppConstraint
|
||||||
OBJECT_TYPES = {
|
OBJECT_TYPES = {
|
||||||
domain: { domain: 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd' },
|
domain: { domain: 'https://epp.tld.ee/schema/domain-eis-1.0.xsd' },
|
||||||
contact: { contact: 'https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd' }
|
contact: { contact: 'https://epp.tld.ee/schema/contact-eis-1.0.xsd' }
|
||||||
}
|
}
|
||||||
|
|
||||||
def initialize(type)
|
def initialize(type)
|
||||||
|
@ -10,14 +10,15 @@ class EppConstraint
|
||||||
|
|
||||||
# creates parsed_frame, detects epp request object
|
# creates parsed_frame, detects epp request object
|
||||||
def matches?(request)
|
def matches?(request)
|
||||||
parsed_frame = Nokogiri::XML(request.params[:raw_frame])
|
# TODO: Maybe move this to controller to keep params clean
|
||||||
|
request.params[:nokogiri_frame] ||= Nokogiri::XML(request.params[:raw_frame])
|
||||||
|
request.params[:parsed_frame] ||= request.params[:nokogiri_frame].dup.remove_namespaces!
|
||||||
|
|
||||||
unless [:keyrelay, :poll].include?(@type)
|
unless [:keyrelay, :poll, :session, :not_found].include?(@type)
|
||||||
element = "//#{@type}:#{request.params[:action]}"
|
element = "//#{@type}:#{request.params[:action]}"
|
||||||
return false if parsed_frame.xpath("#{element}", OBJECT_TYPES[@type]).none?
|
return false if request.params[:nokogiri_frame].xpath("#{element}", OBJECT_TYPES[@type]).none?
|
||||||
end
|
end
|
||||||
|
|
||||||
request.params[:parsed_frame] = parsed_frame.remove_namespaces!
|
|
||||||
request.params[:epp_object_type] = @type
|
request.params[:epp_object_type] = @type
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,388 +1,366 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<schema targetNamespace="urn:ietf:params:xml:ns:contact-1.0"
|
<schema targetNamespace="https://epp.tld.ee/schema/contact-eis-1.0.xsd"
|
||||||
xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd"
|
||||||
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
|
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
|
||||||
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
|
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
|
||||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Import common element types.
|
Import common element types.
|
||||||
-->
|
-->
|
||||||
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"/>
|
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="lib/schemas/eppcom-1.0.xsd"/>
|
||||||
<import namespace="urn:ietf:params:xml:ns:epp-1.0"/>
|
<import namespace="urn:ietf:params:xml:ns:epp-1.0" schemaLocation="lib/schemas/epp-1.0.xsd"/>
|
||||||
|
<import namespace="https://epp.tld.ee/schema/eis-1.0.xsd" schemaLocation="lib/schemas/eis-1.0.xsd"/>
|
||||||
<annotation>
|
|
||||||
<documentation>
|
<annotation>
|
||||||
Extensible Provisioning Protocol v1.0
|
<documentation>
|
||||||
contact provisioning schema.
|
Extensible Provisioning Protocol v1.0
|
||||||
</documentation>
|
contact provisioning schema.
|
||||||
</annotation>
|
</documentation>
|
||||||
|
</annotation>
|
||||||
<!--
|
|
||||||
Child elements found in EPP commands.
|
<!--
|
||||||
-->
|
Child elements found in EPP commands.
|
||||||
<element name="check" type="contact:mIDType"/>
|
-->
|
||||||
<element name="create" type="contact:createType"/>
|
<element name="check" type="contact:mIDType"/>
|
||||||
<element name="delete" type="contact:sIDType"/>
|
<element name="create" type="contact:createType"/>
|
||||||
<element name="info" type="contact:authIDType"/>
|
<element name="delete" type="contact:authIDType"/>
|
||||||
<element name="transfer" type="contact:authIDType"/>
|
<element name="info" type="contact:authIDType"/>
|
||||||
<element name="update" type="contact:updateType"/>
|
<element name="transfer" type="contact:authIDType"/>
|
||||||
|
<element name="update" type="contact:updateType"/>
|
||||||
<!--
|
|
||||||
Utility types.
|
<!--
|
||||||
-->
|
Utility types.
|
||||||
<simpleType name="ccType">
|
-->
|
||||||
<restriction base="token">
|
<simpleType name="ccType">
|
||||||
<length value="2"/>
|
<restriction base="token">
|
||||||
</restriction>
|
<length value="2"/>
|
||||||
</simpleType>
|
</restriction>
|
||||||
|
</simpleType>
|
||||||
<complexType name="e164Type">
|
<complexType name="e164Type">
|
||||||
<simpleContent>
|
<simpleContent>
|
||||||
<extension base="contact:e164StringType">
|
<extension base="contact:e164StringType">
|
||||||
<attribute name="x" type="token"/>
|
<attribute name="x" type="token"/>
|
||||||
</extension>
|
</extension>
|
||||||
</simpleContent>
|
</simpleContent>
|
||||||
</complexType>
|
</complexType>
|
||||||
|
|
||||||
<simpleType name="e164StringType">
|
<simpleType name="e164StringType">
|
||||||
<restriction base="token">
|
<restriction base="token">
|
||||||
<pattern value="(\+[0-9]{1,3}\.[0-9]{1,14})?"/>
|
<!--<pattern value="(\+[0-9]{1,3}\.[0-9]{1,14})?"/> -->
|
||||||
<maxLength value="17"/>
|
<maxLength value="17"/>
|
||||||
</restriction>
|
</restriction>
|
||||||
</simpleType>
|
</simpleType>
|
||||||
|
|
||||||
<simpleType name="pcType">
|
<simpleType name="pcType">
|
||||||
<restriction base="token">
|
<restriction base="token">
|
||||||
<maxLength value="16"/>
|
<maxLength value="16"/>
|
||||||
</restriction>
|
</restriction>
|
||||||
</simpleType>
|
</simpleType>
|
||||||
|
|
||||||
<simpleType name="postalLineType">
|
<simpleType name="postalLineType">
|
||||||
<restriction base="normalizedString">
|
<restriction base="normalizedString">
|
||||||
<minLength value="1"/>
|
<minLength value="1"/>
|
||||||
<maxLength value="255"/>
|
<maxLength value="255"/>
|
||||||
</restriction>
|
</restriction>
|
||||||
</simpleType>
|
</simpleType>
|
||||||
|
|
||||||
<simpleType name="optPostalLineType">
|
<simpleType name="optPostalLineType">
|
||||||
<restriction base="normalizedString">
|
<restriction base="normalizedString">
|
||||||
<maxLength value="255"/>
|
<maxLength value="255"/>
|
||||||
</restriction>
|
</restriction>
|
||||||
</simpleType>
|
</simpleType>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Child elements of the <create> command.
|
Child elements of the <create> command.
|
||||||
-->
|
-->
|
||||||
<complexType name="createType">
|
<complexType name="createType">
|
||||||
<sequence>
|
<sequence>
|
||||||
<element name="id" type="eppcom:clIDType"/>
|
<element name="id" type="eppcom:clIDType" minOccurs="0"/>
|
||||||
<element name="postalInfo" type="contact:postalInfoType"
|
<element name="postalInfo" type="contact:postalInfoType"
|
||||||
maxOccurs="2"/>
|
maxOccurs="2"/>
|
||||||
<element name="voice" type="contact:e164Type"
|
<element name="voice" type="contact:e164Type"
|
||||||
minOccurs="0"/>
|
minOccurs="0"/>
|
||||||
<element name="fax" type="contact:e164Type"
|
<element name="fax" type="contact:e164Type"
|
||||||
minOccurs="0"/>
|
minOccurs="0"/>
|
||||||
<element name="email" type="eppcom:minTokenType"/>
|
<element name="email" type="eppcom:minTokenType"/>
|
||||||
<element name="authInfo" type="contact:authInfoType"/>
|
<element name="authInfo" type="contact:authInfoType" minOccurs="0"/>
|
||||||
<element name="disclose" type="contact:discloseType"
|
|
||||||
minOccurs="0"/>
|
</sequence>
|
||||||
</sequence>
|
</complexType>
|
||||||
</complexType>
|
|
||||||
|
<complexType name="postalInfoType">
|
||||||
<complexType name="postalInfoType">
|
<sequence>
|
||||||
<sequence>
|
<element name="name" type="contact:postalLineType"/>
|
||||||
<element name="name" type="contact:postalLineType"/>
|
<element name="org" type="contact:optPostalLineType"
|
||||||
<element name="org" type="contact:optPostalLineType"
|
minOccurs="0"/>
|
||||||
minOccurs="0"/>
|
<element name="addr" type="contact:addrType"/>
|
||||||
<element name="addr" type="contact:addrType"/>
|
</sequence>
|
||||||
</sequence>
|
<attribute name="type" type="contact:postalInfoEnumType"/>
|
||||||
<attribute name="type" type="contact:postalInfoEnumType"
|
</complexType>
|
||||||
use="required"/>
|
|
||||||
</complexType>
|
<simpleType name="postalInfoEnumType">
|
||||||
|
<restriction base="token">
|
||||||
<simpleType name="postalInfoEnumType">
|
<enumeration value="loc"/>
|
||||||
<restriction base="token">
|
<enumeration value="int"/>
|
||||||
<enumeration value="loc"/>
|
</restriction>
|
||||||
<enumeration value="int"/>
|
</simpleType>
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
<complexType name="addrType">
|
||||||
|
<sequence>
|
||||||
<complexType name="addrType">
|
<element name="street" type="contact:optPostalLineType"
|
||||||
<sequence>
|
minOccurs="0" maxOccurs="3"/>
|
||||||
<element name="street" type="contact:optPostalLineType"
|
<element name="city" type="contact:postalLineType"/>
|
||||||
minOccurs="0" maxOccurs="3"/>
|
<element name="sp" type="contact:optPostalLineType"
|
||||||
<element name="city" type="contact:postalLineType"/>
|
minOccurs="0"/>
|
||||||
<element name="sp" type="contact:optPostalLineType"
|
<element name="pc" type="contact:pcType"
|
||||||
minOccurs="0"/>
|
minOccurs="0"/>
|
||||||
<element name="pc" type="contact:pcType"
|
<element name="cc" type="contact:ccType"/>
|
||||||
minOccurs="0"/>
|
</sequence>
|
||||||
<element name="cc" type="contact:ccType"/>
|
</complexType>
|
||||||
</sequence>
|
|
||||||
</complexType>
|
<complexType name="authInfoType">
|
||||||
|
<choice>
|
||||||
<complexType name="authInfoType">
|
<element name="pw" type="eppcom:pwAuthInfoType"/>
|
||||||
<choice>
|
<element name="ext" type="eppcom:extAuthInfoType"/>
|
||||||
<element name="pw" type="eppcom:pwAuthInfoType"/>
|
</choice>
|
||||||
<element name="ext" type="eppcom:extAuthInfoType"/>
|
</complexType>
|
||||||
</choice>
|
|
||||||
</complexType>
|
<complexType name="intLocType">
|
||||||
|
<attribute name="type" type="contact:postalInfoEnumType"
|
||||||
<complexType name="discloseType">
|
use="required"/>
|
||||||
<sequence>
|
</complexType>
|
||||||
<element name="name" type="contact:intLocType"
|
|
||||||
minOccurs="0" maxOccurs="2"/>
|
<!--
|
||||||
<element name="org" type="contact:intLocType"
|
Child element of commands that require only an identifier.
|
||||||
minOccurs="0" maxOccurs="2"/>
|
-->
|
||||||
<element name="addr" type="contact:intLocType"
|
<complexType name="sIDType">
|
||||||
minOccurs="0" maxOccurs="2"/>
|
<sequence>
|
||||||
<element name="voice" minOccurs="0"/>
|
<element name="id" type="eppcom:clIDType"/>
|
||||||
<element name="fax" minOccurs="0"/>
|
</sequence>
|
||||||
<element name="email" minOccurs="0"/>
|
</complexType>
|
||||||
</sequence>
|
|
||||||
<attribute name="flag" type="boolean" use="required"/>
|
<!--
|
||||||
</complexType>
|
Child element of commands that accept multiple identifiers.
|
||||||
|
-->
|
||||||
<complexType name="intLocType">
|
<complexType name="mIDType">
|
||||||
<attribute name="type" type="contact:postalInfoEnumType"
|
<sequence>
|
||||||
use="required"/>
|
<element name="id" type="eppcom:clIDType"
|
||||||
</complexType>
|
maxOccurs="unbounded"/>
|
||||||
|
</sequence>
|
||||||
<!--
|
</complexType>
|
||||||
Child element of commands that require only an identifier.
|
|
||||||
-->
|
<!--
|
||||||
<complexType name="sIDType">
|
Child elements of the <info> and <transfer> commands.
|
||||||
<sequence>
|
-->
|
||||||
<element name="id" type="eppcom:clIDType"/>
|
<complexType name="authIDType">
|
||||||
</sequence>
|
<sequence>
|
||||||
</complexType>
|
<element name="id" type="eppcom:clIDType"/>
|
||||||
|
<element name="authInfo" type="contact:authInfoType"
|
||||||
<!--
|
minOccurs="0"/>
|
||||||
Child element of commands that accept multiple identifiers.
|
</sequence>
|
||||||
-->
|
</complexType>
|
||||||
<complexType name="mIDType">
|
|
||||||
<sequence>
|
<!--
|
||||||
<element name="id" type="eppcom:clIDType"
|
Child elements of the <update> command.
|
||||||
maxOccurs="unbounded"/>
|
-->
|
||||||
</sequence>
|
<complexType name="updateType">
|
||||||
</complexType>
|
<sequence>
|
||||||
|
<element name="id" type="eppcom:clIDType"/>
|
||||||
<!--
|
<element name="add" type="contact:addRemType"
|
||||||
Child elements of the <info> and <transfer> commands.
|
minOccurs="0"/>
|
||||||
-->
|
<element name="rem" type="contact:addRemType"
|
||||||
<complexType name="authIDType">
|
minOccurs="0"/>
|
||||||
<sequence>
|
<element name="chg" type="contact:chgType"
|
||||||
<element name="id" type="eppcom:clIDType"/>
|
minOccurs="0"/>
|
||||||
<element name="authInfo" type="contact:authInfoType"
|
</sequence>
|
||||||
minOccurs="0"/>
|
</complexType>
|
||||||
</sequence>
|
|
||||||
</complexType>
|
<!--
|
||||||
|
Data elements that can be added or removed.
|
||||||
<!--
|
-->
|
||||||
Child elements of the <update> command.
|
<complexType name="addRemType">
|
||||||
-->
|
<sequence>
|
||||||
<complexType name="updateType">
|
<element name="status" type="contact:statusType"
|
||||||
<sequence>
|
maxOccurs="7"/>
|
||||||
<element name="id" type="eppcom:clIDType"/>
|
</sequence>
|
||||||
<element name="add" type="contact:addRemType"
|
</complexType>
|
||||||
minOccurs="0"/>
|
|
||||||
<element name="rem" type="contact:addRemType"
|
<!--
|
||||||
minOccurs="0"/>
|
Data elements that can be changed.
|
||||||
<element name="chg" type="contact:chgType"
|
-->
|
||||||
minOccurs="0"/>
|
<complexType name="chgType">
|
||||||
</sequence>
|
<sequence>
|
||||||
</complexType>
|
<element name="postalInfo" type="contact:chgPostalInfoType"
|
||||||
|
minOccurs="0" maxOccurs="2"/>
|
||||||
<!--
|
<element name="voice" type="contact:e164Type"
|
||||||
Data elements that can be added or removed.
|
minOccurs="0"/>
|
||||||
-->
|
<element name="fax" type="contact:e164Type"
|
||||||
<complexType name="addRemType">
|
minOccurs="0"/>
|
||||||
<sequence>
|
<element name="email" type="eppcom:minTokenType"
|
||||||
<element name="status" type="contact:statusType"
|
minOccurs="0"/>
|
||||||
maxOccurs="7"/>
|
<element name="authInfo" type="contact:authInfoType"
|
||||||
</sequence>
|
minOccurs="0"/>
|
||||||
</complexType>
|
</sequence>
|
||||||
|
</complexType>
|
||||||
<!--
|
|
||||||
Data elements that can be changed.
|
<complexType name="chgPostalInfoType">
|
||||||
-->
|
<sequence>
|
||||||
<complexType name="chgType">
|
<element name="name" type="contact:postalLineType"
|
||||||
<sequence>
|
minOccurs="0"/>
|
||||||
<element name="postalInfo" type="contact:chgPostalInfoType"
|
<element name="org" type="contact:optPostalLineType"
|
||||||
minOccurs="0" maxOccurs="2"/>
|
minOccurs="0"/>
|
||||||
<element name="voice" type="contact:e164Type"
|
<element name="addr" type="contact:addrType"
|
||||||
minOccurs="0"/>
|
minOccurs="0"/>
|
||||||
<element name="fax" type="contact:e164Type"
|
</sequence>
|
||||||
minOccurs="0"/>
|
<attribute name="type" type="contact:postalInfoEnumType"/>
|
||||||
<element name="email" type="eppcom:minTokenType"
|
</complexType>
|
||||||
minOccurs="0"/>
|
|
||||||
<element name="authInfo" type="contact:authInfoType"
|
<!--
|
||||||
minOccurs="0"/>
|
Child response elements.
|
||||||
<element name="disclose" type="contact:discloseType"
|
-->
|
||||||
minOccurs="0"/>
|
<element name="chkData" type="contact:chkDataType"/>
|
||||||
</sequence>
|
<element name="creData" type="contact:creDataType"/>
|
||||||
</complexType>
|
<element name="infData" type="contact:infDataType"/>
|
||||||
|
<element name="panData" type="contact:panDataType"/>
|
||||||
<complexType name="chgPostalInfoType">
|
<element name="trnData" type="contact:trnDataType"/>
|
||||||
<sequence>
|
|
||||||
<element name="name" type="contact:postalLineType"
|
<!--
|
||||||
minOccurs="0"/>
|
<check> response elements.
|
||||||
<element name="org" type="contact:optPostalLineType"
|
-->
|
||||||
minOccurs="0"/>
|
<complexType name="chkDataType">
|
||||||
<element name="addr" type="contact:addrType"
|
<sequence>
|
||||||
minOccurs="0"/>
|
<element name="cd" type="contact:checkType"
|
||||||
</sequence>
|
maxOccurs="unbounded"/>
|
||||||
<attribute name="type" type="contact:postalInfoEnumType"
|
</sequence>
|
||||||
use="required"/>
|
</complexType>
|
||||||
</complexType>
|
|
||||||
|
<complexType name="checkType">
|
||||||
<!--
|
<sequence>
|
||||||
Child response elements.
|
<element name="id" type="contact:checkIDType"/>
|
||||||
-->
|
<element name="reason" type="eppcom:reasonType"
|
||||||
<element name="chkData" type="contact:chkDataType"/>
|
minOccurs="0"/>
|
||||||
<element name="creData" type="contact:creDataType"/>
|
</sequence>
|
||||||
<element name="infData" type="contact:infDataType"/>
|
</complexType>
|
||||||
<element name="panData" type="contact:panDataType"/>
|
|
||||||
<element name="trnData" type="contact:trnDataType"/>
|
<complexType name="checkIDType">
|
||||||
|
<simpleContent>
|
||||||
<!--
|
<extension base="eppcom:clIDType">
|
||||||
<check> response elements.
|
<attribute name="avail" type="boolean"
|
||||||
-->
|
use="required"/>
|
||||||
<complexType name="chkDataType">
|
</extension>
|
||||||
<sequence>
|
</simpleContent>
|
||||||
<element name="cd" type="contact:checkType"
|
</complexType>
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
</sequence>
|
<!--
|
||||||
</complexType>
|
<create> response elements.
|
||||||
|
-->
|
||||||
<complexType name="checkType">
|
<complexType name="creDataType">
|
||||||
<sequence>
|
<sequence>
|
||||||
<element name="id" type="contact:checkIDType"/>
|
<element name="id" type="eppcom:clIDType"/>
|
||||||
<element name="reason" type="eppcom:reasonType"
|
<element name="crDate" type="dateTime"/>
|
||||||
minOccurs="0"/>
|
</sequence>
|
||||||
</sequence>
|
</complexType>
|
||||||
</complexType>
|
|
||||||
|
<!--
|
||||||
<complexType name="checkIDType">
|
<info> response elements.
|
||||||
<simpleContent>
|
-->
|
||||||
<extension base="eppcom:clIDType">
|
<complexType name="infDataType">
|
||||||
<attribute name="avail" type="boolean"
|
<sequence>
|
||||||
use="required"/>
|
<element name="id" type="eppcom:clIDType"/>
|
||||||
</extension>
|
<element name="roid" type="eppcom:roidType"/>
|
||||||
</simpleContent>
|
<element name="status" type="contact:statusType"
|
||||||
</complexType>
|
maxOccurs="7"/>
|
||||||
|
<element name="postalInfo" type="contact:postalInfoType"
|
||||||
<!--
|
maxOccurs="2"/>
|
||||||
<create> response elements.
|
<element name="voice" type="contact:e164Type"
|
||||||
-->
|
minOccurs="0"/>
|
||||||
<complexType name="creDataType">
|
<element name="fax" type="contact:e164Type"
|
||||||
<sequence>
|
minOccurs="0"/>
|
||||||
<element name="id" type="eppcom:clIDType"/>
|
<element name="email" type="eppcom:minTokenType"/>
|
||||||
<element name="crDate" type="dateTime"/>
|
<element name="clID" type="eppcom:clIDType"/>
|
||||||
</sequence>
|
<element name="crID" type="eppcom:clIDType"/>
|
||||||
</complexType>
|
<element name="crDate" type="dateTime"/>
|
||||||
|
<element name="upID" type="eppcom:clIDType"
|
||||||
<!--
|
minOccurs="0"/>
|
||||||
<info> response elements.
|
<element name="upDate" type="dateTime"
|
||||||
-->
|
minOccurs="0"/>
|
||||||
<complexType name="infDataType">
|
<element name="trDate" type="dateTime"
|
||||||
<sequence>
|
minOccurs="0"/>
|
||||||
<element name="id" type="eppcom:clIDType"/>
|
<element name="authInfo" type="contact:authInfoType"
|
||||||
<element name="roid" type="eppcom:roidType"/>
|
minOccurs="0"/>
|
||||||
<element name="status" type="contact:statusType"
|
</sequence>
|
||||||
maxOccurs="7"/>
|
</complexType>
|
||||||
<element name="postalInfo" type="contact:postalInfoType"
|
|
||||||
maxOccurs="2"/>
|
<!--
|
||||||
<element name="voice" type="contact:e164Type"
|
Status is a combination of attributes and an optional human-readable
|
||||||
minOccurs="0"/>
|
message that may be expressed in languages other than English.
|
||||||
<element name="fax" type="contact:e164Type"
|
-->
|
||||||
minOccurs="0"/>
|
<complexType name="statusType">
|
||||||
<element name="email" type="eppcom:minTokenType"/>
|
<simpleContent>
|
||||||
<element name="clID" type="eppcom:clIDType"/>
|
<extension base="normalizedString">
|
||||||
<element name="crID" type="eppcom:clIDType"/>
|
<attribute name="s" type="contact:statusValueType"
|
||||||
<element name="crDate" type="dateTime"/>
|
use="required"/>
|
||||||
<element name="upID" type="eppcom:clIDType"
|
<attribute name="lang" type="language"
|
||||||
minOccurs="0"/>
|
default="en"/>
|
||||||
<element name="upDate" type="dateTime"
|
</extension>
|
||||||
minOccurs="0"/>
|
</simpleContent>
|
||||||
<element name="trDate" type="dateTime"
|
</complexType>
|
||||||
minOccurs="0"/>
|
|
||||||
<element name="authInfo" type="contact:authInfoType"
|
<simpleType name="statusValueType">
|
||||||
minOccurs="0"/>
|
<restriction base="token">
|
||||||
<element name="disclose" type="contact:discloseType"
|
<enumeration value="clientDeleteProhibited"/>
|
||||||
minOccurs="0"/>
|
<enumeration value="clientTransferProhibited"/>
|
||||||
</sequence>
|
<enumeration value="clientUpdateProhibited"/>
|
||||||
</complexType>
|
<enumeration value="linked"/>
|
||||||
|
<enumeration value="ok"/>
|
||||||
<!--
|
<enumeration value="pendingCreate"/>
|
||||||
Status is a combination of attributes and an optional human-readable
|
<enumeration value="pendingDelete"/>
|
||||||
message that may be expressed in languages other than English.
|
<enumeration value="pendingTransfer"/>
|
||||||
-->
|
<enumeration value="pendingUpdate"/>
|
||||||
<complexType name="statusType">
|
<enumeration value="serverDeleteProhibited"/>
|
||||||
<simpleContent>
|
<enumeration value="serverTransferProhibited"/>
|
||||||
<extension base="normalizedString">
|
<enumeration value="serverUpdateProhibited"/>
|
||||||
<attribute name="s" type="contact:statusValueType"
|
</restriction>
|
||||||
use="required"/>
|
</simpleType>
|
||||||
<attribute name="lang" type="language"
|
|
||||||
default="en"/>
|
<!--
|
||||||
</extension>
|
Pending action notification response elements.
|
||||||
</simpleContent>
|
-->
|
||||||
</complexType>
|
<complexType name="panDataType">
|
||||||
|
<sequence>
|
||||||
<simpleType name="statusValueType">
|
<element name="id" type="contact:paCLIDType"/>
|
||||||
<restriction base="token">
|
<element name="paTRID" type="epp:trIDType"/>
|
||||||
<enumeration value="clientDeleteProhibited"/>
|
<element name="paDate" type="dateTime"/>
|
||||||
<enumeration value="clientTransferProhibited"/>
|
</sequence>
|
||||||
<enumeration value="clientUpdateProhibited"/>
|
</complexType>
|
||||||
<enumeration value="linked"/>
|
|
||||||
<enumeration value="ok"/>
|
<complexType name="paCLIDType">
|
||||||
<enumeration value="pendingCreate"/>
|
<simpleContent>
|
||||||
<enumeration value="pendingDelete"/>
|
<extension base="eppcom:clIDType">
|
||||||
<enumeration value="pendingTransfer"/>
|
<attribute name="paResult" type="boolean"
|
||||||
<enumeration value="pendingUpdate"/>
|
use="required"/>
|
||||||
<enumeration value="serverDeleteProhibited"/>
|
</extension>
|
||||||
<enumeration value="serverTransferProhibited"/>
|
</simpleContent>
|
||||||
<enumeration value="serverUpdateProhibited"/>
|
</complexType>
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
<!--
|
||||||
|
<transfer> response elements.
|
||||||
<!--
|
-->
|
||||||
Pending action notification response elements.
|
<complexType name="trnDataType">
|
||||||
-->
|
<sequence>
|
||||||
<complexType name="panDataType">
|
<element name="id" type="eppcom:clIDType"/>
|
||||||
<sequence>
|
<element name="trStatus" type="eppcom:trStatusType"/>
|
||||||
<element name="id" type="contact:paCLIDType"/>
|
<element name="reID" type="eppcom:clIDType"/>
|
||||||
<element name="paTRID" type="epp:trIDType"/>
|
<element name="reDate" type="dateTime"/>
|
||||||
<element name="paDate" type="dateTime"/>
|
<element name="acID" type="eppcom:clIDType"/>
|
||||||
</sequence>
|
<element name="acDate" type="dateTime"/>
|
||||||
</complexType>
|
</sequence>
|
||||||
|
</complexType>
|
||||||
<complexType name="paCLIDType">
|
|
||||||
<simpleContent>
|
<!--
|
||||||
<extension base="eppcom:clIDType">
|
End of schema.
|
||||||
<attribute name="paResult" type="boolean"
|
-->
|
||||||
use="required"/>
|
</schema>
|
||||||
</extension>
|
|
||||||
</simpleContent>
|
|
||||||
</complexType>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<transfer> response elements.
|
|
||||||
-->
|
|
||||||
<complexType name="trnDataType">
|
|
||||||
<sequence>
|
|
||||||
<element name="id" type="eppcom:clIDType"/>
|
|
||||||
<element name="trStatus" type="eppcom:trStatusType"/>
|
|
||||||
<element name="reID" type="eppcom:clIDType"/>
|
|
||||||
<element name="reDate" type="dateTime"/>
|
|
||||||
<element name="acID" type="eppcom:clIDType"/>
|
|
||||||
<element name="acDate" type="dateTime"/>
|
|
||||||
</sequence>
|
|
||||||
</complexType>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
End of schema.
|
|
||||||
-->
|
|
||||||
</schema>
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<schema targetNamespace="urn:ietf:params:xml:ns:domain-1.0"
|
<schema targetNamespace="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
|
||||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"
|
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
|
||||||
xmlns:host="urn:ietf:params:xml:ns:host-1.0"
|
xmlns:host="urn:ietf:params:xml:ns:host-1.0"
|
||||||
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
|
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
|
||||||
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
|
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
|
||||||
|
@ -11,9 +11,11 @@
|
||||||
<!--
|
<!--
|
||||||
Import common element types.
|
Import common element types.
|
||||||
-->
|
-->
|
||||||
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"/>
|
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="lib/schemas/eppcom-1.0.xsd"/>
|
||||||
<import namespace="urn:ietf:params:xml:ns:epp-1.0"/>
|
<import namespace="urn:ietf:params:xml:ns:epp-1.0" schemaLocation="lib/schemas/epp-1.0.xsd"/>
|
||||||
<import namespace="urn:ietf:params:xml:ns:host-1.0"/>
|
<import namespace="urn:ietf:params:xml:ns:host-1.0" schemaLocation="lib/schemas/host-1.0.xsd"/>
|
||||||
|
<import namespace="urn:ietf:params:xml:ns:secDNS-1.1" schemaLocation="lib/schemas/secDNS-1.1.xsd"/>
|
||||||
|
<import namespace="https://epp.tld.ee/schema/eis-1.0.xsd" schemaLocation="lib/schemas/eis-1.0.xsd"/>
|
||||||
|
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
||||||
|
@ -46,7 +48,7 @@
|
||||||
minOccurs="0"/>
|
minOccurs="0"/>
|
||||||
<element name="contact" type="domain:contactType"
|
<element name="contact" type="domain:contactType"
|
||||||
minOccurs="0" maxOccurs="unbounded"/>
|
minOccurs="0" maxOccurs="unbounded"/>
|
||||||
<element name="authInfo" type="domain:authInfoType"/>
|
<element name="authInfo" type="domain:authInfoType" minOccurs="0"/>
|
||||||
</sequence>
|
</sequence>
|
||||||
</complexType>
|
</complexType>
|
||||||
|
|
||||||
|
@ -62,7 +64,7 @@
|
||||||
<simpleType name="pLimitType">
|
<simpleType name="pLimitType">
|
||||||
<restriction base="unsignedShort">
|
<restriction base="unsignedShort">
|
||||||
<minInclusive value="1"/>
|
<minInclusive value="1"/>
|
||||||
<maxInclusive value="99"/>
|
<maxInclusive value="1095"/>
|
||||||
</restriction>
|
</restriction>
|
||||||
</simpleType>
|
</simpleType>
|
||||||
|
|
||||||
|
@ -70,6 +72,7 @@
|
||||||
<restriction base="token">
|
<restriction base="token">
|
||||||
<enumeration value="y"/>
|
<enumeration value="y"/>
|
||||||
<enumeration value="m"/>
|
<enumeration value="m"/>
|
||||||
|
<enumeration value="d"/>
|
||||||
</restriction>
|
</restriction>
|
||||||
</simpleType>
|
</simpleType>
|
||||||
|
|
||||||
|
@ -89,6 +92,7 @@
|
||||||
<sequence>
|
<sequence>
|
||||||
<element name="hostName" type="eppcom:labelType"/>
|
<element name="hostName" type="eppcom:labelType"/>
|
||||||
<element name="hostAddr" type="host:addrType"
|
<element name="hostAddr" type="host:addrType"
|
||||||
|
|
||||||
minOccurs="0" maxOccurs="unbounded"/>
|
minOccurs="0" maxOccurs="unbounded"/>
|
||||||
</sequence>
|
</sequence>
|
||||||
</complexType>
|
</complexType>
|
||||||
|
@ -237,12 +241,28 @@
|
||||||
Allow the registrant value to be nullified by changing the
|
Allow the registrant value to be nullified by changing the
|
||||||
minLength restriction to "0".
|
minLength restriction to "0".
|
||||||
-->
|
-->
|
||||||
<simpleType name="clIDChgType">
|
|
||||||
|
<complexType name="clIDChgType">
|
||||||
|
<simpleContent>
|
||||||
|
<extension base="domain:clIDChgSimpleType">
|
||||||
|
<attribute name="verified" type="domain:verifiedType"/>
|
||||||
|
</extension>
|
||||||
|
</simpleContent>
|
||||||
|
</complexType>
|
||||||
|
|
||||||
|
<simpleType name="clIDChgSimpleType">
|
||||||
<restriction base="token">
|
<restriction base="token">
|
||||||
<minLength value="0"/>
|
<minLength value="0"/>
|
||||||
<maxLength value="16"/>
|
|
||||||
</restriction>
|
</restriction>
|
||||||
</simpleType>
|
</simpleType>
|
||||||
|
|
||||||
|
<simpleType name="verifiedType">
|
||||||
|
<restriction base="token">
|
||||||
|
<enumeration value="yes"/>
|
||||||
|
<enumeration value="no"/>
|
||||||
|
</restriction>
|
||||||
|
</simpleType>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Allow the authInfo value to be nullified by including an
|
Allow the authInfo value to be nullified by including an
|
||||||
|
@ -425,7 +445,6 @@
|
||||||
minOccurs="0"/>
|
minOccurs="0"/>
|
||||||
</sequence>
|
</sequence>
|
||||||
</complexType>
|
</complexType>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
End of schema.
|
End of schema.
|
||||||
-->
|
-->
|
102
lib/schemas/eis-1.0.xsd
Normal file
102
lib/schemas/eis-1.0.xsd
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<schema
|
||||||
|
targetNamespace="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
|
xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
|
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||||
|
elementFormDefault="qualified">
|
||||||
|
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
EIS Extensible Provisioning Protocol v1.0 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="ddoc"/>
|
||||||
|
<enumeration value="zip"/>
|
||||||
|
<enumeration value="rar"/>
|
||||||
|
<enumeration value="gz"/>
|
||||||
|
<enumeration value="tar"/>
|
||||||
|
<enumeration value="7z"/>
|
||||||
|
</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" use="required"/>
|
||||||
|
</extension>
|
||||||
|
</simpleContent>
|
||||||
|
</complexType>
|
||||||
|
|
||||||
|
<simpleType name="identEnumType">
|
||||||
|
<restriction base="token">
|
||||||
|
<enumeration value="bic"/>
|
||||||
|
<enumeration value="priv"/>
|
||||||
|
<enumeration value="birthday"/>
|
||||||
|
</restriction>
|
||||||
|
</simpleType>
|
||||||
|
|
||||||
|
<simpleType name="ccType">
|
||||||
|
<restriction base="normalizedString">
|
||||||
|
<minLength value="2"/>
|
||||||
|
<maxLength value="2"/>
|
||||||
|
</restriction>
|
||||||
|
</simpleType>
|
||||||
|
</schema>
|
|
@ -9,7 +9,7 @@
|
||||||
<!--
|
<!--
|
||||||
Import common element types.
|
Import common element types.
|
||||||
-->
|
-->
|
||||||
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="doc/schemas/eppcom-1.0.xsd" />
|
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="lib/schemas/eppcom-1.0.xsd" />
|
||||||
|
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
|
@ -2,7 +2,7 @@ require 'rails_helper'
|
||||||
|
|
||||||
describe 'EPP Contact', epp: true do
|
describe 'EPP Contact', epp: true do
|
||||||
before :all do
|
before :all do
|
||||||
@xsd = Nokogiri::XML::Schema(File.read('doc/schemas/contact-eis-1.0.xsd'))
|
@xsd = Nokogiri::XML::Schema(File.read('lib/schemas/contact-eis-1.0.xsd'))
|
||||||
@registrar1 = Fabricate(:registrar1)
|
@registrar1 = Fabricate(:registrar1)
|
||||||
@registrar2 = Fabricate(:registrar2)
|
@registrar2 = Fabricate(:registrar2)
|
||||||
@epp_xml = EppXml::Contact.new(cl_trid: 'ABC-12345')
|
@epp_xml = EppXml::Contact.new(cl_trid: 'ABC-12345')
|
||||||
|
@ -58,34 +58,10 @@ describe 'EPP Contact', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'fails if request xml is missing' do
|
it 'fails if request xml is missing' do
|
||||||
response = epp_plain_request(@epp_xml.create, validate_input: false)
|
response = epp_plain_request(@epp_xml.create)
|
||||||
response[:results][0][:msg].should ==
|
|
||||||
'Required parameter missing: create > create > postalInfo > name [name]'
|
|
||||||
response[:results][1][:msg].should ==
|
|
||||||
'Required parameter missing: create > create > postalInfo > addr > street [street]'
|
|
||||||
response[:results][2][:msg].should ==
|
|
||||||
'Required parameter missing: create > create > postalInfo > addr > city [city]'
|
|
||||||
response[:results][3][:msg].should ==
|
|
||||||
'Required parameter missing: create > create > postalInfo > addr > pc [pc]'
|
|
||||||
response[:results][4][:msg].should ==
|
|
||||||
'Required parameter missing: create > create > postalInfo > addr > cc [cc]'
|
|
||||||
response[:results][5][:msg].should ==
|
|
||||||
'Required parameter missing: create > create > voice [voice]'
|
|
||||||
response[:results][6][:msg].should ==
|
|
||||||
'Required parameter missing: create > create > email [email]'
|
|
||||||
response[:results][7][:msg].should ==
|
|
||||||
'Required parameter missing: extension > extdata > ident [ident]'
|
|
||||||
|
|
||||||
response[:results][0][:result_code].should == '2003'
|
response[:results][0][:msg].should == "Element '{https://epp.tld.ee/schema/contact-eis-1.0.xsd}create': Missing child element(s). Expected is one of ( {https://epp.tld.ee/schema/contact-eis-1.0.xsd}id, {https://epp.tld.ee/schema/contact-eis-1.0.xsd}postalInfo )."
|
||||||
response[:results][1][:result_code].should == '2003'
|
response[:results][0][:result_code].should == '2001'
|
||||||
response[:results][2][:result_code].should == '2003'
|
|
||||||
response[:results][3][:result_code].should == '2003'
|
|
||||||
response[:results][4][:result_code].should == '2003'
|
|
||||||
response[:results][5][:result_code].should == '2003'
|
|
||||||
response[:results][6][:result_code].should == '2003'
|
|
||||||
response[:results][7][:result_code].should == '2003'
|
|
||||||
|
|
||||||
response[:results].count.should == 8
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'successfully creates a contact' do
|
it 'successfully creates a contact' do
|
||||||
|
@ -196,10 +172,9 @@ describe 'EPP Contact', epp: true do
|
||||||
attrs: { type: 'birthday', cc: 'WRONG' }
|
attrs: { type: 'birthday', cc: 'WRONG' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response = create_request({}, extension, validate_input: false)
|
response = create_request({}, extension)
|
||||||
response[:msg].should ==
|
response[:msg].should == "Element '{https://epp.tld.ee/schema/eis-1.0.xsd}ident', attribute 'cc': [facet 'maxLength'] The value 'WRONG' has a length of '5'; this exceeds the allowed maximum length of '2'."
|
||||||
'Ident country code is not valid, should be in ISO_3166-1 alpha 2 format [ident]'
|
response[:result_code].should == '2001'
|
||||||
response[:result_code].should == '2005'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should return country missing' do
|
it 'should return country missing' do
|
||||||
|
@ -209,10 +184,9 @@ describe 'EPP Contact', epp: true do
|
||||||
attrs: { type: 'birthday' }
|
attrs: { type: 'birthday' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response = create_request({}, extension, validate_input: false)
|
response = create_request({}, extension)
|
||||||
response[:msg].should ==
|
response[:msg].should == "Element '{https://epp.tld.ee/schema/eis-1.0.xsd}ident': The attribute 'cc' is required but missing."
|
||||||
'Required ident attribute missing: cc'
|
response[:result_code].should == '2001'
|
||||||
response[:result_code].should == '2003'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should return country missing' do
|
it 'should return country missing' do
|
||||||
|
@ -221,10 +195,9 @@ describe 'EPP Contact', epp: true do
|
||||||
value: '1990-22-12'
|
value: '1990-22-12'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response = create_request({}, extension, validate_input: false)
|
response = create_request({}, extension)
|
||||||
response[:msg].should ==
|
response[:msg].should == "Element '{https://epp.tld.ee/schema/eis-1.0.xsd}ident': The attribute 'type' is required but missing."
|
||||||
'Required ident attribute missing: type'
|
response[:result_code].should == '2001'
|
||||||
response[:result_code].should == '2003'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should add registrar prefix for code when legacy prefix present' do
|
it 'should add registrar prefix for code when legacy prefix present' do
|
||||||
|
@ -335,15 +308,8 @@ describe 'EPP Contact', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'fails if request is invalid' do
|
it 'fails if request is invalid' do
|
||||||
response = epp_plain_request(@epp_xml.update, validate_input: false)
|
response = epp_plain_request(@epp_xml.update)
|
||||||
|
response[:results][0][:msg].should == "Element '{https://epp.tld.ee/schema/contact-eis-1.0.xsd}update': Missing child element(s). Expected is ( {https://epp.tld.ee/schema/contact-eis-1.0.xsd}id )."
|
||||||
response[:results][0][:msg].should ==
|
|
||||||
'Required parameter missing: add, rem or chg'
|
|
||||||
response[:results][0][:result_code].should == '2003'
|
|
||||||
response[:results][1][:msg].should ==
|
|
||||||
'Required parameter missing: update > update > id [id]'
|
|
||||||
response[:results][1][:result_code].should == '2003'
|
|
||||||
response[:results].count.should == 2
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns error if obj doesnt exist' do
|
it 'returns error if obj doesnt exist' do
|
||||||
|
@ -429,11 +395,11 @@ describe 'EPP Contact', epp: true do
|
||||||
chg: {
|
chg: {
|
||||||
id: { value: 'notpossibletoupdate' }
|
id: { value: 'notpossibletoupdate' }
|
||||||
}
|
}
|
||||||
}, {}, { validate_input: false }
|
}, {}
|
||||||
)
|
)
|
||||||
|
|
||||||
response[:msg].should == 'Object does not exist'
|
response[:msg].should == "Element '{https://epp.tld.ee/schema/contact-eis-1.0.xsd}id': This element is not expected."
|
||||||
response[:result_code].should == '2303'
|
response[:result_code].should == '2001'
|
||||||
|
|
||||||
@contact.reload.code.should == 'FIRST0:SH8013'
|
@contact.reload.code.should == 'FIRST0:SH8013'
|
||||||
end
|
end
|
||||||
|
@ -492,16 +458,16 @@ describe 'EPP Contact', epp: true do
|
||||||
id: { value: 'FIRST0:SH8013' },
|
id: { value: 'FIRST0:SH8013' },
|
||||||
add: [{
|
add: [{
|
||||||
_anonymus: [
|
_anonymus: [
|
||||||
{ status: { value: 'Payment overdue.', attrs: { s: 'clientHold', lang: 'en' } } },
|
{ status: { value: 'Payment overdue.', attrs: { s: 'clientDeleteProhibited', lang: 'en' } } },
|
||||||
{ status: { value: '', attrs: { s: 'clientUpdateProhibited' } } }
|
{ status: { value: '', attrs: { s: 'clientUpdateProhibited' } } }
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:result_code].should == '2306'
|
|
||||||
response[:results][0][:msg].should == "Parameter value policy error. Client-side object status "\
|
response[:results][0][:msg].should == "Parameter value policy error. Client-side object status "\
|
||||||
"management not supported: status [status]"
|
"management not supported: status [status]"
|
||||||
|
response[:results][0][:result_code].should == '2306'
|
||||||
|
|
||||||
Setting.client_status_editing_enabled = true
|
Setting.client_status_editing_enabled = true
|
||||||
end
|
end
|
||||||
|
@ -543,6 +509,7 @@ describe 'EPP Contact', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should honor chg value over add value when both changes same attribute' do
|
it 'should honor chg value over add value when both changes same attribute' do
|
||||||
|
pending 'It should not be possible to add voice (in add)'
|
||||||
xml = @epp_xml.update({
|
xml = @epp_xml.update({
|
||||||
id: { value: 'FIRST0:SH8013' },
|
id: { value: 'FIRST0:SH8013' },
|
||||||
add: {
|
add: {
|
||||||
|
@ -554,7 +521,7 @@ describe 'EPP Contact', epp: true do
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:msg].should == 'Command completed successfully'
|
response[:results][0][:msg].should == 'Command completed successfully'
|
||||||
response[:results][0][:result_code].should == '1000'
|
response[:results][0][:result_code].should == '1000'
|
||||||
|
|
||||||
|
@ -585,8 +552,10 @@ describe 'EPP Contact', epp: true do
|
||||||
|
|
||||||
# TODO: Update request rem block must be analyzed
|
# TODO: Update request rem block must be analyzed
|
||||||
it 'should not allow to remove required attribute' do
|
it 'should not allow to remove required attribute' do
|
||||||
|
pending 'It should not be possible to remove or add voice (in add and rem)'
|
||||||
contact = Contact.find_by(code: 'FIRST0:SH8013')
|
contact = Contact.find_by(code: 'FIRST0:SH8013')
|
||||||
phone = contact.phone
|
phone = contact.phone
|
||||||
|
# TODO: Refactor authInfo under chg block
|
||||||
xml = @epp_xml.update({
|
xml = @epp_xml.update({
|
||||||
id: { value: 'FIRST0:SH8013' },
|
id: { value: 'FIRST0:SH8013' },
|
||||||
authInfo: { pw: { value: 'password' } },
|
authInfo: { pw: { value: 'password' } },
|
||||||
|
@ -595,7 +564,7 @@ describe 'EPP Contact', epp: true do
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:msg].should == 'Required parameter missing - phone [phone]'
|
response[:results][0][:msg].should == 'Required parameter missing - phone [phone]'
|
||||||
response[:results][0][:result_code].should == '2003'
|
response[:results][0][:result_code].should == '2003'
|
||||||
|
|
||||||
|
@ -604,6 +573,8 @@ describe 'EPP Contact', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should honor add over rem' do
|
it 'should honor add over rem' do
|
||||||
|
pending 'It should not be possible to remove or add voice (in add and rem)'
|
||||||
|
# TODO: Refactor authInfo under chg block
|
||||||
xml = @epp_xml.update({
|
xml = @epp_xml.update({
|
||||||
id: { value: 'FIRST0:SH8013' },
|
id: { value: 'FIRST0:SH8013' },
|
||||||
authInfo: { pw: { value: 'password' } },
|
authInfo: { pw: { value: 'password' } },
|
||||||
|
@ -615,7 +586,7 @@ describe 'EPP Contact', epp: true do
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:msg].should == 'Command completed successfully'
|
response[:results][0][:msg].should == 'Command completed successfully'
|
||||||
response[:results][0][:result_code].should == '1000'
|
response[:results][0][:result_code].should == '1000'
|
||||||
|
|
||||||
|
@ -626,6 +597,8 @@ describe 'EPP Contact', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should honor chg over rem' do
|
it 'should honor chg over rem' do
|
||||||
|
pending 'It should not be possible to remove or add voice (in add and rem)'
|
||||||
|
# TODO: Refactor authInfo under chg block
|
||||||
xml = @epp_xml.update({
|
xml = @epp_xml.update({
|
||||||
id: { value: 'FIRST0:SH8013' },
|
id: { value: 'FIRST0:SH8013' },
|
||||||
authInfo: { pw: { value: 'password' } },
|
authInfo: { pw: { value: 'password' } },
|
||||||
|
@ -637,7 +610,7 @@ describe 'EPP Contact', epp: true do
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:msg].should == 'Command completed successfully'
|
response[:results][0][:msg].should == 'Command completed successfully'
|
||||||
response[:results][0][:result_code].should == '1000'
|
response[:results][0][:result_code].should == '1000'
|
||||||
|
|
||||||
|
@ -648,6 +621,8 @@ describe 'EPP Contact', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should honor chg over rem and add' do
|
it 'should honor chg over rem and add' do
|
||||||
|
pending 'It should not be possible to remove or add voice (in add and rem)'
|
||||||
|
# TODO: Refactor authInfo under chg block
|
||||||
xml = @epp_xml.update({
|
xml = @epp_xml.update({
|
||||||
id: { value: 'FIRST0:SH8013' },
|
id: { value: 'FIRST0:SH8013' },
|
||||||
authInfo: { pw: { value: 'password' } },
|
authInfo: { pw: { value: 'password' } },
|
||||||
|
@ -662,7 +637,7 @@ describe 'EPP Contact', epp: true do
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:msg].should == 'Command completed successfully'
|
response[:results][0][:msg].should == 'Command completed successfully'
|
||||||
response[:results][0][:result_code].should == '1000'
|
response[:results][0][:result_code].should == '1000'
|
||||||
|
|
||||||
|
@ -673,6 +648,7 @@ describe 'EPP Contact', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should not remove password' do
|
it 'should not remove password' do
|
||||||
|
pending 'There should be no possibility to remove pw'
|
||||||
xml = @epp_xml.update({
|
xml = @epp_xml.update({
|
||||||
id: { value: 'FIRST0:SH8013' },
|
id: { value: 'FIRST0:SH8013' },
|
||||||
authInfo: { pw: { value: 'password' } },
|
authInfo: { pw: { value: 'password' } },
|
||||||
|
@ -681,7 +657,7 @@ describe 'EPP Contact', epp: true do
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:msg].should == 'Command completed successfully'
|
response[:results][0][:msg].should == 'Command completed successfully'
|
||||||
response[:results][0][:result_code].should == '1000'
|
response[:results][0][:result_code].should == '1000'
|
||||||
|
|
||||||
|
@ -690,21 +666,26 @@ describe 'EPP Contact', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should return general policy error when removing org' do
|
it 'should return general policy error when removing org' do
|
||||||
|
pending 'Test says it should throw error when removing org, it does not do it when removing it with chg block'
|
||||||
xml = @epp_xml.update({
|
xml = @epp_xml.update({
|
||||||
id: { value: 'FIRST0:SH8013' },
|
id: { value: 'FIRST0:SH8013' },
|
||||||
authInfo: { pw: { value: 'password' } },
|
chg: {
|
||||||
rem: {
|
postalInfo: {
|
||||||
postalInfo: { org: { value: 'not important' } }
|
org: { value: '' }
|
||||||
|
},
|
||||||
|
authInfo: { pw: { value: 'password' } }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:msg].should ==
|
response[:results][0][:msg].should ==
|
||||||
'Parameter value policy error. Org must be blank: postalInfo > org [org]'
|
'Parameter value policy error. Org must be blank: postalInfo > org [org]'
|
||||||
response[:results][0][:result_code].should == '2306'
|
response[:results][0][:result_code].should == '2306'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should return error when removing street' do
|
it 'should return error when removing street' do
|
||||||
|
pending 'Test says it tests removing street, but actually street is not removed'
|
||||||
|
# TODO: Refactor authInfo under chg block
|
||||||
xml = @epp_xml.update({
|
xml = @epp_xml.update({
|
||||||
id: { value: 'FIRST0:SH8013' },
|
id: { value: 'FIRST0:SH8013' },
|
||||||
authInfo: { pw: { value: 'password' } },
|
authInfo: { pw: { value: 'password' } },
|
||||||
|
@ -715,7 +696,7 @@ describe 'EPP Contact', epp: true do
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:msg].should == "Required parameter missing - name [name]"
|
response[:results][0][:msg].should == "Required parameter missing - name [name]"
|
||||||
response[:results][0][:result_code].should == '2003'
|
response[:results][0][:result_code].should == '2003'
|
||||||
end
|
end
|
||||||
|
@ -736,11 +717,10 @@ describe 'EPP Contact', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'fails if request is invalid' do
|
it 'fails if request is invalid' do
|
||||||
response = epp_plain_request(@epp_xml.delete, validate_input: false)
|
response = epp_plain_request(@epp_xml.delete)
|
||||||
|
|
||||||
response[:results][0][:msg].should ==
|
response[:results][0][:msg].should == "Element '{https://epp.tld.ee/schema/contact-eis-1.0.xsd}delete': Missing child element(s). Expected is ( {https://epp.tld.ee/schema/contact-eis-1.0.xsd}id )."
|
||||||
'Required parameter missing: delete > delete > id [id]'
|
response[:results][0][:result_code].should == '2001'
|
||||||
response[:results][0][:result_code].should == '2003'
|
|
||||||
response[:results].count.should == 1
|
response[:results].count.should == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -832,10 +812,10 @@ describe 'EPP Contact', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'fails if request is invalid' do
|
it 'fails if request is invalid' do
|
||||||
response = epp_plain_request(@epp_xml.check, validate_input: false)
|
response = epp_plain_request(@epp_xml.check)
|
||||||
|
|
||||||
response[:results][0][:msg].should == 'Required parameter missing: check > check > id [id]'
|
response[:results][0][:msg].should == "Element '{https://epp.tld.ee/schema/contact-eis-1.0.xsd}check': Missing child element(s). Expected is ( {https://epp.tld.ee/schema/contact-eis-1.0.xsd}id )."
|
||||||
response[:results][0][:result_code].should == '2003'
|
response[:results][0][:result_code].should == '2001'
|
||||||
response[:results].count.should == 1
|
response[:results].count.should == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -887,10 +867,9 @@ describe 'EPP Contact', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'fails if request invalid' do
|
it 'fails if request invalid' do
|
||||||
response = epp_plain_request(@epp_xml.info, validate_input: false)
|
response = epp_plain_request(@epp_xml.info)
|
||||||
response[:results][0][:msg].should ==
|
response[:results][0][:msg].should == "Element '{https://epp.tld.ee/schema/contact-eis-1.0.xsd}info': Missing child element(s). Expected is ( {https://epp.tld.ee/schema/contact-eis-1.0.xsd}id )."
|
||||||
'Required parameter missing: info > info > id [id]'
|
response[:results][0][:result_code].should == '2001'
|
||||||
response[:results][0][:result_code].should == '2003'
|
|
||||||
response[:results].count.should == 1
|
response[:results].count.should == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1013,7 +992,7 @@ describe 'EPP Contact', epp: true do
|
||||||
<command>
|
<command>
|
||||||
<check>
|
<check>
|
||||||
<contact:check
|
<contact:check
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:id>FIXED:CHECK-1234</contact:id>
|
<contact:id>FIXED:CHECK-1234</contact:id>
|
||||||
<contact:id>check-4321</contact:id>
|
<contact:id>check-4321</contact:id>
|
||||||
</contact:check>
|
</contact:check>
|
||||||
|
@ -1029,7 +1008,7 @@ describe 'EPP Contact', epp: true do
|
||||||
<command>
|
<command>
|
||||||
<check>
|
<check>
|
||||||
<contact:check
|
<contact:check
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:id>FIXED:CHECK-LEGACY</contact:id>
|
<contact:id>FIXED:CHECK-LEGACY</contact:id>
|
||||||
<contact:id>CID:FIXED:CHECK-LEGACY</contact:id>
|
<contact:id>CID:FIXED:CHECK-LEGACY</contact:id>
|
||||||
</contact:check>
|
</contact:check>
|
||||||
|
|
|
@ -2,7 +2,7 @@ require 'rails_helper'
|
||||||
|
|
||||||
describe 'EPP Domain', epp: true do
|
describe 'EPP Domain', epp: true do
|
||||||
before(:all) do
|
before(:all) do
|
||||||
@xsd = Nokogiri::XML::Schema(File.read('doc/schemas/domain-eis-1.0.xsd'))
|
@xsd = Nokogiri::XML::Schema(File.read('lib/schemas/domain-eis-1.0.xsd'))
|
||||||
@epp_xml = EppXml.new(cl_trid: 'ABC-12345')
|
@epp_xml = EppXml.new(cl_trid: 'ABC-12345')
|
||||||
@registrar1 = Fabricate(:registrar1, code: 'REGDOMAIN1')
|
@registrar1 = Fabricate(:registrar1, code: 'REGDOMAIN1')
|
||||||
@registrar1.credit!({ sum: 10000 })
|
@registrar1.credit!({ sum: 10000 })
|
||||||
|
@ -473,17 +473,17 @@ describe 'EPP Domain', epp: true do
|
||||||
period: { value: '1', attrs: { unit: '' } }
|
period: { value: '1', attrs: { unit: '' } }
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:msg].should == 'Attribute is invalid: unit'
|
response[:results][0][:msg].should == "Element '{https://epp.tld.ee/schema/domain-eis-1.0.xsd}period', attribute 'unit': [facet 'enumeration'] The value '' is not an element of the set {'y', 'm', 'd'}."
|
||||||
response[:results][0][:result_code].should == '2306'
|
response[:results][0][:result_code].should == '2001'
|
||||||
|
|
||||||
xml = domain_create_xml({
|
xml = domain_create_xml({
|
||||||
period: { value: '1', attrs: { unit: 'bla' } }
|
period: { value: '1', attrs: { unit: 'bla' } }
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:msg].should == 'Attribute is invalid: unit'
|
response[:results][0][:msg].should == "Element '{https://epp.tld.ee/schema/domain-eis-1.0.xsd}period', attribute 'unit': [facet 'enumeration'] The value 'bla' is not an element of the set {'y', 'm', 'd'}."
|
||||||
response[:results][0][:result_code].should == '2306'
|
response[:results][0][:result_code].should == '2001'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'creates a domain with multiple dnskeys' do
|
it 'creates a domain with multiple dnskeys' do
|
||||||
|
@ -542,7 +542,6 @@ describe 'EPP Domain', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not create a domain when dnskeys are invalid' do
|
it 'does not create a domain when dnskeys are invalid' do
|
||||||
|
|
||||||
xml = domain_create_xml({}, {
|
xml = domain_create_xml({}, {
|
||||||
_anonymus: [
|
_anonymus: [
|
||||||
{ keyData: {
|
{ keyData: {
|
||||||
|
@ -571,7 +570,40 @@ describe 'EPP Domain', epp: true do
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
|
|
||||||
|
response[:results][0][:msg].should == "Element '{urn:ietf:params:xml:ns:secDNS-1.1}pubKey': [facet 'minLength'] The value has a length of '0'; this underruns the allowed minimum length of '1'."
|
||||||
|
response[:results][1][:msg].should == "Element '{urn:ietf:params:xml:ns:secDNS-1.1}pubKey': '' is not a valid value of the atomic type '{urn:ietf:params:xml:ns:secDNS-1.1}keyType'."
|
||||||
|
|
||||||
|
xml = domain_create_xml({}, {
|
||||||
|
_anonymus: [
|
||||||
|
{ keyData: {
|
||||||
|
flags: { value: '250' },
|
||||||
|
protocol: { value: '4' },
|
||||||
|
alg: { value: '9' },
|
||||||
|
pubKey: { value: 'AwEAAddt2AkLfYGKgiEZB5SmIF8EvrjxNMH6HtxWEA4RJ9Ao6LCWheg8' }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keyData: {
|
||||||
|
flags: { value: '1' },
|
||||||
|
protocol: { value: '3' },
|
||||||
|
alg: { value: '10' },
|
||||||
|
pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keyData: {
|
||||||
|
flags: { value: '256' },
|
||||||
|
protocol: { value: '5' },
|
||||||
|
alg: { value: '254' },
|
||||||
|
pubKey: { value: 'AwEAAbuFiHS4jZL7ZQKvEPBmsbceNHTVYpEVMdxz2A6YCjlZTEoAH3qK' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
response = epp_plain_request(xml)
|
||||||
|
|
||||||
response[:results][0][:msg].should ==
|
response[:results][0][:msg].should ==
|
||||||
'Valid algorithms are: 3, 5, 6, 7, 8, 252, 253, 254, 255 [alg]'
|
'Valid algorithms are: 3, 5, 6, 7, 8, 252, 253, 254, 255 [alg]'
|
||||||
|
@ -589,10 +621,8 @@ describe 'EPP Domain', epp: true do
|
||||||
response[:results][4][:msg].should == 'Valid flags are: 0, 256, 257 [flags]'
|
response[:results][4][:msg].should == 'Valid flags are: 0, 256, 257 [flags]'
|
||||||
response[:results][4][:value].should == '1'
|
response[:results][4][:value].should == '1'
|
||||||
|
|
||||||
response[:results][5][:msg].should == 'Public key is missing [public_key]'
|
response[:results][5][:msg].should == 'Valid protocols are: 3 [protocol]'
|
||||||
|
response[:results][5][:value].should == '5'
|
||||||
response[:results][6][:msg].should == 'Valid protocols are: 3 [protocol]'
|
|
||||||
response[:results][6][:value].should == '5'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not create a domain with two identical dnskeys' do
|
it 'does not create a domain with two identical dnskeys' do
|
||||||
|
@ -805,10 +835,9 @@ describe 'EPP Domain', epp: true do
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:msg].should == 'Mutually exclusive parameters: extension > create > keyData, '\
|
response[:msg].should == "Element '{urn:ietf:params:xml:ns:secDNS-1.1}keyData': This element is not expected. Expected is ( {urn:ietf:params:xml:ns:secDNS-1.1}dsData )."
|
||||||
'extension > create > dsData'
|
response[:result_code].should == '2001'
|
||||||
response[:result_code].should == '2306'
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1475,9 +1504,9 @@ describe 'EPP Domain', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns an error for incorrect op attribute' do
|
it 'returns an error for incorrect op attribute' do
|
||||||
response = epp_plain_request(domain_transfer_xml({}, 'bla'), validate_input: false)
|
response = epp_plain_request(domain_transfer_xml({}, 'bla'))
|
||||||
response[:msg].should == 'Parameter value range error: op'
|
response[:msg].should == "Element '{urn:ietf:params:xml:ns:epp-1.0}transfer', attribute 'op': [facet 'enumeration'] The value 'bla' is not an element of the set {'approve', 'cancel', 'query', 'reject', 'request'}."
|
||||||
response[:result_code].should == '2004'
|
response[:result_code].should == '2001'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'creates new pw after successful transfer' do
|
it 'creates new pw after successful transfer' do
|
||||||
|
@ -2213,10 +2242,9 @@ describe 'EPP Domain', epp: true do
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:result_code].should == '2303'
|
response[:results][0][:msg].should == "Element '{https://epp.tld.ee/schema/domain-eis-1.0.xsd}status', attribute 's': [facet 'enumeration'] The value 'invalidStatus' is not an element of the set {'clientDeleteProhibited', 'clientHold', 'clientRenewProhibited', 'clientTransferProhibited', 'clientUpdateProhibited', 'inactive', 'ok', 'pendingCreate', 'pendingDelete', 'pendingRenew', 'pendingTransfer', 'pendingUpdate', 'serverDeleteProhibited', 'serverHold', 'serverRenewProhibited', 'serverTransferProhibited', 'serverUpdateProhibited'}."
|
||||||
response[:results][0][:msg].should == 'Status was not found'
|
response[:results][0][:result_code].should == '2001'
|
||||||
response[:results][0][:value].should == 'invalidStatus'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
### RENEW ###
|
### RENEW ###
|
||||||
|
@ -2327,9 +2355,9 @@ describe 'EPP Domain', epp: true do
|
||||||
period: { value: '1', attrs: { unit: '' } }
|
period: { value: '1', attrs: { unit: '' } }
|
||||||
)
|
)
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:msg].should == 'Attribute is invalid: unit'
|
response[:results][0][:msg].should == "Element '{https://epp.tld.ee/schema/domain-eis-1.0.xsd}period', attribute 'unit': [facet 'enumeration'] The value '' is not an element of the set {'y', 'm', 'd'}."
|
||||||
response[:results][0][:result_code].should == '2306'
|
response[:results][0][:result_code].should == '2001'
|
||||||
|
|
||||||
xml = @epp_xml.domain.renew(
|
xml = @epp_xml.domain.renew(
|
||||||
name: { value: domain.name },
|
name: { value: domain.name },
|
||||||
|
@ -2337,9 +2365,9 @@ describe 'EPP Domain', epp: true do
|
||||||
period: { value: '1', attrs: { unit: 'bla' } }
|
period: { value: '1', attrs: { unit: 'bla' } }
|
||||||
)
|
)
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:results][0][:msg].should == 'Attribute is invalid: unit'
|
response[:results][0][:msg].should == "Element '{https://epp.tld.ee/schema/domain-eis-1.0.xsd}period', attribute 'unit': [facet 'enumeration'] The value 'bla' is not an element of the set {'y', 'm', 'd'}."
|
||||||
response[:results][0][:result_code].should == '2306'
|
response[:results][0][:result_code].should == '2001'
|
||||||
|
|
||||||
Setting.days_to_renew_domain_before_expire = 90
|
Setting.days_to_renew_domain_before_expire = 90
|
||||||
end
|
end
|
||||||
|
@ -2692,9 +2720,9 @@ describe 'EPP Domain', epp: true do
|
||||||
domain.save
|
domain.save
|
||||||
|
|
||||||
xml = domain_info_xml(name: { value: domain.name, attrs: { hosts: 'invalid' } })
|
xml = domain_info_xml(name: { value: domain.name, attrs: { hosts: 'invalid' } })
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml)
|
||||||
response[:msg].should == 'Attribute is invalid: hosts'
|
response[:msg].should == "Element '{https://epp.tld.ee/schema/domain-eis-1.0.xsd}name', attribute 'hosts': [facet 'enumeration'] The value 'invalid' is not an element of the set {'all', 'del', 'none', 'sub'}."
|
||||||
response[:result_code].should == '2306'
|
response[:result_code].should == '2001'
|
||||||
|
|
||||||
xml = domain_info_xml(name: { value: domain.name, attrs: { hosts: 'sub' } })
|
xml = domain_info_xml(name: { value: domain.name, attrs: { hosts: 'sub' } })
|
||||||
response = epp_plain_request(xml)
|
response = epp_plain_request(xml)
|
||||||
|
|
|
@ -12,7 +12,7 @@ describe 'EPP Helper', epp: true do
|
||||||
<command>
|
<command>
|
||||||
<transfer op="request">
|
<transfer op="request">
|
||||||
<domain:transfer
|
<domain:transfer
|
||||||
xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd">
|
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||||
<domain:name>' + dn + '</domain:name>
|
<domain:name>' + dn + '</domain:name>
|
||||||
<domain:authInfo>
|
<domain:authInfo>
|
||||||
<domain:pw roid="citizen_1234-REP">98oiewslkfkd</domain:pw>
|
<domain:pw roid="citizen_1234-REP">98oiewslkfkd</domain:pw>
|
||||||
|
@ -32,7 +32,7 @@ describe 'EPP Helper', epp: true do
|
||||||
<command>
|
<command>
|
||||||
<transfer op="approve">
|
<transfer op="approve">
|
||||||
<domain:transfer
|
<domain:transfer
|
||||||
xmlns:domain="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/domain-eis-1.0.xsd">
|
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||||
<domain:name>one.ee</domain:name>
|
<domain:name>one.ee</domain:name>
|
||||||
<domain:authInfo>
|
<domain:authInfo>
|
||||||
<domain:pw roid="askdf">test</domain:pw>
|
<domain:pw roid="askdf">test</domain:pw>
|
||||||
|
|
|
@ -12,7 +12,7 @@ describe 'EPP Poll', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
before(:all) do
|
before(:all) do
|
||||||
@xsd = Nokogiri::XML::Schema(File.read('doc/schemas/epp-1.0.xsd'))
|
@xsd = Nokogiri::XML::Schema(File.read('lib/schemas/epp-1.0.xsd'))
|
||||||
Fabricate(:api_user, username: 'registrar1', registrar: registrar1)
|
Fabricate(:api_user, username: 'registrar1', registrar: registrar1)
|
||||||
Fabricate(:api_user, username: 'registrar2', registrar: registrar2)
|
Fabricate(:api_user, username: 'registrar2', registrar: registrar2)
|
||||||
|
|
||||||
|
@ -87,8 +87,8 @@ describe 'EPP Poll', epp: true do
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, validate_input: false)
|
response = epp_plain_request(xml, validate_input: false)
|
||||||
response[:msg].should == 'Parameter value range error: op'
|
response[:msg].should == "Element '{urn:ietf:params:xml:ns:epp-1.0}poll', attribute 'op': [facet 'enumeration'] The value 'bla' is not an element of the set {'ack', 'req'}."
|
||||||
response[:result_code].should == '2004'
|
response[:result_code].should == '2001'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'dequeues multiple messages' do
|
it 'dequeues multiple messages' do
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<create>
|
<create>
|
||||||
<contact:create
|
<contact:create
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:id>loc_int</contact:id>
|
<contact:id>loc_int</contact:id>
|
||||||
<contact:postalInfo type="int">
|
<contact:postalInfo type="int">
|
||||||
<contact:name>John Doe Int</contact:name>
|
<contact:name>John Doe Int</contact:name>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<delete>
|
<delete>
|
||||||
<contact:delete
|
<contact:delete
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:id>dwa1234</contact:id>
|
<contact:id>dwa1234</contact:id>
|
||||||
</contact:delete>
|
</contact:delete>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<delete>
|
<delete>
|
||||||
<contact:delete
|
<contact:delete
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
</contact:delete>
|
</contact:delete>
|
||||||
</delete>
|
</delete>
|
||||||
<clTRID>ABC-12345</clTRID>
|
<clTRID>ABC-12345</clTRID>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<info>
|
<info>
|
||||||
<contact:info
|
<contact:info
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:id>info-4444</contact:id>
|
<contact:id>info-4444</contact:id>
|
||||||
<contact:authInfo>
|
<contact:authInfo>
|
||||||
<contact:pw>2fooBAR</contact:pw>
|
<contact:pw>2fooBAR</contact:pw>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<info>
|
<info>
|
||||||
<contact:info
|
<contact:info
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
</contact:info>
|
</contact:info>
|
||||||
</info>
|
</info>
|
||||||
<clTRID>ABC-12345</clTRID>
|
<clTRID>ABC-12345</clTRID>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<update>
|
<update>
|
||||||
<contact:update
|
<contact:update
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:id>sh8013</contact:id>
|
<contact:id>sh8013</contact:id>
|
||||||
<contact:chg>
|
<contact:chg>
|
||||||
<contact:postalInfo type="int">
|
<contact:postalInfo type="int">
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<update>
|
<update>
|
||||||
<contact:update
|
<contact:update
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
</contact:update>
|
</contact:update>
|
||||||
</update>
|
</update>
|
||||||
<clTRID>ABC-12345</clTRID>
|
<clTRID>ABC-12345</clTRID>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<command>
|
<command>
|
||||||
<update>
|
<update>
|
||||||
<contact:update
|
<contact:update
|
||||||
xmlns:contact="https://raw.githubusercontent.com/internetee/registry/alpha/doc/schemas/contact-eis-1.0.xsd">
|
xmlns:contact="https://epp.tld.ee/schema/contact-eis-1.0.xsd">
|
||||||
<contact:id>sh8013</contact:id>
|
<contact:id>sh8013</contact:id>
|
||||||
<contact:chg>
|
<contact:chg>
|
||||||
<contact:voice x="1234">123456798</contact:voice>
|
<contact:voice x="1234">123456798</contact:voice>
|
||||||
|
|
|
@ -5,7 +5,7 @@ describe 'EPP Session', epp: true do
|
||||||
@api_user = Fabricate(:gitlab_api_user)
|
@api_user = Fabricate(:gitlab_api_user)
|
||||||
@epp_xml = EppXml.new(cl_trid: 'ABC-12345')
|
@epp_xml = EppXml.new(cl_trid: 'ABC-12345')
|
||||||
@login_xml_cache = @epp_xml.session.login(clID: { value: 'gitlab' }, pw: { value: 'ghyt9e4fu' })
|
@login_xml_cache = @epp_xml.session.login(clID: { value: 'gitlab' }, pw: { value: 'ghyt9e4fu' })
|
||||||
@xsd = Nokogiri::XML::Schema(File.read('doc/schemas/epp-1.0.xsd'))
|
@xsd = Nokogiri::XML::Schema(File.read('lib/schemas/epp-1.0.xsd'))
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when not connected' do
|
context 'when not connected' do
|
||||||
|
@ -51,7 +51,7 @@ describe 'EPP Session', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'prohibits further actions unless logged in' do
|
it 'prohibits further actions unless logged in' do
|
||||||
@xsd = Nokogiri::XML::Schema(File.read('doc/schemas/domain-eis-1.0.xsd'))
|
@xsd = Nokogiri::XML::Schema(File.read('lib/schemas/domain-eis-1.0.xsd'))
|
||||||
response = epp_plain_request(@epp_xml.domain.info(name: { value: 'test.ee' }))
|
response = epp_plain_request(@epp_xml.domain.info(name: { value: 'test.ee' }))
|
||||||
response[:msg].should == 'You need to login first.'
|
response[:msg].should == 'You need to login first.'
|
||||||
response[:result_code].should == '2002'
|
response[:result_code].should == '2002'
|
||||||
|
@ -142,8 +142,8 @@ describe 'EPP Session', epp: true do
|
||||||
newPW: { value: '' }
|
newPW: { value: '' }
|
||||||
), validate_input: false)
|
), validate_input: false)
|
||||||
|
|
||||||
response[:msg].should == 'Password is missing [password]'
|
response[:msg].should == "Element '{urn:ietf:params:xml:ns:epp-1.0}newPW': [facet 'minLength'] The value has a length of '0'; this underruns the allowed minimum length of '6'."
|
||||||
response[:result_code].should == '2306'
|
response[:result_code].should == '2001'
|
||||||
|
|
||||||
@api_user.reload
|
@api_user.reload
|
||||||
@api_user.password.should == 'ghyt9e4fu'
|
@api_user.password.should == 'ghyt9e4fu'
|
||||||
|
|
|
@ -45,7 +45,13 @@ feature 'Contact', type: :feature do
|
||||||
visit '/registrar/contacts/new'
|
visit '/registrar/contacts/new'
|
||||||
current_path.should == '/registrar/contacts/new'
|
current_path.should == '/registrar/contacts/new'
|
||||||
|
|
||||||
fill_in 'depp_contact_ident', with: 'bic-ident'
|
fill_in 'depp_contact_ident', with: ''
|
||||||
|
fill_in 'depp_contact_name', with: 'Business Name Ltd'
|
||||||
|
fill_in 'depp_contact_email', with: 'example@example.com'
|
||||||
|
fill_in 'depp_contact_street', with: 'Example street 12'
|
||||||
|
fill_in 'depp_contact_city', with: 'Example City'
|
||||||
|
fill_in 'depp_contact_zip', with: '123456'
|
||||||
|
fill_in 'depp_contact_phone', with: '+372.12345678'
|
||||||
click_button 'Create'
|
click_button 'Create'
|
||||||
|
|
||||||
current_path.should == '/registrar/contacts'
|
current_path.should == '/registrar/contacts'
|
||||||
|
|
|
@ -12,6 +12,7 @@ describe ApiUser do
|
||||||
@api_user.valid?
|
@api_user.valid?
|
||||||
@api_user.errors.full_messages.should match_array([
|
@api_user.errors.full_messages.should match_array([
|
||||||
"Password Password is missing",
|
"Password Password is missing",
|
||||||
|
"Password is too short (minimum is 6 characters)",
|
||||||
"Registrar Registrar is missing",
|
"Registrar Registrar is missing",
|
||||||
"Username Username is missing",
|
"Username Username is missing",
|
||||||
"Roles is missing"
|
"Roles is missing"
|
||||||
|
|
|
@ -67,15 +67,15 @@ module Epp
|
||||||
|
|
||||||
def epp_plain_request(data, *args)
|
def epp_plain_request(data, *args)
|
||||||
options = args.extract_options!
|
options = args.extract_options!
|
||||||
validate_input = options[:validate_input] != false # true by default
|
# validate_input = options[:validate_input] != false # true by default
|
||||||
validate_output = options[:validate_output] != false # true by default
|
validate_output = options[:validate_output] != false # true by default
|
||||||
|
|
||||||
if validate_input && @xsd
|
# if validate_input && @xsd
|
||||||
xml = Nokogiri::XML(data)
|
# xml = Nokogiri::XML(data)
|
||||||
@xsd.validate(xml).each do |error|
|
# @xsd.validate(xml).each do |error|
|
||||||
fail Exception.new, error.to_s
|
# fail Exception.new, error.to_s
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|
||||||
res = parse_response(server.send_request(data))
|
res = parse_response(server.send_request(data))
|
||||||
if res
|
if res
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue