Documentation ¶
Index ¶
- func BuiltIn() catalog.BuiltIn
- type Config
- type Plugin
- func (p *Plugin) Close() error
- func (p *Plugin) Configure(ctx context.Context, req *configv1.ConfigureRequest) (*configv1.ConfigureResponse, error)
- func (p *Plugin) GenerateKey(ctx context.Context, req *keymanagerv1.GenerateKeyRequest) (*keymanagerv1.GenerateKeyResponse, error)
- func (p *Plugin) GetPublicKey(ctx context.Context, req *keymanagerv1.GetPublicKeyRequest) (*keymanagerv1.GetPublicKeyResponse, error)
- func (p *Plugin) GetPublicKeys(context.Context, *keymanagerv1.GetPublicKeysRequest) (*keymanagerv1.GetPublicKeysResponse, error)
- func (p *Plugin) SetLogger(log hclog.Logger)
- func (p *Plugin) SignData(ctx context.Context, req *keymanagerv1.SignDataRequest) (*keymanagerv1.SignDataResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // File path location where key metadata used by the plugin is persisted. KeyMetadataFile string `hcl:"key_metadata_file" json:"key_metadata_file"` // File path location to a custom IAM Policy (v3) that will be set to // created CryptoKeys. KeyPolicyFile string `hcl:"key_policy_file" json:"key_policy_file"` // KeyRing is the resource ID of the key ring where the keys managed by this // plugin reside, in the format projects/*/locations/*/keyRings/*. KeyRing string `hcl:"key_ring" json:"key_ring"` // Path to the service account file used to authenticate with the Cloud KMS // API. If not specified, the value of the GOOGLE_APPLICATION_CREDENTIALS // environment variable is used. ServiceAccountFile string `hcl:"service_account_file" json:"service_account_file"` }
Config provides configuration context for the plugin.
type Plugin ¶
type Plugin struct { keymanagerv1.UnsafeKeyManagerServer configv1.UnsafeConfigServer // contains filtered or unexported fields }
Plugin is the main representation of this keymanager plugin.
func (*Plugin) Configure ¶
func (p *Plugin) Configure(ctx context.Context, req *configv1.ConfigureRequest) (*configv1.ConfigureResponse, error)
Configure sets up the plugin.
func (*Plugin) GenerateKey ¶
func (p *Plugin) GenerateKey(ctx context.Context, req *keymanagerv1.GenerateKeyRequest) (*keymanagerv1.GenerateKeyResponse, error)
GenerateKey creates a key in KMS. If a key already exists in the local storage, it is updated.
func (*Plugin) GetPublicKey ¶
func (p *Plugin) GetPublicKey(ctx context.Context, req *keymanagerv1.GetPublicKeyRequest) (*keymanagerv1.GetPublicKeyResponse, error)
GetPublicKey returns the public key for a given key
func (*Plugin) GetPublicKeys ¶
func (p *Plugin) GetPublicKeys(context.Context, *keymanagerv1.GetPublicKeysRequest) (*keymanagerv1.GetPublicKeysResponse, error)
GetPublicKeys returns the publicKey for all the keys.
func (*Plugin) SignData ¶
func (p *Plugin) SignData(ctx context.Context, req *keymanagerv1.SignDataRequest) (*keymanagerv1.SignDataResponse, error)
SignData creates a digital signature for the data to be signed.
Click to show internal directories.
Click to hide internal directories.