security

package
v2.0.156 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Certificate_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "security.Certificate",
	HandlerType: (*CertificateServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "IssueCertificate",
			Handler:    _Certificate_IssueCertificate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/apis/security/v1/security.proto",
}

Certificate_ServiceDesc is the grpc.ServiceDesc for Certificate service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_pkg_apis_security_v1_security_proto protoreflect.FileDescriptor

Functions

func RegisterCertificateServer

func RegisterCertificateServer(s grpc.ServiceRegistrar, srv CertificateServer)

Types

type CertificateClient

type CertificateClient interface {
	// Using provided CSR, returns a signed certificate.
	IssueCertificate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error)
}

CertificateClient is the client API for Certificate 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 CertificateRequest

type CertificateRequest struct {

	// ASN.1 DER form certificate request.
	// The public key in the CSR is used to generate the certificate,
	// and other fields in the generated certificate may be overwritten by the CA.
	Csr []byte `protobuf:"bytes,1,opt,name=csr,proto3" json:"csr,omitempty"`
	// Optional: requested certificate validity period.
	ValidityPeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=validity_period,json=validityPeriod,proto3" json:"validity_period,omitempty"`
	// contains filtered or unexported fields
}

Certificate request type. Dragonfly supports peers authentication with Mutual TLS(mTLS) For mTLS, all peers need to request TLS certificates for communicating The server side may overwrite ant requested certificate filed based on its policies.

func (*CertificateRequest) Descriptor deprecated

func (*CertificateRequest) Descriptor() ([]byte, []int)

Deprecated: Use CertificateRequest.ProtoReflect.Descriptor instead.

func (*CertificateRequest) GetCsr

func (x *CertificateRequest) GetCsr() []byte

func (*CertificateRequest) GetValidityPeriod

func (x *CertificateRequest) GetValidityPeriod() *durationpb.Duration

func (*CertificateRequest) ProtoMessage

func (*CertificateRequest) ProtoMessage()

func (*CertificateRequest) ProtoReflect

func (x *CertificateRequest) ProtoReflect() protoreflect.Message

func (*CertificateRequest) Reset

func (x *CertificateRequest) Reset()

func (*CertificateRequest) String

func (x *CertificateRequest) String() string

func (*CertificateRequest) Validate

func (m *CertificateRequest) Validate() error

Validate checks the field values on CertificateRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CertificateRequest) ValidateAll

func (m *CertificateRequest) ValidateAll() error

ValidateAll checks the field values on CertificateRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CertificateRequestMultiError, or nil if none found.

type CertificateRequestMultiError

type CertificateRequestMultiError []error

CertificateRequestMultiError is an error wrapping multiple validation errors returned by CertificateRequest.ValidateAll() if the designated constraints aren't met.

func (CertificateRequestMultiError) AllErrors

func (m CertificateRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CertificateRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CertificateRequestValidationError

type CertificateRequestValidationError struct {
	// contains filtered or unexported fields
}

CertificateRequestValidationError is the validation error returned by CertificateRequest.Validate if the designated constraints aren't met.

func (CertificateRequestValidationError) Cause

Cause function returns cause value.

func (CertificateRequestValidationError) Error

Error satisfies the builtin error interface

func (CertificateRequestValidationError) ErrorName

ErrorName returns error name.

func (CertificateRequestValidationError) Field

Field function returns field value.

func (CertificateRequestValidationError) Key

Key function returns key value.

func (CertificateRequestValidationError) Reason

Reason function returns reason value.

type CertificateResponse

type CertificateResponse struct {

	// ASN.1 DER form certificate chain.
	CertificateChain [][]byte `protobuf:"bytes,1,rep,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"`
	// contains filtered or unexported fields
}

Certificate response type.

func (*CertificateResponse) Descriptor deprecated

func (*CertificateResponse) Descriptor() ([]byte, []int)

Deprecated: Use CertificateResponse.ProtoReflect.Descriptor instead.

func (*CertificateResponse) GetCertificateChain

func (x *CertificateResponse) GetCertificateChain() [][]byte

func (*CertificateResponse) ProtoMessage

func (*CertificateResponse) ProtoMessage()

func (*CertificateResponse) ProtoReflect

func (x *CertificateResponse) ProtoReflect() protoreflect.Message

func (*CertificateResponse) Reset

func (x *CertificateResponse) Reset()

func (*CertificateResponse) String

func (x *CertificateResponse) String() string

func (*CertificateResponse) Validate

func (m *CertificateResponse) Validate() error

Validate checks the field values on CertificateResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CertificateResponse) ValidateAll

func (m *CertificateResponse) ValidateAll() error

ValidateAll checks the field values on CertificateResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CertificateResponseMultiError, or nil if none found.

type CertificateResponseMultiError

type CertificateResponseMultiError []error

CertificateResponseMultiError is an error wrapping multiple validation errors returned by CertificateResponse.ValidateAll() if the designated constraints aren't met.

func (CertificateResponseMultiError) AllErrors

func (m CertificateResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CertificateResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CertificateResponseValidationError

type CertificateResponseValidationError struct {
	// contains filtered or unexported fields
}

CertificateResponseValidationError is the validation error returned by CertificateResponse.Validate if the designated constraints aren't met.

func (CertificateResponseValidationError) Cause

Cause function returns cause value.

func (CertificateResponseValidationError) Error

Error satisfies the builtin error interface

func (CertificateResponseValidationError) ErrorName

ErrorName returns error name.

func (CertificateResponseValidationError) Field

Field function returns field value.

func (CertificateResponseValidationError) Key

Key function returns key value.

func (CertificateResponseValidationError) Reason

Reason function returns reason value.

type CertificateServer

type CertificateServer interface {
	// Using provided CSR, returns a signed certificate.
	IssueCertificate(context.Context, *CertificateRequest) (*CertificateResponse, error)
}

CertificateServer is the server API for Certificate service. All implementations should embed UnimplementedCertificateServer for forward compatibility

type UnimplementedCertificateServer

type UnimplementedCertificateServer struct {
}

UnimplementedCertificateServer should be embedded to have forward compatible implementations.

func (UnimplementedCertificateServer) IssueCertificate

type UnsafeCertificateServer

type UnsafeCertificateServer interface {
	// contains filtered or unexported methods
}

UnsafeCertificateServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CertificateServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL