From 20cceaadb12f9428b8e14800bd1909c52cc8114c Mon Sep 17 00:00:00 2001 From: Martin Lensment Date: Thu, 22 Jan 2015 12:55:21 +0200 Subject: [PATCH] Generate new example doc --- doc/epp-examples.md | 2779 ++++++++++++++++++--------------------- spec/epp/domain_spec.rb | 471 ++++--- 2 files changed, 1531 insertions(+), 1719 deletions(-) diff --git a/doc/epp-examples.md b/doc/epp-examples.md index a4fd22efe..18af827bc 100644 --- a/doc/epp-examples.md +++ b/doc/epp-examples.md @@ -1,6 +1,6 @@ # EPP REQUEST - RESPONSE EXAMPLES -GENERATED AT: 2015-01-21 17:33:14 +0200 -EXAMPLE COUNT: 104 +GENERATED AT: 2015-01-22 12:53:27 +0200 +EXAMPLE COUNT: 103 --- @@ -32,7 +32,7 @@ RESPONSE: ABC-12345 - ccReg-7864710779 + ccReg-8181141830 ``` @@ -84,7 +84,7 @@ RESPONSE: ABC-12345 - ccReg-9604172563 + ccReg-5833531336 ``` @@ -128,13 +128,13 @@ RESPONSE: - f3565470 - 2015-01-21 15:33:15 UTC + 794f5d58 + 2015-01-22 10:53:28 UTC ABC-12345 - ccReg-5765931859 + ccReg-0555033452 @@ -179,13 +179,13 @@ RESPONSE: - ce7ca63e - 2015-01-21 15:33:16 UTC + eac941ec + 2015-01-22 10:53:29 UTC ABC-12345 - ccReg-9032697119 + ccReg-9379802551 @@ -230,13 +230,13 @@ RESPONSE: - 30850f41 - 2015-01-21 15:33:16 UTC + d3664a48 + 2015-01-22 10:53:29 UTC ABC-12345 - ccReg-8358611153 + ccReg-2531954915 @@ -281,13 +281,13 @@ RESPONSE: - c1b7ec43 - 2015-01-21 15:33:16 UTC + 5d0d91f6 + 2015-01-22 10:53:29 UTC ABC-12345 - ccReg-2527491147 + ccReg-2373702503 @@ -340,13 +340,13 @@ RESPONSE: - 4c494f49 - 2015-01-21 15:33:17 UTC + a122f0b4 + 2015-01-22 10:53:30 UTC ABC-12345 - ccReg-7826404364 + ccReg-5672868276 @@ -395,13 +395,13 @@ RESPONSE: - dbe36770 - 2015-01-21 15:33:17 UTC + 5d6d8ad1 + 2015-01-22 10:53:30 UTC ABC-12345 - ccReg-9149336059 + ccReg-0841784334 @@ -438,7 +438,7 @@ RESPONSE: ABC-12345 - ccReg-0535831857 + ccReg-9740755158 ``` @@ -487,7 +487,7 @@ RESPONSE: ABC-12345 - ccReg-9540146784 + ccReg-5073569029 ``` @@ -536,12 +536,12 @@ RESPONSE: sh8013 - 2015-01-21 15:33:18 UTC + 2015-01-22 10:53:31 UTC ABC-12345 - ccReg-4650915356 + ccReg-2595118078 @@ -594,7 +594,7 @@ RESPONSE: ABC-12345 - ccReg-5523716030 + ccReg-0108994148 ``` @@ -643,12 +643,12 @@ RESPONSE: sh8013 - 2015-01-21 15:33:19 UTC + 2015-01-22 10:53:32 UTC ABC-12345 - ccReg-5298158240 + ccReg-1774843199 @@ -684,7 +684,7 @@ RESPONSE: ABC-12345 - ccReg-5117507065 + ccReg-7171405895 ``` @@ -718,7 +718,7 @@ RESPONSE: ABC-12345 - ccReg-9436615595 + ccReg-1173234269 @@ -760,7 +760,7 @@ RESPONSE: ABC-12345 - ccReg-8711299427 + ccReg-7223662758 ``` @@ -795,7 +795,7 @@ RESPONSE: ABC-12345 - ccReg-9832127526 + ccReg-7077660173 ``` @@ -830,7 +830,7 @@ RESPONSE: ABC-12345 - ccReg-1137823703 + ccReg-2357203919 ``` @@ -876,7 +876,7 @@ RESPONSE: ABC-12345 - ccReg-8248158634 + ccReg-1741352907 @@ -916,14 +916,14 @@ RESPONSE: Johnny Awesome - Kip Village - Lake Maryam + Tessie Ports + Susanaland +372.12345678 - cara@leannon.net - 2015-01-21 15:33:22 UTC + gilbert_hand@hayes.info + 2015-01-22 10:53:35 UTC 37605030299 asde @@ -942,7 +942,7 @@ RESPONSE: ABC-12345 - ccReg-3413288478 + ccReg-2590324936 @@ -981,7 +981,7 @@ RESPONSE: ABC-12345 - ccReg-6438885596 + ccReg-4846228908 ``` @@ -1022,7 +1022,7 @@ RESPONSE: - 2015-01-21 15:33:23 UTC + 2015-01-22 10:53:36 UTC 37605030299 @@ -1038,7 +1038,7 @@ RESPONSE: ABC-12345 - ccReg-8827932199 + ccReg-6813761952 @@ -1078,14 +1078,14 @@ RESPONSE: Johnny Awesome - Kip Village - Lake Maryam + Tessie Ports + Susanaland +372.12345678 - cara@leannon.net - 2015-01-21 15:33:24 UTC + gilbert_hand@hayes.info + 2015-01-22 10:53:36 UTC 37605030299 password @@ -1104,7 +1104,7 @@ RESPONSE: ABC-12345 - ccReg-6914805306 + ccReg-4259304943 @@ -1140,7 +1140,7 @@ RESPONSE: ABC-12345 - ccReg-9153539057 + ccReg-3838225664 ``` @@ -1181,7 +1181,7 @@ RESPONSE: ABC-12345 - ccReg-6074549585 + ccReg-4163455697 ``` @@ -1220,14 +1220,14 @@ RESPONSE: Johnny Awesome - Kip Village - Lake Maryam + Tessie Ports + Susanaland +372.12345678 - cara@leannon.net - 2015-01-21 15:33:25 UTC + gilbert_hand@hayes.info + 2015-01-22 10:53:37 UTC 37605030299 ccds4324pok @@ -1246,7 +1246,7 @@ RESPONSE: ABC-12345 - ccReg-8430288078 + ccReg-2423756106 @@ -1286,10 +1286,10 @@ RESPONSE: info-4444 - Emily Runte + Tracy Donnelly - 2015-01-21 15:33:25 UTC + 2015-01-22 10:53:38 UTC 37605030299 @@ -1305,7 +1305,7 @@ RESPONSE: ABC-12345 - ccReg-8019393413 + ccReg-2851390480 @@ -1341,7 +1341,7 @@ RESPONSE: ABC-12345 - ccReg-3933702638 + ccReg-4696226533 ``` @@ -1379,7 +1379,7 @@ RESPONSE: ABC-12345 - ccReg-7002325617 + ccReg-2761179117 ``` @@ -1417,7 +1417,7 @@ RESPONSE: ABC-12345 - ccReg-6391246300 + ccReg-3737354648 ``` @@ -1489,7 +1489,7 @@ RESPONSE: ABC-12345 - ccReg-6522455540 + ccReg-1224668858 ``` @@ -1533,7 +1533,7 @@ RESPONSE: ABC-12345 - ccReg-6812325144 + ccReg-2343207433 ``` @@ -1574,7 +1574,7 @@ RESPONSE: ABC-12345 - ccReg-6866271694 + ccReg-6357241747 @@ -1615,7 +1615,7 @@ RESPONSE: ABC-12345 - ccReg-2761646860 + ccReg-0540310638 @@ -1665,7 +1665,7 @@ RESPONSE: ABC-12345 - ccReg-5008717900 + ccReg-7227787786 @@ -1712,800 +1712,12 @@ RESPONSE: ABC-12345 - ccReg-9446802782 + ccReg-7006508598 ``` -### EPP Domain with valid user with two epp users can not see other registrar domains - -REQUEST: - -```xml - - - - - - example.ee - - 2fooBAR - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Domain exists but belongs to other registrar - - example.ee - - - - - ABC-12345 - ccReg-1350047074 - - -``` - -### EPP Domain with valid user with two epp users transfers a domain - -REQUEST: - -```xml - - - - - - example.ee - - 2ee7a71a028cd9c9bef174c45cff8e3b - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - - example.ee - serverApproved - 123 - 2015-01-21 15:33:29 UTC - 12345678 - 2015-01-21 15:33:29 UTC - 2016-01-21 00:00:00 UTC - - - - - ABC-12345 - ccReg-2101281702 - - -``` - -REQUEST: - -```xml - - - - - - example.ee - - 72c7d8ef47b6d10c681dd9c88f5ded76 - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - - example.ee - pending - 12345678 - 2015-01-21 15:33:29 UTC - 123 - 2015-01-21 16:33:29 UTC - 2016-01-21 00:00:00 UTC - - - - - ABC-12345 - ccReg-5723480010 - - -``` - -REQUEST: - -```xml - - - - - - example.ee - - 72c7d8ef47b6d10c681dd9c88f5ded76 - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - - example.ee - pending - 12345678 - 2015-01-21 15:33:29 UTC - 123 - 2015-01-21 16:33:29 UTC - 2016-01-21 00:00:00 UTC - - - - - ABC-12345 - ccReg-8300649043 - - -``` - -REQUEST: - -```xml - - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully; ack to dequeue - - - 2015-01-21 15:33:29 UTC - Transfer requested. - - - - example.ee - pending - 12345678 - 2015-01-21 15:33:29 UTC - 123 - 2015-01-21 16:33:29 UTC - 2016-01-21 00:00:00 UTC - - - - ABC-12345 - ccReg-8524015677 - - - -``` - -REQUEST: - -```xml - - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - - ABC-12345 - ccReg-2436214419 - - - -``` - -### EPP Domain with valid user with two epp users prohibits wrong registrar from approving transfer - -REQUEST: - -```xml - - - - - - example.ee - - 13ba1f8cec0a9fc7b3b980939b40ce5c - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Transfer can be approved only by current domain registrar - - - - ABC-12345 - ccReg-4833316086 - - -``` - -### EPP Domain with valid user with two epp users approves the transfer request - -REQUEST: - -```xml - - - - - - example.ee - - 3166ee73db5be10c4cb20febfbc324b1 - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - - example.ee - clientApproved - 123 - 2015-01-21 15:33:30 UTC - 12345678 - 2015-01-21 15:33:31 UTC - 2016-01-21 00:00:00 UTC - - - - - ABC-12345 - ccReg-1009655832 - - -``` - -### EPP Domain with valid user with two epp users does not transfer with invalid pw - -REQUEST: - -```xml - - - - - - example.ee - - test - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Authorization error - - - - ABC-12345 - ccReg-0385395756 - - -``` - -### EPP Domain with valid user with two epp users ignores transfer when owner registrar requests transfer - -REQUEST: - -```xml - - - - - - example.ee - - 7e499b8bbdf4940de928b3f38c54b2d1 - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Domain already belongs to the querying registrar - - - - ABC-12345 - ccReg-6274922242 - - -``` - -### EPP Domain with valid user with two epp users returns an error for incorrect op attribute - -REQUEST: - -```xml - - - - - - example.ee - - 98oiewslkfkd - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Attribute op is invalid - - - - ABC-12345 - ccReg-7391171852 - - -``` - -### EPP Domain with valid user with two epp users creates new pw after successful transfer - -REQUEST: - -```xml - - - - - - example.ee - - 98oiewslkfkd - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Authorization error - - - - ABC-12345 - ccReg-8776098590 - - -``` - -REQUEST: - -```xml - - - - - - example.ee - - 98oiewslkfkd - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Authorization error - - - - ABC-12345 - ccReg-6369780753 - - -``` - -### EPP Domain with valid user with two epp users creates a domain transfer with legal document - -REQUEST: - -```xml - - - - - - example.ee - - 845d2c1dba5315440c4e69abe279f2c0 - - - - - - JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp== - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - - example.ee - serverApproved - 123 - 2015-01-21 15:33:33 UTC - 12345678 - 2015-01-21 15:33:33 UTC - 2016-01-21 00:00:00 UTC - - - - - ABC-12345 - ccReg-8432050009 - - -``` - -### EPP Domain with valid user with two epp users creates a domain transfer with legal document - -REQUEST: - -```xml - - - - - - example.ee - - 1ef237651737324651e6199b9c4cac9c - - - - - - JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp== - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - - example.ee - pending - 123 - 2015-01-21 15:33:34 UTC - 12345678 - 2015-01-21 16:33:34 UTC - 2016-01-21 00:00:00 UTC - - - - - ABC-12345 - ccReg-6287231116 - - -``` - -REQUEST: - -```xml - - - - - - example.ee - - 1ef237651737324651e6199b9c4cac9c - - - - - - JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp== - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - - example.ee - pending - 123 - 2015-01-21 15:33:34 UTC - 12345678 - 2015-01-21 16:33:34 UTC - 2016-01-21 00:00:00 UTC - - - - - ABC-12345 - ccReg-3382804710 - - -``` - -### EPP Domain with valid user with two epp users rejects a domain transfer - -REQUEST: - -```xml - - - - - - example.ee - - 0ab80010b6abffeffc64a8db225d6e6a - - - - - - JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp== - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Transfer can be rejected only by current registrar - - - - ABC-12345 - ccReg-5734566540 - - -``` - -REQUEST: - -```xml - - - - - - example.ee - - 0ab80010b6abffeffc64a8db225d6e6a - - - - - - JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp== - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - - example.ee - clientRejected - 123 - 2015-01-21 15:33:34 UTC - 12345678 - - 2016-01-21 00:00:00 UTC - - - - - ABC-12345 - ccReg-3101825052 - - -``` - ### EPP Domain with valid user with citizen as an owner creates a domain REQUEST: @@ -2564,14 +1776,14 @@ RESPONSE: example.ee - 2015-01-21 15:33:35 UTC - 2016-01-21 00:00:00 UTC + 2015-01-22 10:53:42 UTC + 2016-01-22 00:00:00 UTC ABC-12345 - ccReg-6942718555 + ccReg-9914284547 ``` @@ -2626,14 +1838,14 @@ RESPONSE: example.ee - 2015-01-21 15:33:35 UTC - 2016-01-21 00:00:00 UTC + 2015-01-22 10:53:42 UTC + 2016-01-22 00:00:00 UTC ABC-12345 - ccReg-3615366242 + ccReg-3094000364 ``` @@ -2696,14 +1908,14 @@ RESPONSE: ria.ee - 2015-01-21 15:33:36 UTC - 2016-01-21 00:00:00 UTC + 2015-01-22 10:53:43 UTC + 2016-01-22 00:00:00 UTC ABC-12345 - ccReg-2307292767 + ccReg-0277944501 ``` @@ -2764,7 +1976,7 @@ RESPONSE: ABC-12345 - ccReg-7771286810 + ccReg-1427275479 ``` @@ -2827,14 +2039,14 @@ RESPONSE: example.ee - 2015-01-21 15:33:37 UTC - 2016-01-21 00:00:00 UTC + 2015-01-22 10:53:44 UTC + 2016-01-22 00:00:00 UTC ABC-12345 - ccReg-6125755295 + ccReg-7816625604 ``` @@ -2898,7 +2110,7 @@ RESPONSE: ABC-12345 - ccReg-0554600118 + ccReg-6683839960 ``` @@ -2964,7 +2176,7 @@ RESPONSE: ABC-12345 - ccReg-6823167468 + ccReg-7938110438 ``` @@ -3027,7 +2239,7 @@ RESPONSE: ABC-12345 - ccReg-9469967592 + ccReg-8780676604 ``` @@ -3084,7 +2296,7 @@ RESPONSE: ABC-12345 - ccReg-3157654643 + ccReg-9479110456 ``` @@ -3181,7 +2393,7 @@ RESPONSE: ABC-12345 - ccReg-4726007073 + ccReg-1858023349 ``` @@ -3251,7 +2463,7 @@ RESPONSE: ABC-12345 - ccReg-5404951988 + ccReg-0234127974 ``` @@ -3308,7 +2520,7 @@ RESPONSE: ABC-12345 - ccReg-9477008063 + ccReg-6355820695 ``` @@ -3366,14 +2578,14 @@ RESPONSE: example.ee - 2015-01-21 15:33:40 UTC - 2016-01-21 00:00:00 UTC + 2015-01-22 10:53:47 UTC + 2016-01-22 00:00:00 UTC ABC-12345 - ccReg-7542239742 + ccReg-7095302566 ``` @@ -3440,7 +2652,7 @@ RESPONSE: ABC-12345 - ccReg-8221335281 + ccReg-1857005181 ``` @@ -3503,14 +2715,14 @@ RESPONSE: example.ee - 2015-01-21 15:33:40 UTC - 2016-01-21 00:00:00 UTC + 2015-01-22 10:53:48 UTC + 2016-01-22 00:00:00 UTC ABC-12345 - ccReg-6447615337 + ccReg-0408430930 ``` @@ -3576,7 +2788,7 @@ RESPONSE: ABC-12345 - ccReg-8550486970 + ccReg-7421340430 ``` @@ -3651,14 +2863,14 @@ RESPONSE: example.ee - 2015-01-21 15:33:41 UTC - 2016-01-21 00:00:00 UTC + 2015-01-22 10:53:49 UTC + 2016-01-22 00:00:00 UTC ABC-12345 - ccReg-4733027521 + ccReg-9067064348 ``` @@ -3769,7 +2981,7 @@ RESPONSE: ABC-12345 - ccReg-2071732563 + ccReg-0690209292 ``` @@ -3841,7 +3053,7 @@ RESPONSE: ABC-12345 - ccReg-6965602670 + ccReg-4791921074 ``` @@ -3910,7 +3122,7 @@ RESPONSE: ABC-12345 - ccReg-4236121367 + ccReg-7632764259 ``` @@ -3973,14 +3185,14 @@ RESPONSE: example.ee - 2015-01-21 15:33:43 UTC - 2016-01-21 00:00:00 UTC + 2015-01-22 10:53:51 UTC + 2016-01-22 00:00:00 UTC ABC-12345 - ccReg-2288571447 + ccReg-7899397090 ``` @@ -4049,14 +3261,14 @@ RESPONSE: example.ee - 2015-01-21 15:33:44 UTC - 2016-01-21 00:00:00 UTC + 2015-01-22 10:53:51 UTC + 2016-01-22 00:00:00 UTC ABC-12345 - ccReg-7120526811 + ccReg-1558878973 ``` @@ -4125,7 +3337,7 @@ RESPONSE: ABC-12345 - ccReg-9665843969 + ccReg-9987216404 ``` @@ -4194,7 +3406,7 @@ RESPONSE: ABC-12345 - ccReg-8825042179 + ccReg-6258573043 ``` @@ -4257,7 +3469,7 @@ RESPONSE: ABC-12345 - ccReg-0989864438 + ccReg-3319727275 ``` @@ -4318,14 +3530,14 @@ RESPONSE: example.ee - 2015-01-21 15:33:45 UTC - 2016-01-21 00:00:00 UTC + 2015-01-22 10:53:53 UTC + 2016-01-22 00:00:00 UTC ABC-12345 - ccReg-2990850681 + ccReg-8303243773 ``` @@ -4386,7 +3598,7 @@ RESPONSE: ABC-12345 - ccReg-5081316062 + ccReg-5405889578 ``` @@ -4450,12 +3662,12 @@ RESPONSE: ABC-12345 - ccReg-8013972833 + ccReg-1985922130 ``` -### EPP Domain with valid user with valid domain renews a domain +### EPP Domain with valid user with valid domain transfers a domain REQUEST: @@ -4463,13 +3675,14 @@ REQUEST: - - + + example.ee - 2016-01-21 - 1 - - + + 103c0e594f0891f567ce9503d8378140 + + + ABC-12345 @@ -4485,34 +3698,572 @@ RESPONSE: Command completed successfully - + example.ee - 2017-01-21 00:00:00 UTC - + serverApproved + 123 + 2015-01-22 10:53:55 UTC + 12345678 + 2015-01-22 10:53:55 UTC + 2016-01-22 00:00:00 UTC + + ABC-12345 - ccReg-1886893293 + ccReg-0202347832 - ``` -### EPP Domain with valid user with valid domain returns an error when given and current exp dates do not match - REQUEST: ```xml - - + + example.ee - 2016-08-07 - 1 - - + + 1810d0cac24ba7d034ca39a3440a9be4 + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Command completed successfully + + + + example.ee + pending + 12345678 + 2015-01-22 10:53:55 UTC + 123 + 2015-01-22 11:53:55 UTC + 2016-01-22 00:00:00 UTC + + + + + ABC-12345 + ccReg-0549416009 + + +``` + +REQUEST: + +```xml + + + + + + example.ee + + 1810d0cac24ba7d034ca39a3440a9be4 + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Command completed successfully + + + + example.ee + pending + 12345678 + 2015-01-22 10:53:55 UTC + 123 + 2015-01-22 11:53:55 UTC + 2016-01-22 00:00:00 UTC + + + + + ABC-12345 + ccReg-9821872066 + + +``` + +REQUEST: + +```xml + + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Command completed successfully; ack to dequeue + + + 2015-01-22 10:53:55 UTC + Transfer requested. + + + + example.ee + pending + 12345678 + 2015-01-22 10:53:55 UTC + 123 + 2015-01-22 11:53:55 UTC + 2016-01-22 00:00:00 UTC + + + + ABC-12345 + ccReg-6702001709 + + + +``` + +REQUEST: + +```xml + + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Command completed successfully + + + + ABC-12345 + ccReg-2174165939 + + + +``` + +### EPP Domain with valid user with valid domain creates a domain transfer with legal document + +REQUEST: + +```xml + + + + + + example.ee + + 813e680d2639bca3248d899c1be9d958 + + + + + + JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp== + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Command completed successfully + + + + example.ee + pending + 123 + 2015-01-22 10:53:56 UTC + 12345678 + 2015-01-22 11:53:56 UTC + 2016-01-22 00:00:00 UTC + + + + + ABC-12345 + ccReg-5823124302 + + +``` + +REQUEST: + +```xml + + + + + + example.ee + + 813e680d2639bca3248d899c1be9d958 + + + + + + JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp== + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Command completed successfully + + + + example.ee + pending + 123 + 2015-01-22 10:53:56 UTC + 12345678 + 2015-01-22 11:53:56 UTC + 2016-01-22 00:00:00 UTC + + + + + ABC-12345 + ccReg-8158177650 + + +``` + +### EPP Domain with valid user with valid domain approves the transfer request + +REQUEST: + +```xml + + + + + + example.ee + + 8065692a9060f5cc6ddd8183bd1e1289 + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Command completed successfully + + + + example.ee + clientApproved + 123 + 2015-01-22 10:53:56 UTC + 12345678 + 2015-01-22 10:53:56 UTC + 2016-01-22 00:00:00 UTC + + + + + ABC-12345 + ccReg-6442601367 + + +``` + +### EPP Domain with valid user with valid domain rejects a domain transfer + +REQUEST: + +```xml + + + + + + example.ee + + 333313d3e154296a645c81a6c5991430 + + + + + + JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp== + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Transfer can be rejected only by current registrar + + + + ABC-12345 + ccReg-9083191318 + + +``` + +REQUEST: + +```xml + + + + + + example.ee + + 333313d3e154296a645c81a6c5991430 + + + + + + JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp== + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Command completed successfully + + + + example.ee + clientRejected + 123 + 2015-01-22 10:53:57 UTC + 12345678 + + 2016-01-22 00:00:00 UTC + + + + + ABC-12345 + ccReg-2489729130 + + +``` + +### EPP Domain with valid user with valid domain prohibits wrong registrar from approving transfer + +REQUEST: + +```xml + + + + + + example.ee + + 87f64748cd6a8b0e35cdb79edf763d39 + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Transfer can be approved only by current domain registrar + + + + ABC-12345 + ccReg-1029920191 + + +``` + +### EPP Domain with valid user with valid domain does not transfer with invalid pw + +REQUEST: + +```xml + + + + + + example.ee + + test + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Authorization error + + + + ABC-12345 + ccReg-4747011771 + + +``` + +### EPP Domain with valid user with valid domain ignores transfer when owner registrar requests transfer + +REQUEST: + +```xml + + + + + + example.ee + + fa1a4ba4dbe52df6ee56acf596af1c6e + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Domain already belongs to the querying registrar + + + + ABC-12345 + ccReg-7779874842 + + +``` + +### EPP Domain with valid user with valid domain returns an error for incorrect op attribute + +REQUEST: + +```xml + + + + + + example.ee + + 98oiewslkfkd + + + ABC-12345 @@ -4525,20 +4276,17 @@ RESPONSE: - Given and current expire dates do not match - - 2016-08-07 - + Attribute op is invalid ABC-12345 - ccReg-1641789909 + ccReg-2732202504 ``` -### EPP Domain with valid user with valid domain returns an error when period is invalid +### EPP Domain with valid user with valid domain creates new pw after successful transfer REQUEST: @@ -4546,13 +4294,14 @@ REQUEST: - - + + example.ee - 2016-01-21 - 4 - - + + 98oiewslkfkd + + + ABC-12345 @@ -4564,36 +4313,75 @@ RESPONSE: - - Period must add up to 1, 2 or 3 years - - 4 - + + Authorization error ABC-12345 - ccReg-0331274718 + ccReg-7911523676 ``` -### EPP Domain with valid user with valid domain sets ok status by default - REQUEST: ```xml - - - example.ee + + + example.ee - 2fooBAR + 98oiewslkfkd - - + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Authorization error + + + + ABC-12345 + ccReg-7218956454 + + +``` + +### EPP Domain with valid user with valid domain updates a domain + +REQUEST: + +```xml + + + + + + example.ee + + mak21 + + + + + + + JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp== + + ABC-12345 @@ -4608,282 +4396,10 @@ RESPONSE: Command completed successfully - - - example.ee - - sh2935 - sh2935 - sh1807 - - - ns.halvorson48.ee - 192.168.1.1 - - - ns.hermistonschneider49.ee - 192.168.1.1 - - - ns.dickinson50.ee - 192.168.1.1 - - - Registrar OÜ - Registrar OÜ - 2015-01-21 15:33:48 UTC - 2016-01-21 00:00:00 UTC - - d8b743d628bc988cffc5c5d5a18e72e5 - - - ABC-12345 - ccReg-2306356098 - - -``` - -### EPP Domain with valid user with valid domain returns domain info - -REQUEST: - -```xml - - - - - - Example.ee - - 2fooBAR - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - - example.ee - Payment overdue. - sh3876 - sh3876 - sh1658 - - - ns.dooley51.ee - 192.168.1.1 - - - ns.bednar52.ee - 192.168.1.1 - - - ns.johns53.ee - 192.168.1.1 - - - ns1.example.com - 192.168.1.1 - 1080:0:0:0:8:800:200C:417A - - - Registrar OÜ - Registrar OÜ - 2015-01-21 15:33:48 UTC - 2016-01-21 00:00:00 UTC - - de78f24756d8f1f7c746bc9a484c8085 - - - - - - - - 123 - 3 - 1 - abc - - 257 - 3 - 3 - AwEAAddt2AkLfYGKgiEZB5SmIF8EvrjxNMH6HtxWEA4RJ9Ao6LCWheg8 - - - - 123 - 3 - 1 - abc - - 0 - 3 - 5 - 700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f - - - - - - ABC-12345 - ccReg-1670046766 - - -``` - -REQUEST: - -```xml - - - - - - example.ee - - 2fooBAR - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - - example.ee - Payment overdue. - sh3876 - sh3876 - sh1658 - - - ns.dooley51.ee - 192.168.1.1 - - - ns.bednar52.ee - 192.168.1.1 - - - ns.johns53.ee - 192.168.1.1 - - - ns1.example.com - 192.168.1.1 - 1080:0:0:0:8:800:200C:417A - - - Registrar OÜ - Registrar OÜ - 2015-01-21 15:33:48 UTC - 2016-01-21 00:00:00 UTC - 2015-01-21 15:33:48 UTC - - de78f24756d8f1f7c746bc9a484c8085 - - - - - - - - 123 - 3 - 1 - abc - - 257 - 3 - 3 - AwEAAddt2AkLfYGKgiEZB5SmIF8EvrjxNMH6HtxWEA4RJ9Ao6LCWheg8 - - - - 123 - 3 - 1 - abc - - 0 - 3 - 5 - 700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f - - - - - - ABC-12345 - ccReg-7508597125 - - -``` - -### EPP Domain with valid user with valid domain returns error when domain can not be found - -REQUEST: - -```xml - - - - - - test.ee - - 2fooBAR - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Domain not found - - test.ee - - - - - ABC-12345 - ccReg-6492057629 + ccReg-0489837548 ``` @@ -4952,7 +4468,7 @@ RESPONSE: ABC-12345 - ccReg-0410038578 + ccReg-5729719171 ``` @@ -5016,7 +4532,7 @@ RESPONSE: ABC-12345 - ccReg-4620156338 + ccReg-1534764288 ``` @@ -5119,7 +4635,7 @@ RESPONSE: ABC-12345 - ccReg-7673229414 + ccReg-4172222483 ``` @@ -5185,7 +4701,7 @@ RESPONSE: ABC-12345 - ccReg-3152759881 + ccReg-3126744781 ``` @@ -5236,7 +4752,7 @@ RESPONSE: ABC-12345 - ccReg-4742122774 + ccReg-0285376545 ``` @@ -5302,7 +4818,7 @@ RESPONSE: ABC-12345 - ccReg-4592048037 + ccReg-3863340776 ``` @@ -5343,7 +4859,7 @@ RESPONSE: ABC-12345 - ccReg-8772014666 + ccReg-9448362525 ``` @@ -5362,10 +4878,10 @@ REQUEST: - ns.littelrempel66.ee + ns.grimeswilderman45.ee - sh7509 + sh0705 @@ -5383,19 +4899,19 @@ RESPONSE: Nameserver already exists on this domain - ns.littelrempel66.ee + ns.grimeswilderman45.ee Contact already exists on this domain - sh7509 + sh0705 ABC-12345 - ccReg-0948227825 + ccReg-0307065677 ``` @@ -5412,10 +4928,10 @@ REQUEST: - ns.littelrempel66.ee + ns.grimeswilderman45.ee - sh7509 + sh0705 @@ -5433,19 +4949,19 @@ RESPONSE: Nameserver already exists on this domain - ns.littelrempel66.ee + ns.grimeswilderman45.ee Contact already exists on this domain - sh7509 + sh0705 ABC-12345 - ccReg-2720655033 + ccReg-0487012328 ``` @@ -5483,51 +4999,7 @@ RESPONSE: ABC-12345 - ccReg-1890455193 - - -``` - -### EPP Domain with valid user with valid domain updates a domain - -REQUEST: - -```xml - - - - - - example.ee - - mak21 - - - - - - - JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp== - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - - ABC-12345 - ccReg-4951401898 + ccReg-5059687105 ``` @@ -5568,7 +5040,481 @@ RESPONSE: ABC-12345 - ccReg-3895958965 + ccReg-7306447041 + + +``` + +### EPP Domain with valid user with valid domain renews a domain + +REQUEST: + +```xml + + + + + + example.ee + 2016-01-22 + 1 + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Command completed successfully + + + + example.ee + 2017-01-22 00:00:00 UTC + + + + ABC-12345 + ccReg-9246155327 + + + +``` + +### EPP Domain with valid user with valid domain returns an error when given and current exp dates do not match + +REQUEST: + +```xml + + + + + + example.ee + 2016-08-07 + 1 + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Given and current expire dates do not match + + 2016-08-07 + + + + + ABC-12345 + ccReg-2938567089 + + +``` + +### EPP Domain with valid user with valid domain returns an error when period is invalid + +REQUEST: + +```xml + + + + + + example.ee + 2016-01-22 + 4 + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Period must add up to 1, 2 or 3 years + + 4 + + + + + ABC-12345 + ccReg-5577214205 + + +``` + +### EPP Domain with valid user with valid domain returns domain info + +REQUEST: + +```xml + + + + + + Example.ee + + 2fooBAR + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Command completed successfully + + + + example.ee + Payment overdue. + sh4261 + sh4261 + sh6872 + + + ns.abshire63.ee + 192.168.1.1 + + + ns.simonis64.ee + 192.168.1.1 + + + ns.larkinkoch65.ee + 192.168.1.1 + + + ns1.example.com + 192.168.1.1 + 1080:0:0:0:8:800:200C:417A + + + Registrar OÜ + Registrar OÜ + 2015-01-22 10:54:05 UTC + 2016-01-22 00:00:00 UTC + + dc6995ce1452c759265496a14c79bd01 + + + + + + + + 123 + 3 + 1 + abc + + 257 + 3 + 3 + AwEAAddt2AkLfYGKgiEZB5SmIF8EvrjxNMH6HtxWEA4RJ9Ao6LCWheg8 + + + + 123 + 3 + 1 + abc + + 0 + 3 + 5 + 700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f + + + + + + ABC-12345 + ccReg-0049084674 + + +``` + +REQUEST: + +```xml + + + + + + example.ee + + 2fooBAR + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Command completed successfully + + + + example.ee + Payment overdue. + sh4261 + sh4261 + sh6872 + + + ns.abshire63.ee + 192.168.1.1 + + + ns.simonis64.ee + 192.168.1.1 + + + ns.larkinkoch65.ee + 192.168.1.1 + + + ns1.example.com + 192.168.1.1 + 1080:0:0:0:8:800:200C:417A + + + Registrar OÜ + Registrar OÜ + 2015-01-22 10:54:05 UTC + 2016-01-22 00:00:00 UTC + 2015-01-22 10:54:06 UTC + + dc6995ce1452c759265496a14c79bd01 + + + + + + + + 123 + 3 + 1 + abc + + 257 + 3 + 3 + AwEAAddt2AkLfYGKgiEZB5SmIF8EvrjxNMH6HtxWEA4RJ9Ao6LCWheg8 + + + + 123 + 3 + 1 + abc + + 0 + 3 + 5 + 700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f + + + + + + ABC-12345 + ccReg-8080042694 + + +``` + +### EPP Domain with valid user with valid domain returns error when domain can not be found + +REQUEST: + +```xml + + + + + + test.ee + + 2fooBAR + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Domain not found + + test.ee + + + + + ABC-12345 + ccReg-1487539662 + + +``` + +### EPP Domain with valid user with valid domain sets ok status by default + +REQUEST: + +```xml + + + + + + example.ee + + 2fooBAR + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Command completed successfully + + + + example.ee + + sh6802 + sh6802 + sh1477 + + + ns.roobmcclure69.ee + 192.168.1.1 + + + ns.kovacek70.ee + 192.168.1.1 + + + ns.hillllindgren71.ee + 192.168.1.1 + + + Registrar OÜ + Registrar OÜ + 2015-01-22 10:54:06 UTC + 2016-01-22 00:00:00 UTC + + ed932d4e3211ffdb732e183afaa4a935 + + + + + + ABC-12345 + ccReg-7866596060 + + +``` + +### EPP Domain with valid user with valid domain can not see other registrar domains + +REQUEST: + +```xml + + + + + + example.ee + + 2fooBAR + + + + ABC-12345 + + +``` + +RESPONSE: + +```xml + + + + + Domain exists but belongs to other registrar + + example.ee + + + + + ABC-12345 + ccReg-0368282298 ``` @@ -5608,7 +5554,7 @@ RESPONSE: ABC-12345 - ccReg-9993454127 + ccReg-5040989978 ``` @@ -5648,7 +5594,7 @@ RESPONSE: ABC-12345 - ccReg-3176434680 + ccReg-0776919224 ``` @@ -5683,7 +5629,7 @@ RESPONSE: ABC-12345 - ccReg-5843006176 + ccReg-4019599154 ``` @@ -5707,13 +5653,13 @@ REQUEST: cmlraXN0aGViZXN0 - 96d53431854b3508c7c1b3d8d0823710 + a4098d7d024712ac1bdc0157d97a69cc P1M13D - 1421854435 + 1421924049 ``` @@ -5729,8 +5675,8 @@ RESPONSE: - 1421854435 - ccReg-2547923605 + 1421924049 + ccReg-4569531786 ``` @@ -5752,13 +5698,13 @@ REQUEST: cmlraXN0aGViZXN0 - 08c8ec149ab619a4cebc9cb3a956d0ff + c65f2c94959ebc7d8ebdddf2b4f6cc62 Invalid Expiry - 1421854435 + 1421924050 ``` @@ -5774,8 +5720,8 @@ RESPONSE: - 1421854435 - ccReg-5993512867 + 1421924050 + ccReg-5537307460 ``` @@ -5797,13 +5743,13 @@ REQUEST: cmlraXN0aGViZXN0 - e8bbc97f85b8da5b1a4995fa3674704b + bc622aa1ad097e322ec1fdd537bce10c Invalid Expiry - 1421854436 + 1421924050 ``` @@ -5822,8 +5768,8 @@ RESPONSE: - 1421854436 - ccReg-2411992043 + 1421924050 + ccReg-4994897192 ``` @@ -5845,14 +5791,14 @@ REQUEST: cmlraXN0aGViZXN0 - 2ca4a9a52e66a30c21f2046d8dd7989d + be1827f16612f4aa4e7a459483f26624 P1D 2014-12-23 - 1421854436 + 1421924050 ``` @@ -5868,8 +5814,8 @@ RESPONSE: - 1421854436 - ccReg-6592311645 + 1421924050 + ccReg-5038193284 ``` @@ -5883,7 +5829,7 @@ REQUEST: - 1421854437 + 1421924051 ``` @@ -5898,8 +5844,8 @@ RESPONSE: Command completed successfully; no messages - 1421854437 - ccReg-5840350645 + 1421924051 + ccReg-2693326370 @@ -5914,7 +5860,7 @@ REQUEST: - 1421854437 + 1421924051 ``` @@ -5929,8 +5875,8 @@ RESPONSE: Command completed successfully; no messages - 1421854437 - ccReg-8633076129 + 1421924051 + ccReg-6627109021 @@ -5943,7 +5889,7 @@ REQUEST: - 1421854437 + 1421924051 ``` @@ -5958,12 +5904,12 @@ RESPONSE: Command completed successfully; ack to dequeue - 2015-01-21 15:33:57 UTC + 2015-01-22 10:54:11 UTC Balance low. - 1421854437 - ccReg-2114336517 + 1421924051 + ccReg-9051812146 @@ -5976,7 +5922,7 @@ REQUEST: - 1421854437 + 1421924051 ``` @@ -5995,8 +5941,8 @@ RESPONSE: - 1421854437 - ccReg-9469898500 + 1421924051 + ccReg-3340054002 ``` @@ -6008,7 +5954,7 @@ REQUEST: - 1421854437 + 1421924051 ``` @@ -6024,8 +5970,8 @@ RESPONSE: - 1421854437 - ccReg-5087975069 + 1421924051 + ccReg-9157978267 @@ -6038,7 +5984,7 @@ REQUEST: - 1421854437 + 1421924051 ``` @@ -6057,8 +6003,8 @@ RESPONSE: - 1421854437 - ccReg-5269525053 + 1421924051 + ccReg-1507914198 ``` @@ -6072,7 +6018,7 @@ REQUEST: - 1421854438 + 1421924052 ``` @@ -6088,8 +6034,8 @@ RESPONSE: - 1421854438 - ccReg-3447356171 + 1421924052 + ccReg-9605009033 ``` @@ -6103,7 +6049,7 @@ REQUEST: - 1421854438 + 1421924052 ``` @@ -6118,12 +6064,12 @@ RESPONSE: Command completed successfully; ack to dequeue - 2015-01-21 15:33:58 UTC + 2015-01-22 10:54:12 UTC Smth else. - 1421854438 - ccReg-9858546062 + 1421924052 + ccReg-1329594539 @@ -6136,7 +6082,7 @@ REQUEST: - 1421854438 + 1421924052 ``` @@ -6152,8 +6098,8 @@ RESPONSE: - 1421854438 - ccReg-6982235095 + 1421924052 + ccReg-4376592741 @@ -6166,7 +6112,7 @@ REQUEST: - 1421854438 + 1421924052 ``` @@ -6181,12 +6127,12 @@ RESPONSE: Command completed successfully; ack to dequeue - 2015-01-21 15:33:58 UTC + 2015-01-22 10:54:12 UTC Something. - 1421854438 - ccReg-7461777476 + 1421924052 + ccReg-5620333678 @@ -6199,7 +6145,7 @@ REQUEST: - 1421854438 + 1421924052 ``` @@ -6215,8 +6161,8 @@ RESPONSE: - 1421854438 - ccReg-5104983932 + 1421924052 + ccReg-8697411498 @@ -6229,7 +6175,7 @@ REQUEST: - 1421854438 + 1421924053 ``` @@ -6244,12 +6190,12 @@ RESPONSE: Command completed successfully; ack to dequeue - 2015-01-21 15:33:58 UTC + 2015-01-22 10:54:12 UTC Balance low. - 1421854438 - ccReg-6914379969 + 1421924053 + ccReg-7193257898 @@ -6262,7 +6208,7 @@ REQUEST: - 1421854438 + 1421924053 ``` @@ -6278,8 +6224,8 @@ RESPONSE: - 1421854438 - ccReg-4310713497 + 1421924053 + ccReg-0663525231 @@ -6292,7 +6238,7 @@ REQUEST: - 1421854438 + 1421924053 ``` @@ -6307,8 +6253,8 @@ RESPONSE: Command completed successfully; no messages - 1421854438 - ccReg-4534174090 + 1421924053 + ccReg-1808498081 @@ -6323,7 +6269,7 @@ RESPONSE: EPP server (EIS) - 2015-01-21T15:33:59Z + 2015-01-22T10:54:13Z 1.0 en @@ -6400,7 +6346,7 @@ RESPONSE: ABC-12345 - ccReg-7809234592 + ccReg-6027560481 ``` @@ -6446,7 +6392,7 @@ RESPONSE: ABC-12345 - ccReg-9309197704 + ccReg-8044658201 ``` @@ -6479,7 +6425,7 @@ RESPONSE: ABC-12345 - ccReg-9650794606 + ccReg-3983606443 ``` @@ -6515,128 +6461,3 @@ REQUEST: ``` -RESPONSE: - -```xml - - - - - Command completed successfully - - - ABC-12345 - ccReg-6720657569 - - - -``` - -### EPP Session when connected with valid user logs out epp user - -REQUEST: - -```xml - - - - - gitlab - ghyt9e4fu - - 1.0 - en - - - urn:ietf:params:xml:ns:domain-1.0 - urn:ietf:params:xml:ns:contact-1.0 - urn:ietf:params:xml:ns:host-1.0 - urn:ietf:params:xml:ns:keyrelay-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - urn:ee:eis:xml:epp:eis-1.0 - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully - - - ABC-12345 - ccReg-1328488104 - - - -``` - -REQUEST: - -```xml - - - - - ABC-12345 - - -``` - -RESPONSE: - -```xml - - - - - Command completed successfully; ending session - - - - ABC-12345 - ccReg-7314960747 - - -``` - -### EPP Session when connected with valid user does not log in twice - -REQUEST: - -```xml - - - - - gitlab - ghyt9e4fu - - 1.0 - en - - - urn:ietf:params:xml:ns:domain-1.0 - urn:ietf:params:xml:ns:contact-1.0 - urn:ietf:params:xml:ns:host-1.0 - urn:ietf:params:xml:ns:keyrelay-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - urn:ee:eis:xml:epp:eis-1.0 - - - - ABC-12345 - - -``` - diff --git a/spec/epp/domain_spec.rb b/spec/epp/domain_spec.rb index 7e0565276..586b9b641 100644 --- a/spec/epp/domain_spec.rb +++ b/spec/epp/domain_spec.rb @@ -83,245 +83,6 @@ describe 'EPP Domain', epp: true do expect(response[:results][2][:msg]).to eq('Required parameter missing: extension > extdata > legalDocument') end - # TODO: Refactor this - context 'with two epp users' do - let(:domain) { Domain.first } - - before(:each) do - Fabricate(:domain, name: 'example.ee', registrar: zone) - end - - ### TRANSFER ### - it 'transfers a domain' do - pw = domain.auth_info - xml = domain_transfer_xml({ authInfo: { pw: { value: pw } } }) - response = epp_request(xml, :xml, :elkdata) - - domain.reload - dtl = domain.domain_transfers.last - - trn_data = response[:parsed].css('trnData') - expect(trn_data.css('name').text).to eq('example.ee') - expect(trn_data.css('trStatus').text).to eq('serverApproved') - expect(trn_data.css('reID').text).to eq('123') - expect(trn_data.css('reDate').text).to eq(dtl.transfer_requested_at.to_time.utc.to_s) - expect(trn_data.css('acID').text).to eq('12345678') - expect(trn_data.css('acDate').text).to eq(dtl.transferred_at.to_time.utc.to_s) - expect(trn_data.css('exDate').text).to eq(domain.valid_to.to_time.utc.to_s) - - expect(domain.registrar).to eq(elkdata) - - Setting.transfer_wait_time = 1 - - domain.reload - pw = domain.auth_info - xml = domain_transfer_xml({ authInfo: { pw: { value: pw } } }) # request with new password - - response = epp_request(xml, :xml, :zone) - trn_data = response[:parsed].css('trnData') - - domain.reload - dtl = domain.domain_transfers.last - - expect(domain.domain_transfers.count).to eq(2) - - expect(trn_data.css('name').text).to eq('example.ee') - expect(trn_data.css('trStatus').text).to eq('pending') - expect(trn_data.css('reID').text).to eq('12345678') - expect(trn_data.css('reDate').text).to eq(dtl.transfer_requested_at.to_time.utc.to_s) - expect(trn_data.css('acDate').text).to eq(dtl.wait_until.to_time.utc.to_s) - expect(trn_data.css('acID').text).to eq('123') - expect(trn_data.css('exDate').text).to eq(domain.valid_to.to_time.utc.to_s) - - expect(domain.registrar).to eq(elkdata) - - # should return same data if pending already - response = epp_request(xml, :xml, :zone) - trn_data = response[:parsed].css('trnData') - - expect(domain.domain_transfers.count).to eq(2) - expect(trn_data.css('name').text).to eq('example.ee') - expect(trn_data.css('trStatus').text).to eq('pending') - expect(trn_data.css('reID').text).to eq('12345678') - expect(trn_data.css('reDate').text).to eq(dtl.transfer_requested_at.to_time.utc.to_s) - expect(trn_data.css('acDate').text).to eq(dtl.wait_until.to_time.utc.to_s) - expect(trn_data.css('acID').text).to eq('123') - expect(trn_data.css('exDate').text).to eq(domain.valid_to.to_time.utc.to_s) - - expect(domain.registrar).to eq(elkdata) - - # should show up in other registrar's poll - - response = epp_request(epp_xml.session.poll, :xml, :elkdata) - expect(response[:msg]).to eq('Command completed successfully; ack to dequeue') - msg_q = response[:parsed].css('msgQ') - expect(msg_q.css('qDate').text).to_not be_blank - expect(msg_q.css('msg').text).to eq('Transfer requested.') - expect(msg_q.first['id']).to_not be_blank - expect(msg_q.first['count']).to eq('1') - - xml = epp_xml.session.poll(poll: { - value: '', attrs: { op: 'ack', msgID: msg_q.first['id'] } - }) - - response = epp_request(xml, :xml, :elkdata) - expect(response[:msg]).to eq('Command completed successfully') - msg_q = response[:parsed].css('msgQ') - expect(msg_q.first['id']).to_not be_blank - expect(msg_q.first['count']).to eq('0') - end - - it 'creates a domain transfer with legal document' do - Setting.transfer_wait_time = 1 - expect(domain.legal_documents.count).to eq(0) - pw = domain.auth_info - xml = domain_transfer_xml({ authInfo: { pw: { value: pw } } }, 'query', { - _anonymus: [ - legalDocument: { - value: 'JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==', - attrs: { type: 'pdf' } - } - ] - }) - - response = epp_request(xml, :xml, :elkdata) - expect(response[:result_code]).to eq('1000') - expect(domain.legal_documents.count).to eq(1) - - log = ApiLog::EppLog.all - - expect(log.length).to eq(4) - expect(log[0].request_command).to eq('hello') - expect(log[0].request_successful).to eq(true) - - expect(log[1].request_command).to eq('login') - expect(log[1].request_successful).to eq(true) - expect(log[1].api_user_name).to eq('elkdata') - expect(log[1].api_user_registrar).to eq('Elkdata') - - expect(log[2].request_command).to eq('transfer') - expect(log[2].request_object).to eq('domain') - expect(log[2].request_successful).to eq(true) - expect(log[2].api_user_name).to eq('elkdata') - expect(log[2].api_user_registrar).to eq('Elkdata') - expect(log[2].request).not_to be_blank - expect(log[2].response).not_to be_blank - - expect(log[3].request_command).to eq('logout') - expect(log[3].request_successful).to eq(true) - expect(log[3].api_user_name).to eq('elkdata') - expect(log[3].api_user_registrar).to eq('Elkdata') - - response = epp_request(xml, :xml, :elkdata) - expect(response[:result_code]).to eq('1000') - expect(domain.legal_documents.count).to eq(1) # does not add another legal document - end - - it 'approves the transfer request' do - domain.domain_transfers.create({ - status: DomainTransfer::PENDING, - transfer_requested_at: Time.zone.now, - transfer_to: elkdata, - transfer_from: zone - }) - - xml = domain_transfer_xml({ authInfo: { pw: { value: domain.auth_info } } }, 'approve') - response = epp_request(xml, :xml, :zone) - domain.reload - dtl = domain.domain_transfers.last - - trn_data = response[:parsed].css('trnData') - - expect(trn_data.css('name').text).to eq('example.ee') - expect(trn_data.css('trStatus').text).to eq('clientApproved') - expect(trn_data.css('reID').text).to eq('123') - expect(trn_data.css('reDate').text).to eq(dtl.transfer_requested_at.to_time.utc.to_s) - expect(trn_data.css('acID').text).to eq('12345678') - expect(trn_data.css('exDate').text).to eq(domain.valid_to.to_time.utc.to_s) - end - - it 'rejects a domain transfer' do - domain.domain_transfers.create({ - status: DomainTransfer::PENDING, - transfer_requested_at: Time.zone.now, - transfer_to: elkdata, - transfer_from: zone - }) - - pw = domain.auth_info - xml = domain_transfer_xml({ authInfo: { pw: { value: pw } } }, 'reject', { - _anonymus: [ - legalDocument: { - value: 'JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==', - attrs: { type: 'pdf' } - } - ] - }) - - response = epp_request(xml, :xml, :elkdata) - expect(response[:result_code]).to eq('2304') - expect(response[:msg]).to eq('Transfer can be rejected only by current registrar') - expect(domain.legal_documents.count).to eq(0) - - response = epp_request(xml, :xml, :zone) - expect(response[:result_code]).to eq('1000') - expect(domain.pending_transfer).to be_nil - expect(domain.legal_documents.count).to eq(1) - end - - it 'prohibits wrong registrar from approving transfer' do - domain.domain_transfers.create({ - status: DomainTransfer::PENDING, - transfer_requested_at: Time.zone.now, - transfer_to: elkdata, - transfer_from: zone - }) - - xml = domain_transfer_xml({ authInfo: { pw: { value: domain.auth_info } } }, 'approve') - response = epp_request(xml, :xml, :elkdata) - expect(response[:result_code]).to eq('2304') - expect(response[:msg]).to eq('Transfer can be approved only by current domain registrar') - end - - it 'does not transfer with invalid pw' do - xml = domain_transfer_xml({ authInfo: { pw: { value: 'test' } } }) - response = epp_request(xml, :xml) - expect(response[:result_code]).to eq('2201') - expect(response[:msg]).to eq('Authorization error') - end - - it 'ignores transfer when owner registrar requests transfer' do - pw = domain.auth_info - xml = domain_transfer_xml({ authInfo: { pw: { value: pw } } }) - response = epp_request(xml, :xml, :zone) - - expect(response[:result_code]).to eq('2002') - expect(response[:msg]).to eq('Domain already belongs to the querying registrar') - end - - it 'returns an error for incorrect op attribute' do - response = epp_request(domain_transfer_xml({}, 'bla'), :xml, :zone) - expect(response[:result_code]).to eq('2306') - expect(response[:msg]).to eq('Attribute op is invalid') - end - - it 'creates new pw after successful transfer' do - pw = domain.auth_info - xml = domain_transfer_xml(pw: pw) - epp_request(xml, :xml, :elkdata) # transfer domain - response = epp_request(xml, :xml, :elkdata) # attempt second transfer - expect(response[:result_code]).to eq('2201') - expect(response[:msg]).to eq('Authorization error') - end - - ### MISC ### - it 'can not see other registrar domains' do - response = epp_request(domain_info_xml, :xml, :elkdata) - expect(response[:result_code]).to eq('2302') - expect(response[:msg]).to eq('Domain exists but belongs to other registrar') - end - end - context 'with citizen as an owner' do before(:each) do Fabricate(:contact, code: 'jd1234') @@ -889,7 +650,231 @@ describe 'EPP Domain', epp: true do end context 'with valid domain' do - before(:each) { Fabricate(:domain, name: 'example.ee', registrar: EppUser.first.registrar, dnskeys: []) } + before(:each) { Fabricate(:domain, name: 'example.ee', registrar: zone, dnskeys: []) } + let(:domain) { Domain.first } + + ### TRANSFER ### + it 'transfers a domain' do + pw = domain.auth_info + xml = domain_transfer_xml({ authInfo: { pw: { value: pw } } }) + response = epp_request(xml, :xml, :elkdata) + + domain.reload + dtl = domain.domain_transfers.last + + trn_data = response[:parsed].css('trnData') + expect(trn_data.css('name').text).to eq('example.ee') + expect(trn_data.css('trStatus').text).to eq('serverApproved') + expect(trn_data.css('reID').text).to eq('123') + expect(trn_data.css('reDate').text).to eq(dtl.transfer_requested_at.to_time.utc.to_s) + expect(trn_data.css('acID').text).to eq('12345678') + expect(trn_data.css('acDate').text).to eq(dtl.transferred_at.to_time.utc.to_s) + expect(trn_data.css('exDate').text).to eq(domain.valid_to.to_time.utc.to_s) + + expect(domain.registrar).to eq(elkdata) + + Setting.transfer_wait_time = 1 + + domain.reload + pw = domain.auth_info + xml = domain_transfer_xml({ authInfo: { pw: { value: pw } } }) # request with new password + + response = epp_request(xml, :xml, :zone) + trn_data = response[:parsed].css('trnData') + + domain.reload + dtl = domain.domain_transfers.last + + expect(domain.domain_transfers.count).to eq(2) + + expect(trn_data.css('name').text).to eq('example.ee') + expect(trn_data.css('trStatus').text).to eq('pending') + expect(trn_data.css('reID').text).to eq('12345678') + expect(trn_data.css('reDate').text).to eq(dtl.transfer_requested_at.to_time.utc.to_s) + expect(trn_data.css('acDate').text).to eq(dtl.wait_until.to_time.utc.to_s) + expect(trn_data.css('acID').text).to eq('123') + expect(trn_data.css('exDate').text).to eq(domain.valid_to.to_time.utc.to_s) + + expect(domain.registrar).to eq(elkdata) + + # should return same data if pending already + response = epp_request(xml, :xml, :zone) + trn_data = response[:parsed].css('trnData') + + expect(domain.domain_transfers.count).to eq(2) + expect(trn_data.css('name').text).to eq('example.ee') + expect(trn_data.css('trStatus').text).to eq('pending') + expect(trn_data.css('reID').text).to eq('12345678') + expect(trn_data.css('reDate').text).to eq(dtl.transfer_requested_at.to_time.utc.to_s) + expect(trn_data.css('acDate').text).to eq(dtl.wait_until.to_time.utc.to_s) + expect(trn_data.css('acID').text).to eq('123') + expect(trn_data.css('exDate').text).to eq(domain.valid_to.to_time.utc.to_s) + + expect(domain.registrar).to eq(elkdata) + + # should show up in other registrar's poll + + response = epp_request(epp_xml.session.poll, :xml, :elkdata) + expect(response[:msg]).to eq('Command completed successfully; ack to dequeue') + msg_q = response[:parsed].css('msgQ') + expect(msg_q.css('qDate').text).to_not be_blank + expect(msg_q.css('msg').text).to eq('Transfer requested.') + expect(msg_q.first['id']).to_not be_blank + expect(msg_q.first['count']).to eq('1') + + xml = epp_xml.session.poll(poll: { + value: '', attrs: { op: 'ack', msgID: msg_q.first['id'] } + }) + + response = epp_request(xml, :xml, :elkdata) + expect(response[:msg]).to eq('Command completed successfully') + msg_q = response[:parsed].css('msgQ') + expect(msg_q.first['id']).to_not be_blank + expect(msg_q.first['count']).to eq('0') + end + + it 'creates a domain transfer with legal document' do + Setting.transfer_wait_time = 1 + expect(domain.legal_documents.count).to eq(0) + pw = domain.auth_info + xml = domain_transfer_xml({ authInfo: { pw: { value: pw } } }, 'query', { + _anonymus: [ + legalDocument: { + value: 'JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==', + attrs: { type: 'pdf' } + } + ] + }) + + response = epp_request(xml, :xml, :elkdata) + expect(response[:result_code]).to eq('1000') + expect(domain.legal_documents.count).to eq(1) + + log = ApiLog::EppLog.all + + expect(log.length).to eq(4) + expect(log[0].request_command).to eq('hello') + expect(log[0].request_successful).to eq(true) + + expect(log[1].request_command).to eq('login') + expect(log[1].request_successful).to eq(true) + expect(log[1].api_user_name).to eq('elkdata') + expect(log[1].api_user_registrar).to eq('Elkdata') + + expect(log[2].request_command).to eq('transfer') + expect(log[2].request_object).to eq('domain') + expect(log[2].request_successful).to eq(true) + expect(log[2].api_user_name).to eq('elkdata') + expect(log[2].api_user_registrar).to eq('Elkdata') + expect(log[2].request).not_to be_blank + expect(log[2].response).not_to be_blank + + expect(log[3].request_command).to eq('logout') + expect(log[3].request_successful).to eq(true) + expect(log[3].api_user_name).to eq('elkdata') + expect(log[3].api_user_registrar).to eq('Elkdata') + + response = epp_request(xml, :xml, :elkdata) + expect(response[:result_code]).to eq('1000') + expect(domain.legal_documents.count).to eq(1) # does not add another legal document + end + + it 'approves the transfer request' do + domain.domain_transfers.create({ + status: DomainTransfer::PENDING, + transfer_requested_at: Time.zone.now, + transfer_to: elkdata, + transfer_from: zone + }) + + xml = domain_transfer_xml({ authInfo: { pw: { value: domain.auth_info } } }, 'approve') + response = epp_request(xml, :xml, :zone) + domain.reload + dtl = domain.domain_transfers.last + + trn_data = response[:parsed].css('trnData') + + expect(trn_data.css('name').text).to eq('example.ee') + expect(trn_data.css('trStatus').text).to eq('clientApproved') + expect(trn_data.css('reID').text).to eq('123') + expect(trn_data.css('reDate').text).to eq(dtl.transfer_requested_at.to_time.utc.to_s) + expect(trn_data.css('acID').text).to eq('12345678') + expect(trn_data.css('exDate').text).to eq(domain.valid_to.to_time.utc.to_s) + end + + it 'rejects a domain transfer' do + domain.domain_transfers.create({ + status: DomainTransfer::PENDING, + transfer_requested_at: Time.zone.now, + transfer_to: elkdata, + transfer_from: zone + }) + + pw = domain.auth_info + xml = domain_transfer_xml({ authInfo: { pw: { value: pw } } }, 'reject', { + _anonymus: [ + legalDocument: { + value: 'JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==', + attrs: { type: 'pdf' } + } + ] + }) + + response = epp_request(xml, :xml, :elkdata) + expect(response[:result_code]).to eq('2304') + expect(response[:msg]).to eq('Transfer can be rejected only by current registrar') + expect(domain.legal_documents.count).to eq(0) + + response = epp_request(xml, :xml, :zone) + expect(response[:result_code]).to eq('1000') + expect(domain.pending_transfer).to be_nil + expect(domain.legal_documents.count).to eq(1) + end + + it 'prohibits wrong registrar from approving transfer' do + domain.domain_transfers.create({ + status: DomainTransfer::PENDING, + transfer_requested_at: Time.zone.now, + transfer_to: elkdata, + transfer_from: zone + }) + + xml = domain_transfer_xml({ authInfo: { pw: { value: domain.auth_info } } }, 'approve') + response = epp_request(xml, :xml, :elkdata) + expect(response[:result_code]).to eq('2304') + expect(response[:msg]).to eq('Transfer can be approved only by current domain registrar') + end + + it 'does not transfer with invalid pw' do + xml = domain_transfer_xml({ authInfo: { pw: { value: 'test' } } }) + response = epp_request(xml, :xml) + expect(response[:result_code]).to eq('2201') + expect(response[:msg]).to eq('Authorization error') + end + + it 'ignores transfer when owner registrar requests transfer' do + pw = domain.auth_info + xml = domain_transfer_xml({ authInfo: { pw: { value: pw } } }) + response = epp_request(xml, :xml, :zone) + + expect(response[:result_code]).to eq('2002') + expect(response[:msg]).to eq('Domain already belongs to the querying registrar') + end + + it 'returns an error for incorrect op attribute' do + response = epp_request(domain_transfer_xml({}, 'bla'), :xml, :zone) + expect(response[:result_code]).to eq('2306') + expect(response[:msg]).to eq('Attribute op is invalid') + end + + it 'creates new pw after successful transfer' do + pw = domain.auth_info + xml = domain_transfer_xml(pw: pw) + epp_request(xml, :xml, :elkdata) # transfer domain + response = epp_request(xml, :xml, :elkdata) # attempt second transfer + expect(response[:result_code]).to eq('2201') + expect(response[:msg]).to eq('Authorization error') + end ### UPDATE ### it 'updates a domain' do @@ -1339,6 +1324,12 @@ describe 'EPP Domain', epp: true do expect(inf_data.css('status').first[:s]).to eq('ok') end + it 'can not see other registrar domains' do + response = epp_request(domain_info_xml, :xml, :elkdata) + expect(response[:result_code]).to eq('2302') + expect(response[:msg]).to eq('Domain exists but belongs to other registrar') + end + ### DELETE ### it 'deletes domain' do expect(DomainContact.count).to eq(2)