Documentation ¶
Index ¶
- Variables
- func ParseXFCC(val string) map[string]string
- func RegisterSSHCertificateServiceServer(s grpc.ServiceRegistrar, srv SSHCertificateServiceServer)
- type RemoteID
- type SSHCertificateRequest
- func (*SSHCertificateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SSHCertificateRequest) GetCriticalOptions() map[string]string
- func (x *SSHCertificateRequest) GetExtensions() map[string]string
- func (x *SSHCertificateRequest) GetHostname() []string
- func (x *SSHCertificateRequest) GetKeyId() string
- func (x *SSHCertificateRequest) GetPublic() string
- func (x *SSHCertificateRequest) GetUser() string
- func (x *SSHCertificateRequest) GetValidityDuration() int64
- func (*SSHCertificateRequest) ProtoMessage()
- func (x *SSHCertificateRequest) ProtoReflect() protoreflect.Message
- func (x *SSHCertificateRequest) Reset()
- func (x *SSHCertificateRequest) String() string
- type SSHCertificateResponse
- func (*SSHCertificateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SSHCertificateResponse) GetHost() string
- func (x *SSHCertificateResponse) GetRoot() string
- func (x *SSHCertificateResponse) GetUser() string
- func (*SSHCertificateResponse) ProtoMessage()
- func (x *SSHCertificateResponse) ProtoReflect() protoreflect.Message
- func (x *SSHCertificateResponse) Reset()
- func (x *SSHCertificateResponse) String() string
- type SSHCertificateServiceClient
- type SSHCertificateServiceServer
- type SSHSigner
- type UnimplementedSSHCertificateServiceServer
- type UnsafeSSHCertificateServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_ssh_signer_proto protoreflect.FileDescriptor
var GetConf func(string, string) string = func(k string, d string) string { v := os.Getenv(k) if v != "" { return v } return d }
var SSHCertificateService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ssh.SSHCertificateService", HandlerType: (*SSHCertificateServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateCertificate", Handler: _SSHCertificateService_CreateCertificate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ssh-signer.proto", }
SSHCertificateService_ServiceDesc is the grpc.ServiceDesc for SSHCertificateService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func ParseXFCC ¶
ParseXFCC is a minimal (and probably buggy) parser for XFCC envoy header. It does not deal with quoted strings including special chars (,;=). Istio certs are safe.
func RegisterSSHCertificateServiceServer ¶
func RegisterSSHCertificateServiceServer(s grpc.ServiceRegistrar, srv SSHCertificateServiceServer)
Types ¶
type RemoteID ¶
func RemoteIDmTLS ¶
type SSHCertificateRequest ¶
type SSHCertificateRequest struct { // Public key to sign Public string `protobuf:"bytes,1,opt,name=public,proto3" json:"public,omitempty"` // hostname to sign. Namespace and domain will be added Hostname []string `protobuf:"bytes,2,rep,name=hostname,proto3" json:"hostname,omitempty"` User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` KeyId string `protobuf:"bytes,5,opt,name=keyId,proto3" json:"keyId,omitempty"` // Optional: requested certificate validity period, in seconds. ValidityDuration int64 `protobuf:"varint,4,opt,name=validity_duration,json=validityDuration,proto3" json:"validity_duration,omitempty"` CriticalOptions map[string]string `` /* 194-byte string literal not displayed */ Extensions map[string]string `` /* 161-byte string literal not displayed */ // contains filtered or unexported fields }
Certificate request message. In SSH, the user certificate includes:
- public key and nonce
- CertType = 1
- KeyId - optional
- ValidPrincipals[] - matched against user
func (*SSHCertificateRequest) Descriptor
deprecated
func (*SSHCertificateRequest) Descriptor() ([]byte, []int)
Deprecated: Use SSHCertificateRequest.ProtoReflect.Descriptor instead.
func (*SSHCertificateRequest) GetCriticalOptions ¶
func (x *SSHCertificateRequest) GetCriticalOptions() map[string]string
func (*SSHCertificateRequest) GetExtensions ¶
func (x *SSHCertificateRequest) GetExtensions() map[string]string
func (*SSHCertificateRequest) GetHostname ¶
func (x *SSHCertificateRequest) GetHostname() []string
func (*SSHCertificateRequest) GetKeyId ¶
func (x *SSHCertificateRequest) GetKeyId() string
func (*SSHCertificateRequest) GetPublic ¶
func (x *SSHCertificateRequest) GetPublic() string
func (*SSHCertificateRequest) GetUser ¶
func (x *SSHCertificateRequest) GetUser() string
func (*SSHCertificateRequest) GetValidityDuration ¶
func (x *SSHCertificateRequest) GetValidityDuration() int64
func (*SSHCertificateRequest) ProtoMessage ¶
func (*SSHCertificateRequest) ProtoMessage()
func (*SSHCertificateRequest) ProtoReflect ¶
func (x *SSHCertificateRequest) ProtoReflect() protoreflect.Message
func (*SSHCertificateRequest) Reset ¶
func (x *SSHCertificateRequest) Reset()
func (*SSHCertificateRequest) String ¶
func (x *SSHCertificateRequest) String() string
type SSHCertificateResponse ¶
type SSHCertificateResponse struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` Root string `protobuf:"bytes,3,opt,name=root,proto3" json:"root,omitempty"` // contains filtered or unexported fields }
Certificate response message.
func (*SSHCertificateResponse) Descriptor
deprecated
func (*SSHCertificateResponse) Descriptor() ([]byte, []int)
Deprecated: Use SSHCertificateResponse.ProtoReflect.Descriptor instead.
func (*SSHCertificateResponse) GetHost ¶
func (x *SSHCertificateResponse) GetHost() string
func (*SSHCertificateResponse) GetRoot ¶
func (x *SSHCertificateResponse) GetRoot() string
func (*SSHCertificateResponse) GetUser ¶
func (x *SSHCertificateResponse) GetUser() string
func (*SSHCertificateResponse) ProtoMessage ¶
func (*SSHCertificateResponse) ProtoMessage()
func (*SSHCertificateResponse) ProtoReflect ¶
func (x *SSHCertificateResponse) ProtoReflect() protoreflect.Message
func (*SSHCertificateResponse) Reset ¶
func (x *SSHCertificateResponse) Reset()
func (*SSHCertificateResponse) String ¶
func (x *SSHCertificateResponse) String() string
type SSHCertificateServiceClient ¶
type SSHCertificateServiceClient interface {
CreateCertificate(ctx context.Context, in *SSHCertificateRequest, opts ...grpc.CallOption) (*SSHCertificateResponse, error)
}
SSHCertificateServiceClient is the client API for SSHCertificateService 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.
func NewSSHCertificateServiceClient ¶
func NewSSHCertificateServiceClient(cc grpc.ClientConnInterface) SSHCertificateServiceClient
type SSHCertificateServiceServer ¶
type SSHCertificateServiceServer interface { CreateCertificate(context.Context, *SSHCertificateRequest) (*SSHCertificateResponse, error) // contains filtered or unexported methods }
SSHCertificateServiceServer is the server API for SSHCertificateService service. All implementations must embed UnimplementedSSHCertificateServiceServer for forward compatibility
type SSHSigner ¶
type SSHSigner struct { UnimplementedSSHCertificateServiceServer Root string Signer gossh.Signer Domain string }
func (*SSHSigner) CreateCertificate ¶
func (s *SSHSigner) CreateCertificate(ctx context.Context, in *SSHCertificateRequest) (*SSHCertificateResponse, error)
func (*SSHSigner) Init ¶
Init will load the private key By default will use ./var/run/secrets/ssh-ca This can be overridden using SSH_CA_DIR env.
type UnimplementedSSHCertificateServiceServer ¶
type UnimplementedSSHCertificateServiceServer struct { }
UnimplementedSSHCertificateServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSSHCertificateServiceServer) CreateCertificate ¶
func (UnimplementedSSHCertificateServiceServer) CreateCertificate(context.Context, *SSHCertificateRequest) (*SSHCertificateResponse, error)
type UnsafeSSHCertificateServiceServer ¶
type UnsafeSSHCertificateServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSSHCertificateServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SSHCertificateServiceServer will result in compilation errors.