Skip to content

Support grpc provider TLS #127

@salrashid123

Description

@salrashid123

hi-

The GRPC key provder does not have the option of using TLS:

https://github.com/containers/ocicrypt/blob/main/keywrap/keyprovider/keyprovider.go#L171

It would be nice if there would be come configuration which allows for TLS settings such that you can utilize TLS (and more specifically basic mTLS).

the usecase is something like this:

if i run a kubernetes node as TEE where the node itself has mTLS certificates present by some other mean (by cloud provider, spiffee agent(?)), and one which has /usr/local/bin/ctd-decoder set to use ocicrypt grpc, I'd like to invoke encryption/decryption grpc calls over TLS which uses the client certs.


It looks like the existing keyprovider config just loads the grpc settings as a string (host:port) so there' isn't a straight forward, clean way to specify basic tls config values:

type KeyProviderAttrs struct {
	Command *Command `json:"cmd,omitempty"`
	Grpc    string   `json:"grpc,omitempty"`
}

not so great options would lead to breaking changes (eg, change Grpc from string to a json struct with a subset of tls.Config values or the Grpc string is a uri with host:port?key=value where key=value are the tls.Config stuff

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions