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