safeauth

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotImplemented = errors.New("not implemented")

Functions

func GetInt64FromClaims

func GetInt64FromClaims(claims *map[string]interface{}, key string) int64

func GetStringFromClaims

func GetStringFromClaims(claims *map[string]interface{}, key string) string

Types

type SafeAuth added in v0.9.2

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

func NewSafeboxAuth

func NewSafeboxAuth(safeService pb.MServiceSafeboxServer) *SafeAuth

func (*SafeAuth) AddSharedSecret added in v0.9.2

initialize service with shared secret

func (*SafeAuth) ClearSharedSecrets added in v0.9.2

remocve shared secrets

func (*SafeAuth) CopyKeyNode added in v0.9.2

func (s *SafeAuth) CopyKeyNode(ctx context.Context, req *pb.CopyKeyNodeRequest) (*pb.CopyKeyNodeResponse, error)

copy a key node to new path

func (*SafeAuth) CreateDataKey added in v0.9.2

func (s *SafeAuth) CreateDataKey(ctx context.Context, req *pb.CreateDataKeyRequest) (*pb.CreateDataKeyResponse, error)

create a new data key

func (*SafeAuth) CreateKeyNode added in v0.9.2

func (s *SafeAuth) CreateKeyNode(ctx context.Context, req *pb.CreateKeyNodeRequest) (*pb.CreateKeyNodeResponse, error)

create a new key node, encrypting value creating tree node if necessary

func (*SafeAuth) DeleteDataKey added in v0.9.2

func (s *SafeAuth) DeleteDataKey(ctx context.Context, req *pb.DeleteDataKeyRequest) (*pb.DeleteDataKeyResponse, error)

delete a data key

func (*SafeAuth) DeleteKeyNode added in v0.9.2

func (s *SafeAuth) DeleteKeyNode(ctx context.Context, req *pb.DeleteKeyNodeRequest) (*pb.DeleteKeyNodeResponse, error)

delete a key node

func (*SafeAuth) DisableKeyNode added in v0.9.2

disable a key node

func (*SafeAuth) EnableKeyNode added in v0.9.2

func (s *SafeAuth) EnableKeyNode(ctx context.Context, req *pb.EnableKeyNodeRequest) (*pb.EnableKeyNodeResponse, error)

enable a key node

func (*SafeAuth) GetDataKey added in v0.9.2

func (s *SafeAuth) GetDataKey(ctx context.Context, req *pb.GetDataKeyRequest) (*pb.GetDataKeyResponse, error)

get a data key

func (*SafeAuth) GetDataKeyById added in v0.9.2

get a data key by id

func (*SafeAuth) GetDataKeysByAccount added in v0.9.2

get a data keys by account_name

func (*SafeAuth) GetDecryptedDataKey added in v0.9.2

get a decrypted version of data key

func (*SafeAuth) GetDecryptedKeyNode added in v0.9.2

get a decrypted version of key node

func (*SafeAuth) GetJwtFromContext added in v0.9.2

func (s *SafeAuth) GetJwtFromContext(ctx context.Context) (*map[string]interface{}, error)

func (*SafeAuth) GetKeyNode added in v0.9.2

func (s *SafeAuth) GetKeyNode(ctx context.Context, req *pb.GetKeyNodeRequest) (*pb.GetKeyNodeResponse, error)

get a key node by node and path

func (*SafeAuth) GetKeyNodeById added in v0.9.2

get a key node by id

func (*SafeAuth) GetKeyNodeByPath added in v0.9.2

get a list of key nodes by path

func (*SafeAuth) GetServerVersion added in v0.9.2

get current server version and uptime - health check

func (*SafeAuth) NewApiServer added in v0.9.2

func (s *SafeAuth) NewApiServer(gServer *grpc.Server) error

func (*SafeAuth) ReEncryptKeyNode added in v0.9.2

re-encrypt a key node

func (*SafeAuth) SetDatabaseConnection added in v0.9.2

func (s *SafeAuth) SetDatabaseConnection(sqlDB *sql.DB)

func (*SafeAuth) SetLogger added in v0.9.2

func (s *SafeAuth) SetLogger(logger log.Logger)

func (*SafeAuth) SetPublicKey added in v0.9.2

func (s *SafeAuth) SetPublicKey(publicKeyFile string) error

Jump to

Keyboard shortcuts

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