LoginSignup
8
6

More than 3 years have passed since last update.

WHOISの代わりとなるRDAPを使ってみた

Last updated at Posted at 2019-09-02

RDAPとは

  • Registration Data Access Protocol (RDAP) ... ICANNより
  • WHOISの代替となる後継プロトコル
  • 応答形式の標準化を目指している
    • jSONでレスポンスが返ってくることが特徴的

値を取得してみる

HTTP/HTTPS経由で値を取得できることが特徴(RESTful API)

IPv6にも対応しているため

APNICが提供しているRDAPを参考にアクセスするとレスポンスを得ることができる。

http://rdap.apnic.net/ip/2001:dc0:2001:11::194
https://rdap.apnic.net/ip/2001:dc0:2001:11::194

わかりやすいフォーマットを用意しているのでドメインであれば

このように値をいれるとwhoisのように必要な値を取得することができる。

ex) https://rdap.verisign.com/com/v1/domain/google.com

curl+jq

jsonで値を得ることができるので jq を使うと読みやすい。
特定の値を下記のように取得することも可能。

% curl -L https://rdap.verisign.com/com/v1/domain/google.com | jq .ldhName
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2343  100  2343    0     0   3555      0 --:--:-- --:--:-- --:--:--  3555
"GOOGLE.COM"

整形しやすい情報を扱えるようになったので今後の活用の期待が高まります。

国内のRDAP

JPRS RDAP ご利用ガイド | gTLD等ドメイン名登録情報の公開 | gTLD取次サービス | JPRS

JPRSより

こちらが用意されている。

WHOISとの違い表示項目の違いの一覧(RDAP表示項目名)もあるので参考になる。

PSI-JAPANも提供を開始。

RDAPサービス開始のお知らせ

PSI-Japanは、2019年8月26日よりドメイン情報検索サービスRDAPの提供を開始しました。

ex) https://rdap.psi.jp/domain/google.com

RDAPを活用した例

apnic/rdap-ingressd
dockerでRDAPサービスのプロキシをを体験することができる。
https://github.com/APNIC-net/rdap-ingressd

RFC

RDAP Operational Profile for gTLD Registries and Registrars - ICANN

こちらを参考に。

  • RFC7480 - HTTP Usage in the Registration Data Access Protocol (RDAP)
  • RFC7481 - Security Services for the Registration Data Access Protocol (RDAP)
  • RFC7482 - Registration Data Access Protocol (RDAP) Query Format
  • RFC7483 - JSON Responses for the Registration Data Access Protocol (RDAP)
  • RFC7484 - Finding the Authoritative Registration Data (RDAP) Service

参考リンク

8
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
6