sshsigner

package
v0.0.0-...-538e00c Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

Package sshsigner is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_sshsigner_v1alpha1_sshsigner_proto protoreflect.FileDescriptor

Functions

func RegisterSignerHandler

func RegisterSignerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSignerHandler registers the http handlers for service Signer to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSignerHandlerClient

func RegisterSignerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SignerClient) error

RegisterSignerHandlerClient registers the http handlers for service Signer to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SignerClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SignerClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SignerClient" to call the correct interceptors.

func RegisterSignerHandlerFromEndpoint

func RegisterSignerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSignerHandlerFromEndpoint is same as RegisterSignerHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSignerHandlerServer

func RegisterSignerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SignerServer) error

RegisterSignerHandlerServer registers the http handlers for service Signer to "mux". UnaryRPC :call SignerServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterSignerServer

func RegisterSignerServer(s *grpc.Server, srv SignerServer)

Types

type HostSignersResponse

type HostSignersResponse struct {
	VerificationKeys []*VerificationKey `protobuf:"bytes,1,rep,name=verification_keys,proto3" json:"verification_keys,omitempty"`
	// contains filtered or unexported fields
}

func (*HostSignersResponse) Descriptor deprecated

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

Deprecated: Use HostSignersResponse.ProtoReflect.Descriptor instead.

func (*HostSignersResponse) GetVerificationKeys

func (x *HostSignersResponse) GetVerificationKeys() []*VerificationKey

func (*HostSignersResponse) ProtoMessage

func (*HostSignersResponse) ProtoMessage()

func (*HostSignersResponse) ProtoReflect

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

func (*HostSignersResponse) Reset

func (x *HostSignersResponse) Reset()

func (*HostSignersResponse) String

func (x *HostSignersResponse) String() string

type SignHostKeyRequest

type SignHostKeyRequest struct {

	// The host key to sign, in authorized_keys format
	PublicKey string `protobuf:"bytes,1,opt,name=public_key,proto3" json:"public_key,omitempty"`
	// The hostnames to embed in the certificate principals
	Hostnames []string `protobuf:"bytes,2,rep,name=hostnames,proto3" json:"hostnames,omitempty"`
	// contains filtered or unexported fields
}

func (*SignHostKeyRequest) Descriptor deprecated

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

Deprecated: Use SignHostKeyRequest.ProtoReflect.Descriptor instead.

func (*SignHostKeyRequest) GetHostnames

func (x *SignHostKeyRequest) GetHostnames() []string

func (*SignHostKeyRequest) GetPublicKey

func (x *SignHostKeyRequest) GetPublicKey() string

func (*SignHostKeyRequest) ProtoMessage

func (*SignHostKeyRequest) ProtoMessage()

func (*SignHostKeyRequest) ProtoReflect

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

func (*SignHostKeyRequest) Reset

func (x *SignHostKeyRequest) Reset()

func (*SignHostKeyRequest) String

func (x *SignHostKeyRequest) String() string

type SignHostKeyResponse

type SignHostKeyResponse struct {

	// signed host key, in authorized_keys format
	SignedCertificate string `protobuf:"bytes,1,opt,name=signed_certificate,proto3" json:"signed_certificate,omitempty"`
	// contains filtered or unexported fields
}

func (*SignHostKeyResponse) Descriptor deprecated

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

Deprecated: Use SignHostKeyResponse.ProtoReflect.Descriptor instead.

func (*SignHostKeyResponse) GetSignedCertificate

func (x *SignHostKeyResponse) GetSignedCertificate() string

func (*SignHostKeyResponse) ProtoMessage

func (*SignHostKeyResponse) ProtoMessage()

func (*SignHostKeyResponse) ProtoReflect

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

func (*SignHostKeyResponse) Reset

func (x *SignHostKeyResponse) Reset()

func (*SignHostKeyResponse) String

func (x *SignHostKeyResponse) String() string

type SignUserKeyRequest

type SignUserKeyRequest struct {

	// The users public key to sign, in authorized_keys format
	PublicKey string `protobuf:"bytes,1,opt,name=public_key,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

func (*SignUserKeyRequest) Descriptor deprecated

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

Deprecated: Use SignUserKeyRequest.ProtoReflect.Descriptor instead.

func (*SignUserKeyRequest) GetPublicKey

func (x *SignUserKeyRequest) GetPublicKey() string

func (*SignUserKeyRequest) ProtoMessage

func (*SignUserKeyRequest) ProtoMessage()

func (*SignUserKeyRequest) ProtoReflect

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

func (*SignUserKeyRequest) Reset

func (x *SignUserKeyRequest) Reset()

func (*SignUserKeyRequest) String

func (x *SignUserKeyRequest) String() string

type SignUserKeyResponse

type SignUserKeyResponse struct {

	// signed certificate to use to connect to the host, in authorized_keys format
	SignedCertificate string `protobuf:"bytes,1,opt,name=signed_certificate,proto3" json:"signed_certificate,omitempty"`
	// contains filtered or unexported fields
}

func (*SignUserKeyResponse) Descriptor deprecated

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

Deprecated: Use SignUserKeyResponse.ProtoReflect.Descriptor instead.

func (*SignUserKeyResponse) GetSignedCertificate

func (x *SignUserKeyResponse) GetSignedCertificate() string

func (*SignUserKeyResponse) ProtoMessage

func (*SignUserKeyResponse) ProtoMessage()

func (*SignUserKeyResponse) ProtoReflect

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

func (*SignUserKeyResponse) Reset

func (x *SignUserKeyResponse) Reset()

func (*SignUserKeyResponse) String

func (x *SignUserKeyResponse) String() string

type SignerClient

type SignerClient interface {
	// Sign a users key for access
	SignUserKey(ctx context.Context, in *SignUserKeyRequest, opts ...grpc.CallOption) (*SignUserKeyResponse, error)
	// Sign a host key
	SignHostKey(ctx context.Context, in *SignHostKeyRequest, opts ...grpc.CallOption) (*SignHostKeyResponse, error)
	// Get a list of currently valid signers for user keys
	UserSigners(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*UserSignersResponse, error)
	// Get a list of currently valid signers for host keys
	HostSigners(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HostSignersResponse, error)
}

SignerClient is the client API for Signer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSignerClient

func NewSignerClient(cc grpc.ClientConnInterface) SignerClient

type SignerServer

type SignerServer interface {
	// Sign a users key for access
	SignUserKey(context.Context, *SignUserKeyRequest) (*SignUserKeyResponse, error)
	// Sign a host key
	SignHostKey(context.Context, *SignHostKeyRequest) (*SignHostKeyResponse, error)
	// Get a list of currently valid signers for user keys
	UserSigners(context.Context, *empty.Empty) (*UserSignersResponse, error)
	// Get a list of currently valid signers for host keys
	HostSigners(context.Context, *empty.Empty) (*HostSignersResponse, error)
}

SignerServer is the server API for Signer service.

type UnimplementedSignerServer

type UnimplementedSignerServer struct {
}

UnimplementedSignerServer can be embedded to have forward compatible implementations.

func (*UnimplementedSignerServer) HostSigners

func (*UnimplementedSignerServer) SignHostKey

func (*UnimplementedSignerServer) SignUserKey

func (*UnimplementedSignerServer) UserSigners

type UserSignersResponse

type UserSignersResponse struct {
	VerificationKeys []*VerificationKey `protobuf:"bytes,1,rep,name=verification_keys,proto3" json:"verification_keys,omitempty"`
	// contains filtered or unexported fields
}

func (*UserSignersResponse) Descriptor deprecated

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

Deprecated: Use UserSignersResponse.ProtoReflect.Descriptor instead.

func (*UserSignersResponse) GetVerificationKeys

func (x *UserSignersResponse) GetVerificationKeys() []*VerificationKey

func (*UserSignersResponse) ProtoMessage

func (*UserSignersResponse) ProtoMessage()

func (*UserSignersResponse) ProtoReflect

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

func (*UserSignersResponse) Reset

func (x *UserSignersResponse) Reset()

func (*UserSignersResponse) String

func (x *UserSignersResponse) String() string

type VerificationKey

type VerificationKey struct {

	// SSH authorized_keys format
	Key    []byte               `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Expiry *timestamp.Timestamp `protobuf:"bytes,2,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

func (*VerificationKey) Descriptor deprecated

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

Deprecated: Use VerificationKey.ProtoReflect.Descriptor instead.

func (*VerificationKey) GetExpiry

func (x *VerificationKey) GetExpiry() *timestamp.Timestamp

func (*VerificationKey) GetKey

func (x *VerificationKey) GetKey() []byte

func (*VerificationKey) ProtoMessage

func (*VerificationKey) ProtoMessage()

func (*VerificationKey) ProtoReflect

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

func (*VerificationKey) Reset

func (x *VerificationKey) Reset()

func (*VerificationKey) String

func (x *VerificationKey) String() string

Directories

Path Synopsis
httpclient

Jump to

Keyboard shortcuts

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