File Coverage

blib/lib/Regru/API/DNSSEC.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 18 18 100.0


line stmt bran cond sub pod time code
1              
2             # ABSTRACT: REG.API v2 DNSSEC management
3              
4             use strict;
5 1     1   504 use warnings;
  1         2  
  1         25  
6 1     1   4 use Moo;
  1         2  
  1         19  
7 1     1   4 use namespace::autoclean;
  1         1  
  1         5  
8 1     1   2388  
  1         2  
  1         7  
9             our $VERSION = '0.052'; # VERSION
10             our $AUTHORITY = 'cpan:CHIM'; # AUTHORITY
11              
12             with 'Regru::API::Role::Client';
13              
14             has '+namespace' => (
15             default => sub { 'dnssec' },
16             );
17              
18             nop
19 1     1   4 get_status
20             enable
21             disable
22             renew_ksk
23             renew_zsk
24             get_records
25             add_keys
26             )]}
27              
28             __PACKAGE__->namespace_methods;
29             __PACKAGE__->meta->make_immutable;
30              
31             1; # End of Regru::API::DNSSEC
32              
33              
34             =pod
35              
36             =encoding UTF-8
37              
38             =head1 NAME
39              
40             Regru::API::DNSSEC - REG.API v2 DNSSEC management
41              
42             =head1 VERSION
43              
44             version 0.052
45              
46             =head1 DESCRIPTION
47              
48             REG.API DNSSEC management methods
49              
50             =head1 ATTRIBUTES
51              
52             =head2 namespace
53              
54             Always returns the name of category: C<dnssec>. For internal uses only.
55              
56             =head1 REG.API METHODS
57              
58             =head2 nop
59              
60             For testing purposes to check the ability to manage DNSSEC of domains. Scope: B<clients>. Typical usage:
61              
62             $resp = $client->dnssec->nop(
63             domains => [
64             { dname => 'bluth-company.com' },
65             { dname => 'sitwell-enterprises.com' },
66             ],
67             );
68              
69             Answer will contains a field C<domains> with a list of domain names which allows to manage DNSSEC
70             or error otherwise.
71              
72             More info at L<DNSSEC management: nop|https://www.reg.com/support/help/api2#dnssec_nop>.
73              
74             =head2 get_status
75              
76             Gets DNSSEC status for domain(s). Scope: B<clients>. Typical usage:
77              
78             $resp = $client->dnssec->get_status(
79             domains => [
80             { dname => 'bluth-company.com' },
81             { dname => 'sitwell-enterprises.com' },
82             ],
83             );
84              
85             Answer will contains a field C<domains> with a list of results for each involved to this operation domain names (or
86             error otherwise) and subfield C<status> with one value of: enabled, disabled, updating.
87              
88             More info at L<DNSSEC management: get_status|https://www.reg.com/support/help/api2#dnssec_get_status>.
89              
90             =head2 enable
91              
92             Enables DNSSEC for domain(s), that uses REG.RU nameservers. Later you can use L</get_status> to check that operation
93             finished successfully. Scope: B<clients>. Typical usage:
94              
95             $resp = $client->dnssec->enable(
96             domains => [
97             { dname => 'bluth-company.com' },
98             { dname => 'sitwell-enterprises.com' },
99             ],
100             );
101              
102             Answer will contains a field C<domains> with a list of results for each involved to this operation domain names or
103             error otherwise.
104              
105             More info at L<DNSSEC management: enable|https://www.reg.com/support/help/api2#dnssec_enable>.
106              
107             =head2 disable
108              
109             Disables DNSSEC for domain(s), that uses REG.RU nameservers. Later you can use L</get_status> to check that operation
110             finished successfully. Scope: B<clients>. Typical usage:
111              
112             $resp = $client->dnssec->disable(
113             domains => [
114             { dname => 'bluth-company.com' },
115             { dname => 'sitwell-enterprises.com' },
116             ],
117             );
118              
119             Answer will contains a field C<domains> with a list of results for each involved to this operation domain names or
120             error otherwise.
121              
122             More info at L<DNSSEC management: disable|https://www.reg.com/support/help/api2#dnssec_disable>.
123              
124             =head2 renew_ksk
125              
126             Regenerates and updates KSK key for domain(s), that uses REG.RU nameservers. Later you can use L</get_status> to check
127             that operation finished successfully. Scope: B<clients>. Typical usage:
128              
129             $resp = $client->dnssec->renew_ksk(
130             domains => [
131             { dname => 'bluth-company.com' },
132             { dname => 'sitwell-enterprises.com' },
133             ],
134             );
135              
136             Answer will contains a field C<domains> with a list of results for each involved to this operation domain names or
137             error otherwise.
138              
139             More info at L<DNSSEC management: renew_ksk|https://www.reg.com/support/help/api2#dnssec_renew_ksk>.
140              
141             =head2 renew_zsk
142              
143             Regenerates and updates ZSK key for domain(s), that uses REG.RU nameservers. Later you can use L</get_status> to check
144             that operation finished successfully. Scope: B<clients>. Typical usage:
145              
146             $resp = $client->dnssec->renew_zsk(
147             domains => [
148             { dname => 'bluth-company.com' },
149             { dname => 'sitwell-enterprises.com' },
150             ],
151             );
152              
153             Answer will contains a field C<domains> with a list of results for each involved to this operation domain names or
154             error otherwise.
155              
156             More info at L<DNSSEC management: renew_zsk|https://www.reg.com/support/help/api2#dnssec_renew_zsk>.
157              
158             =head2 get_records
159              
160             Gets list of DNSSEC records of a domain(s). These are DNSKEY and DS records for domains those use REG.RU nameservers.
161             For other domains it will return DNSSEC records from the parent zone. Scope: B<clients>. Typical usage:
162              
163             $resp = $client->dnssec->get_records(
164             domains => [
165             { dname => 'bluth-company.com' },
166             { dname => 'sitwell-enterprises.com' },
167             ],
168             );
169              
170             Answer will contains a field C<domains> with a list of results for each involved to this operation domain names (or
171             error otherwise) and subfield records in described format.
172              
173             More info at L<DNSSEC management: get_records|https://www.reg.com/support/help/api2#dnssec_get_records>.
174              
175             =head2 add_keys
176              
177             Adds information about KSK keys to the parent zone. Can be used only for domains which don't use REG.RU nameservers. C<records>
178             field should contain array of DNSKEY/DS records or API will try to get records from authoritative DNS server if field missed or emty.
179             Later you can use L</get_status>, L</get_records> to check that operation finished successfully. Scope: B<clients>. Typical usage:
180              
181             $resp = $client->dnssec->add_keys(
182             domains => [
183             { dname => 'bluth-company.com', records => [
184             "bluth-company.com. 3600 IN DS 2371 13 2 4508a7798c38867c94091bbf91edaf9e6dbf56da0606c748d3d1d1b2382c1602"
185             ] },
186             { dname => 'sitwell-enterprises.com', records => [
187             "sitwell-enterprises.com. IN DNSKEY 257 3 13 X2ehOZBEVxU6baEa58fQx/6Y+gckDeq85XGFW8o6jWFB19wtv6aqdc8ycpIrQaZ4bSLYM7ZyLPJtP6UOkzslDg=="
188             ] },
189             ],
190             );
191              
192             Answer will contains a field C<domains> with a list of results for each involved to this operation domain names or
193             error otherwise.
194              
195             More info at L<DNSSEC management: add_keys|https://www.reg.com/support/help/api2#dnssec_add_keys>.
196              
197             =head1 SEE ALSO
198              
199             L<Regru::API>
200              
201             L<Regru::API::Role::Client>
202              
203             L<Regru::API::Domain>
204              
205             L<REG.API DNSSEC management|https://www.reg.com/support/help/api2#dnssec_functions>
206              
207             L<REG.API Common error codes|https://www.reg.com/support/help/api2#common_errors>
208              
209             =head1 BUGS
210              
211             Please report any bugs or feature requests on the bugtracker website
212             L<https://github.com/regru/regru-api-perl/issues>
213              
214             When submitting a bug or request, please include a test-file or a
215             patch to an existing test-file that illustrates the bug or desired
216             feature.
217              
218             =head1 AUTHORS
219              
220             =over 4
221              
222             =item *
223              
224             Polina Shubina <shubina@reg.ru>
225              
226             =item *
227              
228             Anton Gerasimov <a.gerasimov@reg.ru>
229              
230             =back
231              
232             =head1 COPYRIGHT AND LICENSE
233              
234             This software is copyright (c) 2013 by REG.RU LLC.
235              
236             This is free software; you can redistribute it and/or modify it under
237             the same terms as the Perl 5 programming language system itself.
238              
239             =cut