blob: cb9cb309edec756918eb2eb1a8a1944a2157e921 [file] [log] [blame]
Sergiusz Bazanskie653e6a2019-07-20 16:36:00 +02001syntax = "proto3";
2package ix;
3
4message GetIXMembersRequest {
5 // IX ID from PeeringDB
6 int64 id = 1;
7}
8
Sergiusz Bazanski0607aba2019-08-02 13:38:22 +02009message PeeringDBMember {
10 int64 asn = 1;
11 // AS/network name.
12 string name = 2;
13
14 message Router {
15 // Per PeeringDB, at least one of the following two address families
16 // will be set.
17 string ipv4 = 1;
18 string ipv6 = 2;
19 }
20 repeated Router routers = 3;
21}
22
Sergiusz Bazanskie653e6a2019-07-20 16:36:00 +020023message GetIXMembersResponse {
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020024 repeated PeeringDBMember members = 1;
Sergiusz Bazanskie653e6a2019-07-20 16:36:00 +020025}
26
27service PeeringDBProxy {
28 // GetIXMembers returns information about membership of a given PeeringDB IX.
29 rpc GetIXMembers(GetIXMembersRequest) returns (GetIXMembersResponse);
30}
Sergiusz Bazanski6eaaaf92019-08-02 01:25:31 +020031
32message IRRQueryRequest {
33 // AS to query for. This needs be the AS number of the AS, possibly
34 // prefixed with 'as'/'AS'.
35 string as = 1;
36}
37
38message IRRAttribute {
39 message ImportExport {
40 message Expression {
41 string peering = 1;
42 string router_us = 2;
43 string router_them = 3;
44 repeated string actions = 4;
45 }
46 string protocol_from = 1;
47 string protocol_into = 2;
48 repeated Expression expressions = 3;
49 string filter = 4;
50 }
51
52 oneof value {
53 string remarks = 1;
54 ImportExport import = 2;
55 ImportExport export = 3;
56 }
57}
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020058
Sergiusz Bazanski6eaaaf92019-08-02 01:25:31 +020059message IRRQueryResponse {
60 enum Source {
61 SOURCE_INVALID = 0;
62 SOURCE_RIPE = 1;
63 SOURCE_ARIN = 2;
64 }
65 Source source = 1;
66 repeated IRRAttribute attributes = 2;
67}
68
69service IRR {
70 // Query returns parsed RPSL data from supported IRRs for a given aut-num.
71 rpc Query(IRRQueryRequest) returns (IRRQueryResponse);
72}
Sergiusz Bazanski0e223ec2019-07-23 00:53:50 +020073
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020074message ProcessorStatusRequest {
75}
76
77message ProcessorStatusResponse {
78 message Processor {
79 enum Status {
80 STATUS_INVALID = 0;
81 STATUS_OK = 1;
82 STATUS_ERROR = 2;
83 }
84 string name = 1;
85 Status status = 2;
86 int64 last_run = 3;
87 int64 next_run = 4;
88 }
89 repeated Processor processors = 1;
90}
91
92message PeerSummaryRequest {
93}
94
95message PeerSummaryResponse {
96 PeeringDBMember peeringdb_info = 1;
97 enum Status {
98 STATUS_INVALID = 0;
99 STATUS_OK = 1;
100 STATUS_FAILED = 2;
101 STATUS_UNKNOWN = 3;
102 }
103 Status check_status = 2;
104}
105
106message PeerDetailsRequest {
107 int64 asn = 1;
108}
109
110message PeerDetailsResponse {
111 message Check {
112 enum Status {
113 STATUS_INVALID = 0;
114 STATUS_OK = 1;
115 STATUS_FAILED = 2;
116 };
117 string name = 1;
118 Status status = 2;
119 int64 time = 3;
120 string msg = 4;
121 };
122 repeated Check checks = 1;
123
124 message AllowedPrefix {
125 string prefix = 1;
126 int64 max_length = 2;
127 string ta = 3;
128 };
129 repeated AllowedPrefix allowed_prefixes = 2;
130 PeeringDBMember peeringdb_info = 3;
131}
132
133service Verifier {
134 rpc ProcessorStatus(ProcessorStatusRequest) returns (ProcessorStatusResponse);
135 rpc PeerSummary(PeerSummaryRequest) returns (stream PeerSummaryResponse);
136 rpc PeerDetails(PeerDetailsRequest) returns (PeerDetailsResponse);
137}
138
Sergiusz Bazanski0e223ec2019-07-23 00:53:50 +0200139message KeyInfoRequest {
140 // Public key fingerprint. 20 bytes.
141 bytes fingerprint = 1;
142 enum Caching {
143 CACHING_INVALID = 0;
144 // Contact keyservers only if not locally (positively or negatively) cached.
145 CACHING_AUTO = 1;
146 // Force contacting keyservers.
147 CACHING_FORCE_REMOTE = 2;
148 // Force not contacting keyservers.
149 CACHING_FORCE_LOCAL = 3;
150 };
151 Caching caching = 2;
152}
153
154message KeyInfoResponse {
155 // Currently no data is returned. An error will be returned if the key doesn't exist.
156}
157
158message EncryptRequest {
159 // A chunk of plaintext data. Small enough to fit in gRPC message (<<2 MiB).
160 bytes data = 1;
161 enum ChunkInfo {
162 CHUNK_INFO_INVALID = 0;
163 // More data to come after this chunked.
164 CHUNK_INFO_MORE = 1;
165 // Last chunk.
166 CHUNK_LAST = 2;
167 };
168 ChunkInfo info = 2;
169 // Fingerprint of key to encrypt with. Only the first chunk is consulted,
170 // the key in the rest of the chunks are ignored. 20 bytes.
171 bytes fingerprint = 3;
172}
173
174message EncryptResponse {
175 // A chunk of encrypted data. Small enough to fit in gRPC message (<<2 MiB).
176 bytes data = 1;
177 enum ChunkInfo {
178 CHUNK_INFO_INVALID = 0;
179 // More data to come after this chunked.
180 CHUNK_INFO_MORE = 1;
181 // Last chunk.
182 CHUNK_LAST = 2;
183 };
184 ChunkInfo info = 2;
185}
186
187service PGPEncryptor {
188 // KeyInfo returns information about a given key from the public keyserver infrastructure.
189 // If key doesn't exist, error (NotFound).
190 rpc KeyInfo(KeyInfoRequest) returns (KeyInfoResponse);
191 // Encrypt encrypts a given data blob with a given key from public keyserver infrastructure.
192 // If key doesn't exist, error (NotFound).
193 rpc Encrypt(stream EncryptRequest) returns (stream EncryptResponse);