blob: ce84b48773f416abfd2126887e5e31a8d6591247 [file] [log] [blame]
syntax = "proto3";
package ix;
message GetIXMembersRequest {
// IX ID from PeeringDB
int64 id = 1;
}
message PeeringDBMember {
int64 asn = 1;
// AS/network name.
string name = 2;
message Router {
// Per PeeringDB, at least one of the following two address families
// will be set.
string ipv4 = 1;
string ipv6 = 2;
}
repeated Router routers = 3;
}
message GetIXMembersResponse {
message Member {
int64 asn = 1;
// Per PeeringDB, at least one of the following two address families
// will be set.
string ipv4 = 2;
string ipv6 = 3;
// AS/network name.
string name = 4;
};
repeated Member members = 1;
}
service PeeringDBProxy {
// GetIXMembers returns information about membership of a given PeeringDB IX.
rpc GetIXMembers(GetIXMembersRequest) returns (GetIXMembersResponse);
}
message IRRQueryRequest {
// AS to query for. This needs be the AS number of the AS, possibly
// prefixed with 'as'/'AS'.
string as = 1;
}
message IRRAttribute {
message ImportExport {
message Expression {
string peering = 1;
string router_us = 2;
string router_them = 3;
repeated string actions = 4;
}
string protocol_from = 1;
string protocol_into = 2;
repeated Expression expressions = 3;
string filter = 4;
}
oneof value {
string remarks = 1;
ImportExport import = 2;
ImportExport export = 3;
}
}
message IRRQueryResponse {
enum Source {
SOURCE_INVALID = 0;
SOURCE_RIPE = 1;
SOURCE_ARIN = 2;
}
Source source = 1;
repeated IRRAttribute attributes = 2;
}
service IRR {
// Query returns parsed RPSL data from supported IRRs for a given aut-num.
rpc Query(IRRQueryRequest) returns (IRRQueryResponse);
}
message KeyInfoRequest {
// Public key fingerprint. 20 bytes.
bytes fingerprint = 1;
enum Caching {
CACHING_INVALID = 0;
// Contact keyservers only if not locally (positively or negatively) cached.
CACHING_AUTO = 1;
// Force contacting keyservers.
CACHING_FORCE_REMOTE = 2;
// Force not contacting keyservers.
CACHING_FORCE_LOCAL = 3;
};
Caching caching = 2;
}
message KeyInfoResponse {
// Currently no data is returned. An error will be returned if the key doesn't exist.
}
message EncryptRequest {
// A chunk of plaintext data. Small enough to fit in gRPC message (<<2 MiB).
bytes data = 1;
enum ChunkInfo {
CHUNK_INFO_INVALID = 0;
// More data to come after this chunked.
CHUNK_INFO_MORE = 1;
// Last chunk.
CHUNK_LAST = 2;
};
ChunkInfo info = 2;
// Fingerprint of key to encrypt with. Only the first chunk is consulted,
// the key in the rest of the chunks are ignored. 20 bytes.
bytes fingerprint = 3;
}
message EncryptResponse {
// A chunk of encrypted data. Small enough to fit in gRPC message (<<2 MiB).
bytes data = 1;
enum ChunkInfo {
CHUNK_INFO_INVALID = 0;
// More data to come after this chunked.
CHUNK_INFO_MORE = 1;
// Last chunk.
CHUNK_LAST = 2;
};
ChunkInfo info = 2;
}
service PGPEncryptor {
// KeyInfo returns information about a given key from the public keyserver infrastructure.
// If key doesn't exist, error (NotFound).
rpc KeyInfo(KeyInfoRequest) returns (KeyInfoResponse);
// Encrypt encrypts a given data blob with a given key from public keyserver infrastructure.
// If key doesn't exist, error (NotFound).
rpc Encrypt(stream EncryptRequest) returns (stream EncryptResponse);
}