registryserver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Copyright 2022.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyServer

type KeyServer interface {
	// GetName returns the name of the key server
	GetName() string

	// IsReady return if the connection the key server is ready
	IsReady() bool

	// AttestQuote attests the given quote is valid. Both quote and
	// publicKey are base64 encoded. The publickey hash part of the quote
	// must match with the given publicKey.
	//
	// Returns true if given quote is valid.
	// Returns false if verification failed.
	// In case of other problems, appropriate error gets returned.
	AttestQuote(ctx context.Context, signerName string, quote []byte, publicKey []byte) (bool, error)

	// GetCAKeyCertificate retrieves the stored CA key and certificate at the key-manager
	// for given signer signerName. Both quote and publicKey are base64 encoded.
	// First the given SGX quote is validated is valid by using quote validation library.
	// The publickey hash part of the quote must match with the given publicKey.
	//
	// On success, returns the key and certificate. The CA private key(PWK) is wrapped
	// with a symmetric key(SWK) that was wrapped with the given publicKey. Both the
	// SWK and PWK are concatenated and returned as single base64 encoded block. Certificate
	// is base64 encoded.
	// Otherwise, appropriate error gets returned.
	GetCAKeyCertificate(ctx context.Context, signerName string, quote []byte, publicKey []byte) ([]byte, []byte, error)
}

type PluginRegistry

type PluginRegistry struct {
	*grpcserver.GrpcServer
	// contains filtered or unexported fields
}

func NewPluginRegistry

func NewPluginRegistry(socketPath string) (*PluginRegistry, error)

func (*PluginRegistry) GetPlugin

func (registry *PluginRegistry) GetPlugin(name string) KeyServer

func (*PluginRegistry) GetPluginNames

func (registry *PluginRegistry) GetPluginNames() []string

func (*PluginRegistry) RegisterPlugin

func (*PluginRegistry) RegisterService

func (registry *PluginRegistry) RegisterService(s *grpc.Server)

Jump to

Keyboard shortcuts

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