mirror of
https://github.com/google/nomulus.git
synced 2025-07-01 08:43:34 +02:00
Remove the web console EPP endpoint
This removes the "create Domain/Host/Contact" forms that were supposed to be used instead of regular EPPs for CC-TLD that wanted to support it. We're removing it because we don't use it and want to reduce unneeded code for the registry 3.0 migration. Also, this is a security risk, as it allowed to do "billable actions" (creating a new domain for example) with the only authentication being access to the registrar's G Suite account. This bypassed the certificate, IP whitelist, and EPP password, which is bad. PUBLIC: Remove the web console EPP endpoint This removes the "create Domain/Host/Contact" forms that were supposed to be used instead of regular EPPs for CC-TLD that wanted to support it. We're removing it because we don't use it and want to reduce unneeded code for the registry 3.0 migration. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=236244195
This commit is contained in:
parent
f12d368da3
commit
dfad79759e
52 changed files with 58 additions and 3788 deletions
|
@ -1,177 +0,0 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
{namespace registry.soy.registrar.contact}
|
||||
|
||||
|
||||
/**
|
||||
* Set view for contacts.
|
||||
*/
|
||||
{template .set}
|
||||
<div class="{css('set')} {css('contact')}">
|
||||
<p>Please enter a query for a single contact in the form "contact/[contact id]".
|
||||
</div>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Item view for contact.
|
||||
*/
|
||||
{template .item}
|
||||
{@param? item: ?}
|
||||
{@param? readonly: ?} /** passed through to field rendering. */
|
||||
<form name="item" class="{css('item')} {css('contact')}">
|
||||
<h1>
|
||||
{if isNonnull($item['contact:id'])}
|
||||
{$item['contact:id']['keyValue']}
|
||||
{else}
|
||||
New Contact
|
||||
{/if}
|
||||
</h1>
|
||||
<table>
|
||||
<tr class="{css('section-lead')}">
|
||||
<th colspan="2"><h2>Authentication</h2></th>
|
||||
</tr>
|
||||
{if not isNonnull($item['contact:id'])}
|
||||
{call registry.soy.forms.inputFieldRow data="all"}
|
||||
{param label: 'Contact ID *' /}
|
||||
{param name: 'contact:id' /}
|
||||
{/call}
|
||||
{/if}
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Password *' /}
|
||||
{param name: 'contact:authInfo.contact:pw' /}
|
||||
{param value: isNonnull($item['contact:authInfo']) ?
|
||||
$item['contact:authInfo']['contact:pw'] : '' /}
|
||||
{/call}
|
||||
<tr class="{css('section-lead')}">
|
||||
<th colspan="2"><h2>Contacts</h2></th>
|
||||
</tr>
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Email *' /}
|
||||
{param name: 'contact:email' /}
|
||||
{param value: $item['contact:email'] /}
|
||||
{/call}
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Phone' /}
|
||||
{param name: 'contact:voice' /}
|
||||
{param value: $item['contact:voice'] /}
|
||||
{param placeholder: 'e.g. +1.6508675309' /}
|
||||
{/call}
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Fax' /}
|
||||
{param name: 'contact:fax' /}
|
||||
{param value: $item['contact:fax'] /}
|
||||
{param placeholder: 'e.g. +1.2125552638' /}
|
||||
{/call}
|
||||
<tr class="{css('section-lead')} {css('subsection')}">
|
||||
<th id="contact-postalInfoHeader" colspan="2">
|
||||
<h3>Postal address(es)</h3>
|
||||
<button id="domain-contact-postalInfo-add-button" type="button"
|
||||
class="{css('kd-button')} {css('reg-add')}"
|
||||
{if $readonly}disabled{/if}>
|
||||
Add Localized Address
|
||||
</button>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div id="contact-postalInfo">
|
||||
{if isNonnull($item['contact:postalInfo'])}
|
||||
{for $pi in $item['contact:postalInfo']}
|
||||
{call .postalInfo data="all"}
|
||||
{param localized: index($pi) == 1 /}
|
||||
{param item: $pi/}
|
||||
{param namePrefix: 'contact:postalInfo[' + index($pi) + '].contact:' /}
|
||||
{/call}
|
||||
{/for}
|
||||
{else}
|
||||
{call .postalInfo data="all"}
|
||||
{param namePrefix: 'contact:postalInfo[0].contact:' /}
|
||||
{/call}
|
||||
{/if}
|
||||
<table id="domain-contact-postalInfos-footer"></table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{if isNonnull($item['contact:id'])}
|
||||
<input type="hidden" name="contact:id" value="{$item['contact:id']['keyValue']}"/>
|
||||
{/if}
|
||||
</form>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Postal info.
|
||||
*/
|
||||
{template .postalInfo}
|
||||
{@param item: ?}
|
||||
{@param namePrefix: ?}
|
||||
{@param? localized: ?} /** if true, this is the second, localized postalInfo. */
|
||||
<table>
|
||||
<tr><th colspan=2>
|
||||
{if $localized}
|
||||
<strong>Localized address</strong><br>
|
||||
<span class="{css('info')}">Full UTF-8 charsets allowed</span>
|
||||
{else}
|
||||
<strong>Internationalized address</strong><br>
|
||||
<span class="{css('info')}">Only 7-bit ASCII allowed</span>
|
||||
{/if}
|
||||
</th></tr>
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Name *' /}
|
||||
{param name: 'name' /}
|
||||
{param value: $item['contact:name']/}
|
||||
{/call}
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Organization' /}
|
||||
{param name: 'org' /}
|
||||
{param value: $item['contact:org'] /}
|
||||
{/call}
|
||||
{call registry.soy.forms.textareaFieldRowWithValue data="all"}
|
||||
{param label: 'Street' /}
|
||||
{param name: 'street' /}
|
||||
{param namePrefix: $namePrefix + 'addr.contact:' /}
|
||||
{param value: isNonnull($item['contact:addr']) ? $item['contact:addr']['contact:street'] : '' /}
|
||||
{/call}
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'City *' /}
|
||||
{param name: 'city' /}
|
||||
{param namePrefix: $namePrefix + 'addr.contact:' /}
|
||||
{param value: isNonnull($item['contact:addr']) ? $item['contact:addr']['contact:city'] : '' /}
|
||||
{/call}
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'State / Region' /}
|
||||
{param name: 'sp' /}
|
||||
{param namePrefix: $namePrefix + 'addr.contact:' /}
|
||||
{param value: isNonnull($item['contact:addr']) ? $item['contact:addr']['contact:sp'] : '' /}
|
||||
{param placeholder: 'e.g. CA' /}
|
||||
{/call}
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Zip / Postal code' /}
|
||||
{param name: 'pc' /}
|
||||
{param namePrefix: $namePrefix + 'addr.contact:' /}
|
||||
{param value: isNonnull($item['contact:addr']) ? $item['contact:addr']['contact:pc'] : '' /}
|
||||
{param placeholder: 'e.g. 10282' /}
|
||||
{/call}
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Country code *' /}
|
||||
{param name: 'cc' /}
|
||||
{param namePrefix: $namePrefix + 'addr.contact:' /}
|
||||
{param value: isNonnull($item['contact:addr']) ? $item['contact:addr']['contact:cc'] : '' /}
|
||||
{param placeholder: 'e.g. US' /}
|
||||
{/call}
|
||||
</table>
|
||||
{/template}
|
|
@ -1,118 +0,0 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
{namespace registry.soy.registrar.contactepp}
|
||||
|
||||
|
||||
/* XXX: Forces first postalInfo type to be "int" and second "loc" if it is
|
||||
* present, for compatibility with the server. */
|
||||
/**
|
||||
* Contact create request.
|
||||
*/
|
||||
{template .create stricthtml="false"}
|
||||
{@param item: ?}
|
||||
{@param clTrid: ?}
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<contact:create xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
|
||||
<contact:id>{$item['contact:id']}</contact:id>
|
||||
{for $pi in $item['contact:postalInfo']}
|
||||
<contact:postalInfo type="{if index($pi) == 0}int{else}loc{/if}">
|
||||
<contact:name>{$pi['contact:name']}</contact:name>
|
||||
<contact:org>{$pi['contact:org']}</contact:org>
|
||||
<contact:addr>
|
||||
{let $addr: $pi['contact:addr'] /}
|
||||
<contact:street>{$addr['contact:street']}</contact:street>
|
||||
<contact:city>{$addr['contact:city']}</contact:city>
|
||||
<contact:sp>{$addr['contact:sp']}</contact:sp>
|
||||
<contact:pc>{$addr['contact:pc']}</contact:pc>
|
||||
<contact:cc>{$addr['contact:cc']}</contact:cc>
|
||||
</contact:addr>
|
||||
</contact:postalInfo>
|
||||
{/for}
|
||||
<contact:voice>{$item['contact:voice']}</contact:voice>
|
||||
<contact:fax>{$item['contact:fax']}</contact:fax>
|
||||
<contact:email>{$item['contact:email']}</contact:email>
|
||||
<contact:authInfo>
|
||||
<contact:pw>{$item['contact:authInfo']['contact:pw']}</contact:pw>
|
||||
</contact:authInfo>
|
||||
</contact:create>
|
||||
</create>
|
||||
<clTRID>{$clTrid}</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
{/template}
|
||||
|
||||
|
||||
/* XXX: Forces first postalInfo type to be "int" and second "loc" if it is
|
||||
* present, for compatibility with the server. */
|
||||
/**
|
||||
* Contact update request.
|
||||
*/
|
||||
{template .update stricthtml="false"}
|
||||
{@param item: ?}
|
||||
{@param clTrid: ?}
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<update>
|
||||
<contact:update xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
|
||||
<contact:id>{$item['contact:id']}</contact:id>
|
||||
<contact:chg>
|
||||
{for $pi in $item['contact:postalInfo']}
|
||||
<contact:postalInfo type="{if index($pi) == 0}int{else}loc{/if}">
|
||||
<contact:name>{$pi['contact:name']}</contact:name>
|
||||
<contact:org>{$pi['contact:org']}</contact:org>
|
||||
{let $addr: $pi['contact:addr'] /}
|
||||
<contact:addr>
|
||||
<contact:street>{$addr['contact:street']}</contact:street>
|
||||
<contact:city>{$addr['contact:city']}</contact:city>
|
||||
<contact:sp>{$addr['contact:sp']}</contact:sp>
|
||||
<contact:pc>{$addr['contact:pc']}</contact:pc>
|
||||
<contact:cc>{$addr['contact:cc']}</contact:cc>
|
||||
</contact:addr>
|
||||
</contact:postalInfo>
|
||||
{/for}
|
||||
<contact:voice>{$item['contact:voice']}</contact:voice>
|
||||
<contact:fax>{$item['contact:fax']}</contact:fax>
|
||||
<contact:email>{$item['contact:email']}</contact:email>
|
||||
<contact:authInfo>
|
||||
<contact:pw>{$item['contact:authInfo']['contact:pw']}</contact:pw>
|
||||
</contact:authInfo>
|
||||
</contact:chg>
|
||||
</contact:update>
|
||||
</update>
|
||||
<clTRID>{$clTrid}</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Contact info request.
|
||||
*/
|
||||
{template .info stricthtml="false"}
|
||||
{@param id: ?}
|
||||
{@param clTrid: ?}
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<info>
|
||||
<contact:info xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
|
||||
<contact:id>{$id}</contact:id>
|
||||
</contact:info>
|
||||
</info>
|
||||
<clTRID>{$clTrid}</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
{/template}
|
|
@ -1,200 +0,0 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
{namespace registry.soy.registrar.domain}
|
||||
|
||||
|
||||
/**
|
||||
* Set view for domains.
|
||||
*/
|
||||
{template .set}
|
||||
<div class="{css('set')} {css('domain')}">
|
||||
<p>Please enter a query for a single contact in the form "domain/[domain id]".
|
||||
</div>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Item view for domain.
|
||||
*/
|
||||
{template .item}
|
||||
{@param item: ?}
|
||||
{@param? readonly: ?} /** passed through to field rendering. */
|
||||
{let $isEdit: isNonnull($item['domain:name']) /}
|
||||
<form name="item" class="{css('item')} {css('domain')}">
|
||||
<h1>
|
||||
{if $isEdit}
|
||||
{$item['domain:name']['keyValue']}
|
||||
{else}
|
||||
New Domain
|
||||
{/if}
|
||||
</h1>
|
||||
<table>
|
||||
{if not $isEdit}
|
||||
<tr class="{css('section-lead')}">
|
||||
<th colspan="2"><h2>Domain</h2></th>
|
||||
</tr>
|
||||
{call registry.soy.forms.inputFieldRow data="all"}
|
||||
{param label: 'Domain name *' /}
|
||||
{param name: 'domain:name' /}
|
||||
{/call}
|
||||
{call registry.soy.forms.inputFieldRow data="all"}
|
||||
{param label: 'Period (in years) *' /}
|
||||
{param name: 'domain:period' /}
|
||||
{/call}
|
||||
{/if}
|
||||
{if isNonnull($item['domain:exDate'])}
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Expiration date' /}
|
||||
{param name: 'domain:exDate' /}
|
||||
{param value: $item['domain:exDate'] /}
|
||||
{/call}
|
||||
{/if}
|
||||
<tr class="{css('section-lead')}">
|
||||
<th colspan="2"><h2>Authentication</h2></th>
|
||||
</tr>
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Password *' /}
|
||||
{param name: 'domain:authInfo.domain:pw' /}
|
||||
{param value: isNonnull($item['domain:authInfo']) ?
|
||||
$item['domain:authInfo']['domain:pw'] : '' /}
|
||||
{/call}
|
||||
<tr class="{css('section-lead')}">
|
||||
<th colspan="2">
|
||||
<h3>Contact information</h3>
|
||||
<button id="domain-contact-add-button" type="button"
|
||||
class="{css('kd-button')} {css('reg-add')}"
|
||||
{if $readonly}disabled{/if}>
|
||||
Add Contact
|
||||
</button>
|
||||
</th>
|
||||
</tr>
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Registrant *' /}
|
||||
{param name: 'domain:registrant' /}
|
||||
{param value: $item['domain:registrant'] /}
|
||||
{/call}
|
||||
{if isNonnull($item['domain:contact'])}
|
||||
// Render contact list with stable ordering for the screenshot tests.
|
||||
{call .showContact_ data="all"}
|
||||
{param contacts: $item['domain:contact'] /}
|
||||
{param type: 'admin' /}
|
||||
{/call}
|
||||
{call .showContact_ data="all"}
|
||||
{param contacts: $item['domain:contact'] /}
|
||||
{param type: 'billing' /}
|
||||
{/call}
|
||||
{call .showContact_ data="all"}
|
||||
{param contacts: $item['domain:contact'] /}
|
||||
{param type: 'tech' /}
|
||||
{/call}
|
||||
{/if}
|
||||
<tr id="domain-contacts-footer"></tr>
|
||||
<tr class="{css('section-lead')}">
|
||||
<th colspan="2">
|
||||
<h3>Nameservers</h3>
|
||||
<button id="domain-host-add-button" type="button"
|
||||
class="{css('kd-button')} {css('reg-add')}"
|
||||
{if $readonly}disabled{/if}>
|
||||
Add Host
|
||||
</button>
|
||||
</th>
|
||||
</tr>
|
||||
{if isNonnull($item['domain:ns']) and isNonnull($item['domain:ns']['domain:hostObj'])}
|
||||
{for $hostObj in $item['domain:ns']['domain:hostObj']}
|
||||
{let $hostIdx: index($hostObj) /}
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Host ' + $hostIdx /}
|
||||
{param name: 'domain:ns.domain:hostObj[' + $hostIdx + '].value' /}
|
||||
{param value: $hostObj /}
|
||||
{param clazz kind="text"}{css('domain-hostObj')}{/param}
|
||||
{/call}
|
||||
{/for}
|
||||
{/if}
|
||||
<tr id="domain-hosts-footer"></tr>
|
||||
|
||||
{if isNonnull($item['mark:mark'])}
|
||||
<tr>
|
||||
<td>Mark Data
|
||||
<td>
|
||||
<textarea
|
||||
class="{css('reg-domain-mark')}"
|
||||
spellcheck="false"
|
||||
{if $readonly}readonly{/if}>
|
||||
{$item['mark:mark']['keyValue']}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
{if $isEdit}
|
||||
<input type="hidden"
|
||||
name="domain:name"
|
||||
value="{$item['domain:name']['keyValue']}">
|
||||
{/if}
|
||||
</form>
|
||||
{/template}
|
||||
|
||||
|
||||
/** Renders an input form row for a specific type of contact. */
|
||||
{template .showContact_ visibility="private"}
|
||||
{@param contacts: list<legacy_object_map<string, ?>>} /** List of EPP domain:contacts. */
|
||||
{@param type: string} /** Type of contact (e.g. admin, tech) */
|
||||
{for $contact in $contacts}
|
||||
{if $type == $contact['@type']}
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: $contact['@type'] + ' contact' /}
|
||||
{param name: 'domain:contact[' + index($contact) + '].value' /}
|
||||
{param value: $contact /}
|
||||
{param clazz: 'domain-contact' /}
|
||||
{/call}
|
||||
<input name="domain:contact[{index($contact)}].@type"
|
||||
type="hidden"
|
||||
value="{$contact['@type']}">
|
||||
{/if}
|
||||
{/for}
|
||||
{/template}
|
||||
|
||||
|
||||
/* XXX: Should change support for admin/tech. */
|
||||
/**
|
||||
* Update domain.
|
||||
*/
|
||||
{template .update}
|
||||
{@param? item: ?}
|
||||
<form name="item" class="{css('item')} {css('domain')}">
|
||||
<h1>{$item['domain:name']['keyValue']}</h1>
|
||||
<table>
|
||||
<tr class="{css('section-lead')}">
|
||||
<th colspan="2"><h2>Contact</h2></th>
|
||||
</tr>
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Registrant' /}
|
||||
{param name: 'domain:registrant' /}
|
||||
{param value: $item['domain:registrant'] /}
|
||||
{/call}
|
||||
<tr class="{css('section-lead')}">
|
||||
<th colspan="2"><h2>Authentication</h2></th>
|
||||
</tr>
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Password' /}
|
||||
{param name: 'domain:authInfo.domain:pw' /}
|
||||
{param value: isNonnull($item['domain:authInfo']) ?
|
||||
$item['domain:authInfo']['domain:pw'] : '' /}
|
||||
{/call}
|
||||
<input type="hidden"
|
||||
name="domain:name"
|
||||
value="{$item['domain:name']['keyValue']}">
|
||||
</table>
|
||||
</form>
|
||||
{/template}
|
|
@ -1,140 +0,0 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
{namespace registry.soy.registrar.domainepp}
|
||||
|
||||
|
||||
/* General Availability. */
|
||||
/**
|
||||
* Domain create request.
|
||||
*/
|
||||
{template .create stricthtml="false"}
|
||||
{@param item: ?}
|
||||
{@param clTrid: ?}
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>{$item['domain:name']}</domain:name>
|
||||
{if isNonnull($item['domain:period'])}
|
||||
<domain:period unit="y">{$item['domain:period']}</domain:period>
|
||||
{/if}
|
||||
{if isNonnull($item['domain:ns'])}
|
||||
<domain:ns>
|
||||
{for $hostObj in $item['domain:ns']['domain:hostObj']}
|
||||
<domain:hostObj>{$hostObj.value}</domain:hostObj>
|
||||
{/for}
|
||||
</domain:ns>
|
||||
{/if}
|
||||
{if isNonnull($item['domain:registrant'])}
|
||||
<domain:registrant>{$item['domain:registrant']}</domain:registrant>
|
||||
{/if}
|
||||
{if isNonnull($item['domain:contact'])}
|
||||
{for $contact in $item['domain:contact']}
|
||||
<domain:contact type="{$contact['@type']}">{$contact.value}</domain:contact>
|
||||
{/for}
|
||||
{/if}
|
||||
<domain:authInfo>
|
||||
<domain:pw>{$item['domain:authInfo']['domain:pw']}</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<clTRID>{$clTrid}</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Domain info request.
|
||||
*/
|
||||
{template .info stricthtml="false"}
|
||||
{@param id: ?}
|
||||
{@param clTrid: ?}
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<info>
|
||||
<domain:info xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name hosts="all">{$id}</domain:name>
|
||||
</domain:info>
|
||||
</info>
|
||||
<clTRID>{$clTrid}</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Domain update request.
|
||||
*/
|
||||
{template .update stricthtml="false"}
|
||||
{@param item: ?}
|
||||
{@param clTrid: ?}
|
||||
{@param? addHosts: ?} /** list of hostObj to add. */
|
||||
{@param? remHosts: ?} /** list of hostObj to remove. */
|
||||
{@param? addContacts: ?} /** list of contact to add. */
|
||||
{@param? remContacts: ?} /** list of contact to remove. */
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<update>
|
||||
<domain:update xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>{$item['domain:name']}</domain:name>
|
||||
{if isNonnull($addHosts) or isNonnull($addContacts)}
|
||||
{call .addRem}
|
||||
{param isAdd: true /}
|
||||
{param hosts: $addHosts /}
|
||||
{param contacts: $addContacts /}
|
||||
{/call}
|
||||
{/if}
|
||||
{if isNonnull($remHosts) or isNonnull($remContacts)}
|
||||
{call .addRem}
|
||||
{param isAdd: false /}
|
||||
{param hosts: $remHosts /}
|
||||
{param contacts: $remContacts /}
|
||||
{/call}
|
||||
{/if}
|
||||
<domain:chg>
|
||||
<domain:registrant>{$item['domain:registrant']}</domain:registrant>
|
||||
<domain:authInfo>
|
||||
<domain:pw>{$item['domain:authInfo']['domain:pw']}</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:chg>
|
||||
</domain:update>
|
||||
</update>
|
||||
<clTRID>{$clTrid}</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
{/template}
|
||||
|
||||
|
||||
{template .addRem}
|
||||
{@param isAdd: ?}
|
||||
{@param? hosts: ?}
|
||||
{@param? contacts: ?}
|
||||
{let $tagName: $isAdd ? 'domain:add' : 'domain:rem' /}
|
||||
<{$tagName}>
|
||||
{if isNonnull($hosts)}
|
||||
<domain:ns>
|
||||
{for $host in $hosts}
|
||||
<domain:hostObj>{$host.value}</domain:hostObj>
|
||||
{/for}
|
||||
</domain:ns>
|
||||
{/if}
|
||||
{if isNonnull($contacts)}
|
||||
{for $contact in $contacts}
|
||||
<domain:contact type="{$contact['@type']}">{$contact.value}</domain:contact>
|
||||
{/for}
|
||||
{/if}
|
||||
</{$tagName}>
|
||||
{/template}
|
|
@ -1,57 +0,0 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
{namespace registry.soy.registrar.epp}
|
||||
|
||||
|
||||
/**
|
||||
* Login request.
|
||||
* @param clId
|
||||
* @param pw
|
||||
* @param clTrid
|
||||
*/
|
||||
{template .login stricthtml="false"}
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<login>
|
||||
<clID>{$clId}</clID>
|
||||
<pw>{$pw}</pw>
|
||||
<options>
|
||||
<version>1.0</version>
|
||||
<lang>en</lang>
|
||||
</options>
|
||||
<svcs>
|
||||
<objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
|
||||
<objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
|
||||
<objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
|
||||
</svcs>
|
||||
</login>
|
||||
<clTRID>{$clTrid}</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Logout request.
|
||||
* @param clTrid
|
||||
*/
|
||||
{template .logout stricthtml="false"}
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<logout/>
|
||||
<clTRID>{$clTrid}</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
{/template}
|
|
@ -1,108 +0,0 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
{namespace registry.soy.registrar.host}
|
||||
|
||||
|
||||
/**
|
||||
* Set view for hosts.
|
||||
*/
|
||||
{template .set}
|
||||
<div class="{css('set')} {css('host')}">
|
||||
<p>Please enter a query for a single host in the form "host/[hostname]".
|
||||
</div>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Item view for host.
|
||||
* @param? item
|
||||
* @param? readonly passed through to field rendering.
|
||||
*/
|
||||
{template .item}
|
||||
<form name="item" class="{css('item')} {css('host')}">
|
||||
<h1>
|
||||
{if isNonnull($item['host:name'])}
|
||||
{$item['host:name']['keyValue']}
|
||||
{else}
|
||||
New Host
|
||||
{/if}
|
||||
</h1>
|
||||
<table>
|
||||
<tr class="{css('section-lead')}">
|
||||
<th colspan="2"><h2>Host</h2></th>
|
||||
</tr>
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Name *' /}
|
||||
{param name: isNonnull($item['host:name']) ? 'host:chgName' : 'host:name' /}
|
||||
{param value: $item['host:name'] /}
|
||||
{/call}
|
||||
<tr class="{css('section-lead')}">
|
||||
<th colspan="2">
|
||||
<h3>Addresses</h3>
|
||||
<button id="domain-host-addr-add-button" type="button"
|
||||
class="{css('kd-button')} {css('reg-add')}"
|
||||
{if $readonly}disabled{/if}>
|
||||
Add Address
|
||||
</button>
|
||||
</th>
|
||||
</tr>
|
||||
{if isNonnull($item['host:addr'])}
|
||||
{for $addr in $item['host:addr']}
|
||||
{if not $readonly}
|
||||
<input type="hidden"
|
||||
name="host:oldAddr[{index($addr)}].value"
|
||||
value="{$item['host:addr'][index($addr)]['keyValue']}">
|
||||
{/if}
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Address No. ' + (index($addr) + 1) /}
|
||||
{param name: 'host:addr[' + index($addr) + '].value' /}
|
||||
{param value: $item['host:addr'][index($addr)] /}
|
||||
{/call}
|
||||
{/for}
|
||||
{/if}
|
||||
<tr id="domain-host-addrs-footer"></tr>
|
||||
</table>
|
||||
{if isNonnull($item['host:name'])}
|
||||
<input type="hidden"
|
||||
name="host:name"
|
||||
value="{$item['host:name']['keyValue']}">
|
||||
{/if}
|
||||
</form>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Item view for host.
|
||||
* @param? item
|
||||
* @param? readonly passed through to field rendering.
|
||||
*/
|
||||
{template .update}
|
||||
<form name="item" class="{css('item')} {css('host')}">
|
||||
<h1>{$item['host:name']['keyValue']}</h1>
|
||||
<table>
|
||||
<tr class="{css('section-lead')}">
|
||||
<th colspan="2"><h2>Host</h2></th>
|
||||
</tr>
|
||||
{call registry.soy.forms.inputFieldRowWithValue data="all"}
|
||||
{param label: 'Name' /}
|
||||
{param name: 'host:chgName' /}
|
||||
{param value: $item['host:name'] /}
|
||||
{/call}
|
||||
</table>
|
||||
{if isNonnull($item['host:name'])}
|
||||
<input type="hidden" name="host:name" value="{$item['host:name']['keyValue']}">
|
||||
{/if}
|
||||
</form>
|
||||
{/template}
|
|
@ -1,108 +0,0 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
{namespace registry.soy.registrar.hostepp}
|
||||
|
||||
|
||||
/**
|
||||
* Host create request.
|
||||
*/
|
||||
{template .create stricthtml="false"}
|
||||
{@param item: ?}
|
||||
{@param clTrid: ?}
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<host:create xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>{$item['host:name']}</host:name>
|
||||
{if isNonnull($item['host:addr'])}
|
||||
{for $addr in $item['host:addr']}
|
||||
{let $type: strContains($addr['value'], ':') ? 'v6' : 'v4' /}
|
||||
<host:addr ip="{$type}">{$addr['value']}</host:addr>
|
||||
{/for}
|
||||
{/if}
|
||||
</host:create>
|
||||
</create>
|
||||
<clTRID>{$clTrid}</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Host update request.
|
||||
*/
|
||||
{template .update stricthtml="false"}
|
||||
{@param item: ?}
|
||||
{@param clTrid: ?}
|
||||
{@param? addAddrs: ?} /** list of addrs to add. */
|
||||
{@param? remAddrs: ?} /** list of addrs to remove. */
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<update>
|
||||
<host:update xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>{$item['host:name']}</host:name>
|
||||
{call .addRem}
|
||||
{param isAdd: true /}
|
||||
{param addrs: $addAddrs /}
|
||||
{/call}
|
||||
{call .addRem}
|
||||
{param isAdd: false /}
|
||||
{param addrs: $remAddrs /}
|
||||
{/call}
|
||||
{if $item['host:name'] != $item['host:chgName']}
|
||||
<host:chg>
|
||||
<host:name>{$item['host:chgName']}</host:name>
|
||||
</host:chg>
|
||||
{/if}
|
||||
</host:update>
|
||||
</update>
|
||||
<clTRID>{$clTrid}</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Host info request.
|
||||
*/
|
||||
{template .info stricthtml="false"}
|
||||
{@param clTrid: ?}
|
||||
{@param id: ?} /** The hostname (named "id" to preserve component API). */
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<info>
|
||||
<host:info xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>{$id}</host:name>
|
||||
</host:info>
|
||||
</info>
|
||||
<clTRID>{$clTrid}</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
{/template}
|
||||
|
||||
|
||||
{template .addRem}
|
||||
{@param isAdd: ?}
|
||||
{@param? addrs: ?}
|
||||
{let $tagName: $isAdd ? 'host:add' : 'host:rem' /}
|
||||
{if length($addrs) > 0}
|
||||
<{$tagName}>
|
||||
{for $addr in $addrs}
|
||||
{let $type: strContains($addr, ':') ? 'v6' : 'v4' /}
|
||||
<host:addr ip="{$type}">{$addr}</host:addr>
|
||||
{/for}
|
||||
</{$tagName}>
|
||||
{/if}
|
||||
{/template}
|
Loading…
Add table
Add a link
Reference in a new issue