Skip to content
Snippets Groups Projects
Commit ef654834 authored by Malte Bauch's avatar Malte Bauch
Browse files

Initial commit

parents
Branches
Tags
No related merge requests found
build:
buf mod update proto
buf generate
lint:
buf lint
version: v1
managed:
enabled: true
go_package_prefix:
default: code.fbi.h-da.de/danet/quicsep/gen/go
except:
- buf.build/bufbuild/protovalidate
plugins:
- plugin: buf.build/grpc/go:v1.3.0
out: gen/go
opt:
- paths=source_relative
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: gen/go
opt:
- paths=source_relative
- plugin: buf.build/grpc/python:v1.59.2
out: gen/python
- plugin: buf.build/protocolbuffers/python:v25.0
out: gen/python
version: v1
directories:
- proto
module code.fbi.h-da.de/danet/quicsep/gen/go/internal
go 1.21
require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231030212536-12f9cba37c9d.2
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.31.0
)
require (
github.com/golang/protobuf v1.5.3 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
)
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231030212536-12f9cba37c9d.2 h1:m8rKyv88R8ZIR1549RMXckZ4FZJGxrq/7aRYl6U3WHc=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231030212536-12f9cba37c9d.2/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
This diff is collapsed.
// Version: 28.09.23
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: internal/quicsep.proto
package quipsecv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
KmsQkdmCommunicationService_Capabilities_FullMethodName = "/quipsec.v1.KmsQkdmCommunicationService/Capabilities"
KmsQkdmCommunicationService_PushKeys_FullMethodName = "/quipsec.v1.KmsQkdmCommunicationService/PushKeys"
KmsQkdmCommunicationService_QkdmMetadata_FullMethodName = "/quipsec.v1.KmsQkdmCommunicationService/QkdmMetadata"
KmsQkdmCommunicationService_ShutdownNotification_FullMethodName = "/quipsec.v1.KmsQkdmCommunicationService/ShutdownNotification"
)
// KmsQkdmCommunicationServiceClient is the client API for KmsQkdmCommunicationService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type KmsQkdmCommunicationServiceClient interface {
// Initial information about the QKDM.
Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error)
// NOTE: A stream could also be considered
// Push of keys from the QKDM to KMS in irregular intervals.
PushKeys(ctx context.Context, in *PushKeysRequest, opts ...grpc.CallOption) (*PushKeysResponse, error)
// Statistics and information about the QKDM.
QkdmMetadata(ctx context.Context, in *QkdmMetadataRequest, opts ...grpc.CallOption) (*QkdmMetadataResponse, error)
// Notification for the KMS on QKDM shutdown.
ShutdownNotification(ctx context.Context, in *ShutdownNotificationRequest, opts ...grpc.CallOption) (*ShutdownNotificationResponse, error)
}
type kmsQkdmCommunicationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewKmsQkdmCommunicationServiceClient(cc grpc.ClientConnInterface) KmsQkdmCommunicationServiceClient {
return &kmsQkdmCommunicationServiceClient{cc}
}
func (c *kmsQkdmCommunicationServiceClient) Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) {
out := new(CapabilitiesResponse)
err := c.cc.Invoke(ctx, KmsQkdmCommunicationService_Capabilities_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *kmsQkdmCommunicationServiceClient) PushKeys(ctx context.Context, in *PushKeysRequest, opts ...grpc.CallOption) (*PushKeysResponse, error) {
out := new(PushKeysResponse)
err := c.cc.Invoke(ctx, KmsQkdmCommunicationService_PushKeys_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *kmsQkdmCommunicationServiceClient) QkdmMetadata(ctx context.Context, in *QkdmMetadataRequest, opts ...grpc.CallOption) (*QkdmMetadataResponse, error) {
out := new(QkdmMetadataResponse)
err := c.cc.Invoke(ctx, KmsQkdmCommunicationService_QkdmMetadata_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *kmsQkdmCommunicationServiceClient) ShutdownNotification(ctx context.Context, in *ShutdownNotificationRequest, opts ...grpc.CallOption) (*ShutdownNotificationResponse, error) {
out := new(ShutdownNotificationResponse)
err := c.cc.Invoke(ctx, KmsQkdmCommunicationService_ShutdownNotification_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// KmsQkdmCommunicationServiceServer is the server API for KmsQkdmCommunicationService service.
// All implementations must embed UnimplementedKmsQkdmCommunicationServiceServer
// for forward compatibility
type KmsQkdmCommunicationServiceServer interface {
// Initial information about the QKDM.
Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesResponse, error)
// NOTE: A stream could also be considered
// Push of keys from the QKDM to KMS in irregular intervals.
PushKeys(context.Context, *PushKeysRequest) (*PushKeysResponse, error)
// Statistics and information about the QKDM.
QkdmMetadata(context.Context, *QkdmMetadataRequest) (*QkdmMetadataResponse, error)
// Notification for the KMS on QKDM shutdown.
ShutdownNotification(context.Context, *ShutdownNotificationRequest) (*ShutdownNotificationResponse, error)
mustEmbedUnimplementedKmsQkdmCommunicationServiceServer()
}
// UnimplementedKmsQkdmCommunicationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedKmsQkdmCommunicationServiceServer struct {
}
func (UnimplementedKmsQkdmCommunicationServiceServer) Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Capabilities not implemented")
}
func (UnimplementedKmsQkdmCommunicationServiceServer) PushKeys(context.Context, *PushKeysRequest) (*PushKeysResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PushKeys not implemented")
}
func (UnimplementedKmsQkdmCommunicationServiceServer) QkdmMetadata(context.Context, *QkdmMetadataRequest) (*QkdmMetadataResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method QkdmMetadata not implemented")
}
func (UnimplementedKmsQkdmCommunicationServiceServer) ShutdownNotification(context.Context, *ShutdownNotificationRequest) (*ShutdownNotificationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ShutdownNotification not implemented")
}
func (UnimplementedKmsQkdmCommunicationServiceServer) mustEmbedUnimplementedKmsQkdmCommunicationServiceServer() {
}
// UnsafeKmsQkdmCommunicationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to KmsQkdmCommunicationServiceServer will
// result in compilation errors.
type UnsafeKmsQkdmCommunicationServiceServer interface {
mustEmbedUnimplementedKmsQkdmCommunicationServiceServer()
}
func RegisterKmsQkdmCommunicationServiceServer(s grpc.ServiceRegistrar, srv KmsQkdmCommunicationServiceServer) {
s.RegisterService(&KmsQkdmCommunicationService_ServiceDesc, srv)
}
func _KmsQkdmCommunicationService_Capabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CapabilitiesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KmsQkdmCommunicationServiceServer).Capabilities(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: KmsQkdmCommunicationService_Capabilities_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KmsQkdmCommunicationServiceServer).Capabilities(ctx, req.(*CapabilitiesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _KmsQkdmCommunicationService_PushKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PushKeysRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KmsQkdmCommunicationServiceServer).PushKeys(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: KmsQkdmCommunicationService_PushKeys_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KmsQkdmCommunicationServiceServer).PushKeys(ctx, req.(*PushKeysRequest))
}
return interceptor(ctx, in, info, handler)
}
func _KmsQkdmCommunicationService_QkdmMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QkdmMetadataRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KmsQkdmCommunicationServiceServer).QkdmMetadata(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: KmsQkdmCommunicationService_QkdmMetadata_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KmsQkdmCommunicationServiceServer).QkdmMetadata(ctx, req.(*QkdmMetadataRequest))
}
return interceptor(ctx, in, info, handler)
}
func _KmsQkdmCommunicationService_ShutdownNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ShutdownNotificationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KmsQkdmCommunicationServiceServer).ShutdownNotification(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: KmsQkdmCommunicationService_ShutdownNotification_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KmsQkdmCommunicationServiceServer).ShutdownNotification(ctx, req.(*ShutdownNotificationRequest))
}
return interceptor(ctx, in, info, handler)
}
// KmsQkdmCommunicationService_ServiceDesc is the grpc.ServiceDesc for KmsQkdmCommunicationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var KmsQkdmCommunicationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "quipsec.v1.KmsQkdmCommunicationService",
HandlerType: (*KmsQkdmCommunicationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Capabilities",
Handler: _KmsQkdmCommunicationService_Capabilities_Handler,
},
{
MethodName: "PushKeys",
Handler: _KmsQkdmCommunicationService_PushKeys_Handler,
},
{
MethodName: "QkdmMetadata",
Handler: _KmsQkdmCommunicationService_QkdmMetadata_Handler,
},
{
MethodName: "ShutdownNotification",
Handler: _KmsQkdmCommunicationService_ShutdownNotification_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "internal/quicsep.proto",
}
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: internal/quicsep.proto
# Protobuf Python Version: 4.25.0
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16internal/quicsep.proto\x12\nquipsec.v1\x1a\x1b\x62uf/validate/validate.proto\"Z\n\x08Metadata\x12\x1c\n\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\x12\x16\n\x06vendor\x18\x02 \x01(\tR\x06vendor\x12\x18\n\x07version\x18\x03 \x01(\tR\x07version\"\xc5\x01\n\x07KeyBulk\x12\x1c\n\x05keyId\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x05keyId\x12\x1a\n\x04keys\x18\x02 \x01(\x0c\x42\x06\xbaH\x03\xc8\x01\x01R\x04keys\x12$\n\tkeyLength\x18\x03 \x01(\x04\x42\x06\xbaH\x03\xc8\x01\x01R\tkeyLength\x12 \n\x07keyHash\x18\x04 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x07keyHash\x12\x38\n\x08metadata\x18\x05 \x01(\x0b\x32\x14.quipsec.v1.MetadataB\x06\xbaH\x03\xc8\x01\x01R\x08metadata\"7\n\x13\x43\x61pabilitiesRequest\x12 \n\x07version\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x07version\"8\n\x14\x43\x61pabilitiesResponse\x12 \n\x07version\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x07version\"n\n\x0fPushKeysRequest\x12$\n\ttimestamp\x18\x01 \x01(\x03\x42\x06\xbaH\x03\xc8\x01\x01R\ttimestamp\x12\x35\n\x07keyBulk\x18\x02 \x01(\x0b\x32\x13.quipsec.v1.KeyBulkB\x06\xbaH\x03\xc8\x01\x01R\x07keyBulk\"8\n\x10PushKeysResponse\x12$\n\ttimestamp\x18\x01 \x01(\x03\x42\x06\xbaH\x03\xc8\x01\x01R\ttimestamp\";\n\x13QkdmMetadataRequest\x12$\n\ttimestamp\x18\x01 \x01(\x03\x42\x06\xbaH\x03\xc8\x01\x01R\ttimestamp\"v\n\x14QkdmMetadataResponse\x12$\n\ttimestamp\x18\x01 \x01(\x03\x42\x06\xbaH\x03\xc8\x01\x01R\ttimestamp\x12\x38\n\x08metadata\x18\x02 \x01(\x0b\x32\x14.quipsec.v1.MetadataB\x06\xbaH\x03\xc8\x01\x01R\x08metadata\"M\n\x1bShutdownNotificationRequest\x12.\n\x0eshutdownReason\x18\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x0eshutdownReason\"\x1e\n\x1cShutdownNotificationResponse2\xfd\x02\n\x1bKmsQkdmCommunicationService\x12S\n\x0c\x43\x61pabilities\x12\x1f.quipsec.v1.CapabilitiesRequest\x1a .quipsec.v1.CapabilitiesResponse\"\x00\x12G\n\x08PushKeys\x12\x1b.quipsec.v1.PushKeysRequest\x1a\x1c.quipsec.v1.PushKeysResponse\"\x00\x12S\n\x0cQkdmMetadata\x12\x1f.quipsec.v1.QkdmMetadataRequest\x1a .quipsec.v1.QkdmMetadataResponse\"\x00\x12k\n\x14ShutdownNotification\x12\'.quipsec.v1.ShutdownNotificationRequest\x1a(.quipsec.v1.ShutdownNotificationResponse\"\x00\x42\xa1\x01\n\x0e\x63om.quipsec.v1B\x0cQuicsepProtoP\x01Z8code.fbi.h-da.de/danet/quicsep/gen/go/internal;quipsecv1\xa2\x02\x03QXX\xaa\x02\nQuipsec.V1\xca\x02\nQuipsec\\V1\xe2\x02\x16Quipsec\\V1\\GPBMetadata\xea\x02\x0bQuipsec::V1b\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'internal.quicsep_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS == False:
_globals['DESCRIPTOR']._options = None
_globals['DESCRIPTOR']._serialized_options = b'\n\016com.quipsec.v1B\014QuicsepProtoP\001Z8code.fbi.h-da.de/danet/quicsep/gen/go/internal;quipsecv1\242\002\003QXX\252\002\nQuipsec.V1\312\002\nQuipsec\\V1\342\002\026Quipsec\\V1\\GPBMetadata\352\002\013Quipsec::V1'
_globals['_KEYBULK'].fields_by_name['keyId']._options = None
_globals['_KEYBULK'].fields_by_name['keyId']._serialized_options = b'\272H\003\310\001\001'
_globals['_KEYBULK'].fields_by_name['keys']._options = None
_globals['_KEYBULK'].fields_by_name['keys']._serialized_options = b'\272H\003\310\001\001'
_globals['_KEYBULK'].fields_by_name['keyLength']._options = None
_globals['_KEYBULK'].fields_by_name['keyLength']._serialized_options = b'\272H\003\310\001\001'
_globals['_KEYBULK'].fields_by_name['keyHash']._options = None
_globals['_KEYBULK'].fields_by_name['keyHash']._serialized_options = b'\272H\003\310\001\001'
_globals['_KEYBULK'].fields_by_name['metadata']._options = None
_globals['_KEYBULK'].fields_by_name['metadata']._serialized_options = b'\272H\003\310\001\001'
_globals['_CAPABILITIESREQUEST'].fields_by_name['version']._options = None
_globals['_CAPABILITIESREQUEST'].fields_by_name['version']._serialized_options = b'\272H\003\310\001\001'
_globals['_CAPABILITIESRESPONSE'].fields_by_name['version']._options = None
_globals['_CAPABILITIESRESPONSE'].fields_by_name['version']._serialized_options = b'\272H\003\310\001\001'
_globals['_PUSHKEYSREQUEST'].fields_by_name['timestamp']._options = None
_globals['_PUSHKEYSREQUEST'].fields_by_name['timestamp']._serialized_options = b'\272H\003\310\001\001'
_globals['_PUSHKEYSREQUEST'].fields_by_name['keyBulk']._options = None
_globals['_PUSHKEYSREQUEST'].fields_by_name['keyBulk']._serialized_options = b'\272H\003\310\001\001'
_globals['_PUSHKEYSRESPONSE'].fields_by_name['timestamp']._options = None
_globals['_PUSHKEYSRESPONSE'].fields_by_name['timestamp']._serialized_options = b'\272H\003\310\001\001'
_globals['_QKDMMETADATAREQUEST'].fields_by_name['timestamp']._options = None
_globals['_QKDMMETADATAREQUEST'].fields_by_name['timestamp']._serialized_options = b'\272H\003\310\001\001'
_globals['_QKDMMETADATARESPONSE'].fields_by_name['timestamp']._options = None
_globals['_QKDMMETADATARESPONSE'].fields_by_name['timestamp']._serialized_options = b'\272H\003\310\001\001'
_globals['_QKDMMETADATARESPONSE'].fields_by_name['metadata']._options = None
_globals['_QKDMMETADATARESPONSE'].fields_by_name['metadata']._serialized_options = b'\272H\003\310\001\001'
_globals['_SHUTDOWNNOTIFICATIONREQUEST'].fields_by_name['shutdownReason']._options = None
_globals['_SHUTDOWNNOTIFICATIONREQUEST'].fields_by_name['shutdownReason']._serialized_options = b'\272H\003\310\001\001'
_globals['_METADATA']._serialized_start=67
_globals['_METADATA']._serialized_end=157
_globals['_KEYBULK']._serialized_start=160
_globals['_KEYBULK']._serialized_end=357
_globals['_CAPABILITIESREQUEST']._serialized_start=359
_globals['_CAPABILITIESREQUEST']._serialized_end=414
_globals['_CAPABILITIESRESPONSE']._serialized_start=416
_globals['_CAPABILITIESRESPONSE']._serialized_end=472
_globals['_PUSHKEYSREQUEST']._serialized_start=474
_globals['_PUSHKEYSREQUEST']._serialized_end=584
_globals['_PUSHKEYSRESPONSE']._serialized_start=586
_globals['_PUSHKEYSRESPONSE']._serialized_end=642
_globals['_QKDMMETADATAREQUEST']._serialized_start=644
_globals['_QKDMMETADATAREQUEST']._serialized_end=703
_globals['_QKDMMETADATARESPONSE']._serialized_start=705
_globals['_QKDMMETADATARESPONSE']._serialized_end=823
_globals['_SHUTDOWNNOTIFICATIONREQUEST']._serialized_start=825
_globals['_SHUTDOWNNOTIFICATIONREQUEST']._serialized_end=902
_globals['_SHUTDOWNNOTIFICATIONRESPONSE']._serialized_start=904
_globals['_SHUTDOWNNOTIFICATIONRESPONSE']._serialized_end=934
_globals['_KMSQKDMCOMMUNICATIONSERVICE']._serialized_start=937
_globals['_KMSQKDMCOMMUNICATIONSERVICE']._serialized_end=1318
# @@protoc_insertion_point(module_scope)
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from internal import quicsep_pb2 as internal_dot_quicsep__pb2
class KmsQkdmCommunicationServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Capabilities = channel.unary_unary(
'/quipsec.v1.KmsQkdmCommunicationService/Capabilities',
request_serializer=internal_dot_quicsep__pb2.CapabilitiesRequest.SerializeToString,
response_deserializer=internal_dot_quicsep__pb2.CapabilitiesResponse.FromString,
)
self.PushKeys = channel.unary_unary(
'/quipsec.v1.KmsQkdmCommunicationService/PushKeys',
request_serializer=internal_dot_quicsep__pb2.PushKeysRequest.SerializeToString,
response_deserializer=internal_dot_quicsep__pb2.PushKeysResponse.FromString,
)
self.QkdmMetadata = channel.unary_unary(
'/quipsec.v1.KmsQkdmCommunicationService/QkdmMetadata',
request_serializer=internal_dot_quicsep__pb2.QkdmMetadataRequest.SerializeToString,
response_deserializer=internal_dot_quicsep__pb2.QkdmMetadataResponse.FromString,
)
self.ShutdownNotification = channel.unary_unary(
'/quipsec.v1.KmsQkdmCommunicationService/ShutdownNotification',
request_serializer=internal_dot_quicsep__pb2.ShutdownNotificationRequest.SerializeToString,
response_deserializer=internal_dot_quicsep__pb2.ShutdownNotificationResponse.FromString,
)
class KmsQkdmCommunicationServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def Capabilities(self, request, context):
"""Initial information about the QKDM.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PushKeys(self, request, context):
"""NOTE: A stream could also be considered
Push of keys from the QKDM to KMS in irregular intervals.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def QkdmMetadata(self, request, context):
"""Statistics and information about the QKDM.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ShutdownNotification(self, request, context):
"""Notification for the KMS on QKDM shutdown.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_KmsQkdmCommunicationServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'Capabilities': grpc.unary_unary_rpc_method_handler(
servicer.Capabilities,
request_deserializer=internal_dot_quicsep__pb2.CapabilitiesRequest.FromString,
response_serializer=internal_dot_quicsep__pb2.CapabilitiesResponse.SerializeToString,
),
'PushKeys': grpc.unary_unary_rpc_method_handler(
servicer.PushKeys,
request_deserializer=internal_dot_quicsep__pb2.PushKeysRequest.FromString,
response_serializer=internal_dot_quicsep__pb2.PushKeysResponse.SerializeToString,
),
'QkdmMetadata': grpc.unary_unary_rpc_method_handler(
servicer.QkdmMetadata,
request_deserializer=internal_dot_quicsep__pb2.QkdmMetadataRequest.FromString,
response_serializer=internal_dot_quicsep__pb2.QkdmMetadataResponse.SerializeToString,
),
'ShutdownNotification': grpc.unary_unary_rpc_method_handler(
servicer.ShutdownNotification,
request_deserializer=internal_dot_quicsep__pb2.ShutdownNotificationRequest.FromString,
response_serializer=internal_dot_quicsep__pb2.ShutdownNotificationResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'quipsec.v1.KmsQkdmCommunicationService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class KmsQkdmCommunicationService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def Capabilities(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/quipsec.v1.KmsQkdmCommunicationService/Capabilities',
internal_dot_quicsep__pb2.CapabilitiesRequest.SerializeToString,
internal_dot_quicsep__pb2.CapabilitiesResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def PushKeys(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/quipsec.v1.KmsQkdmCommunicationService/PushKeys',
internal_dot_quicsep__pb2.PushKeysRequest.SerializeToString,
internal_dot_quicsep__pb2.PushKeysResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def QkdmMetadata(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/quipsec.v1.KmsQkdmCommunicationService/QkdmMetadata',
internal_dot_quicsep__pb2.QkdmMetadataRequest.SerializeToString,
internal_dot_quicsep__pb2.QkdmMetadataResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def ShutdownNotification(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/quipsec.v1.KmsQkdmCommunicationService/ShutdownNotification',
internal_dot_quicsep__pb2.ShutdownNotificationRequest.SerializeToString,
internal_dot_quicsep__pb2.ShutdownNotificationResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
# Generated by buf. DO NOT EDIT.
version: v1
deps:
- remote: buf.build
owner: bufbuild
repository: protovalidate
commit: 12f9cba37c9d49eeb6827dde227d6031
digest: shake256:a9470135a1736bdb74396e35342b4431b0bf3a5e7a2198fb77f49be46af744aae134f8e0593683216e836f1f0a551ccf86a9f8857c6829b8d33f4b604602a5ff
version: v1
deps:
- buf.build/bufbuild/protovalidate
breaking:
use:
- FILE
lint:
use:
- DEFAULT
// Version: 28.09.23
syntax = "proto3";
package quipsec.v1;
import "buf/validate/validate.proto";
service KmsQkdmCommunicationService {
// Initial information about the QKDM.
rpc Capabilities(CapabilitiesRequest) returns (CapabilitiesResponse) {}
// NOTE: A stream could also be considered
// Push of keys from the QKDM to KMS in irregular intervals.
rpc PushKeys(PushKeysRequest) returns (PushKeysResponse) {}
// Statistics and information about the QKDM.
rpc QkdmMetadata(QkdmMetadataRequest) returns (QkdmMetadataResponse) {}
// Notification for the KMS on QKDM shutdown.
rpc ShutdownNotification(ShutdownNotificationRequest) returns (ShutdownNotificationResponse) {}
}
message Metadata {
int64 timestamp = 1;
string vendor = 2;
string version = 3;
// key generation rate?
//...
}
message KeyBulk {
string keyId = 1 [(buf.validate.field).required = true];
bytes keys = 2 [(buf.validate.field).required = true];
uint64 keyLength = 3 [(buf.validate.field).required = true];
string keyHash = 4 [(buf.validate.field).required = true];
Metadata metadata = 5 [(buf.validate.field).required = true];
}
message CapabilitiesRequest {
string version = 1 [(buf.validate.field).required = true];
}
message CapabilitiesResponse {
string version = 1 [(buf.validate.field).required = true]; }
message PushKeysRequest {
int64 timestamp = 1 [(buf.validate.field).required = true];
KeyBulk keyBulk = 2 [(buf.validate.field).required = true];
}
message PushKeysResponse {
int64 timestamp = 1 [(buf.validate.field).required = true];
}
message QkdmMetadataRequest {
int64 timestamp = 1 [(buf.validate.field).required = true];
}
message QkdmMetadataResponse {
int64 timestamp = 1 [(buf.validate.field).required = true];
Metadata metadata = 2 [(buf.validate.field).required = true];
}
message ShutdownNotificationRequest {
string shutdownReason = 1 [(buf.validate.field).required = true];
}
message ShutdownNotificationResponse {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment