如何验证域名 EPP 代码?
我正在尝试找到一种方法来自动化我们公司的域转移过程,第一步需要在启动实际转移之前验证域的 EPP 代码。
目前,我们必须登录我们的域名注册商并手动使用他们的域名 EPP 验证工具。他们不为此提供任何 API 访问,并且设置本质上是宏来自动登录和运行该工具对于我们的要求来说太脆弱了。他们的工具的代码是闭源的,所以我无法看到他们如何验证 EPP 代码。
还有其他方法来验证域 EPP 代码吗?我搜索了 StackOverflow 和 Google,但无法找到有关如何执行此操作的任何信息。
I'm trying to find a way to automate our company's domain transfer process, and one of the first steps requires validating the domain's EPP code before we initiate the actual transfer.
Currently, we're having to login to our domain registrar and manually use their domain EPP validation tool. They don't provide any API access for this and setting up what would essentially be a macro to automatically log in and run the tool is too fragile for our requirements. The code for their tool is closed source so I'm unable to see how they're validating the EPP codes.
Is there any other method for validating domain EPP codes? I've searched StackOverflow and Google but have been unable to find any information on how to do this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
“EPP 代码”是指注册商通常通过电子邮件发送(或在其 Web UI 中显示)的临时转移授权代码吗?
供参考:https://en.wikipedia.org/wiki/Auth-Code
(EPP 代码也可以是这些状态代码,fwiw:https://www.icann.org/resources/pages/epp-status-codes-2014-06-16-en)
我也不太明白您所说的“验证”的含义代码?
By "EPP code," do you mean the temporary transfer auth codes that registrars usually send via email (or show in their web UIs)?
For reference: https://en.wikipedia.org/wiki/Auth-Code
(EPP codes can also be these status codes, fwiw: https://www.icann.org/resources/pages/epp-status-codes-2014-06-16-en)
I'm also not quite following what you mean by "validating" the codes?
EPP(可扩展配置协议)代码,也称为“授权代码”、“授权信息代码”或“转移代码”,通常由域注册机构或注册商生成,并且可能会过期。它的长度通常在 1 - 32 个字符之间,并且至少包含 1 个数字、1 个字母和 1 个特殊字符。
根据注册商的不同,EPP 代码可能会在一段时间后过期,以避免出现安全漏洞。如果域名所有者在过期后需要 EPP 代码,他们必须通过域名注册商请求或生成该代码。
由于 EPP 代码像密码一样用于验证域的所有权,因此它应该是安全的并且第三方无法访问,因此第三方无法明确验证它。
An EPP (Extensible Provisioning Protocol) code, also known as an 'Authorization Code', 'Auth-Info Code', or 'transfer code', is typically generated by the domain registry or registrar and can expire. It will normally be between 1 - 32 character long, and will contain at least 1 number, 1 letter, and 1 special character.
Depending upon the Registrar, the EPP code might expire after a certain period of time to avoid security vulnerabilities. If the domain owner requires the EPP code after expiry, they must request or generate it via their domain registrar.
Because the EPP code is used like a password to verify ownership of a domain, it should be secure and inaccessible to third parties, therefore a third party cannot explicitly validate it.
你可以验证它的语法,因为它是EPP规范中的,但是它相当宽松,所以对你没有多大帮助(它只是一个XML
normalizedString
,对内容没有限制或基本上的长度)。您可能会获得特定注册管理机构详细说明的进一步限制,因此您需要仔细阅读他们的文档或直接询问他们(如果您可以访问该文档,因为它通常仅限于注册商),但无论如何,每个注册管理机构都会有所不同。我想,即使你不希望这个答案,因为你说:
,这意味着会给您的业务带来问题,那么您要么需要寻找另一个更适合您需求的提供商,要么向您当前的提供商施加压力,要求其为您提供所需的工具。
如果您是注册商,可以直接连接到注册管理机构,对于某些注册管理机构,您可以评估给定的 authInfo(规范中的正式名称,通常代码为“auth code”或“ epp 代码”或类似的东西,但定义新术语没有意义)来自客户确实有效,
由于
domain:info
EPP 命令可以指定authInfo
,因此在您尚未赞助的域上执行,注册表的结果将根据>authInfo
是否正确。无论如何,即使作为经销商,如果您开始转让,也必须提供
authInfo
。如果错误,您应该立即收到错误消息,因为注册商向注册管理机构发送转移域名的命令也会立即收到错误消息。如果成功,则域似乎已开始传输,因此证明authInfo
是正确的。You can validate the syntax of it, because it is in the EPP specifications, but it is quite lax, so won't help you much (it is just an XML
normalizedString
, there are no restrictions on content or length basically). You may get further constraints detailed by the specific registry, so you need to peruse their documentation or ask them directly (if you can get access to that because it is restricted to registrars most often), but that will differ anyway from one registry to another.I guess, even if you don't want that as answer, since you say:
and it means to be a problem for your business, then you either need to find another provider more suitable for your needs, or pressure your current one to give you the tools you need.
If you were a registrar, with direct connection to registry, you could, for some registries, assess if a given
authInfo
(the official name from the specification, that is then often code "auth code" or "epp code" or things like that, but no point in defining new terms) from customer does indeed work,as a
domain:info
EPP command can specify anauthInfo
and hence done on a domain you don't sponsor yet, the results from registry will change depending on if theauthInfo
is correct or not.Anyway, even as a reseller, if you start a transfer, you have to provide the
authInfo
. If it is wrong you should get an error immediately, as the registrar sending the command to the registry to transfer the domain will also get an error immediately. And if there is a success instead, it seems the domain has started the transfer and as such proves theauthInfo
was correct.