Documentation ¶
Index ¶
- type Config
- type Plugin
- func (p *Plugin) Attest(ctx context.Context, req *workloadattestorv1.AttestRequest) (*workloadattestorv1.AttestResponse, error)
- func (p *Plugin) BrokerHostServices(broker pluginsdk.ServiceBroker) error
- func (p *Plugin) Configure(ctx context.Context, req *configv1.ConfigureRequest) (*configv1.ConfigureResponse, error)
- func (p *Plugin) SetLogger(logger hclog.Logger)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { }
Config defines the configuration for the plugin. TODO: Add relevant configurables or remove if no configuration is required.
type Plugin ¶
type Plugin struct { // UnimplementedWorkloadAttestorServer is embedded to satisfy gRPC workloadattestorv1.UnimplementedWorkloadAttestorServer // UnimplementedConfigServer is embedded to satisfy gRPC // TODO: Remove if this plugin does not require configuration configv1.UnimplementedConfigServer // contains filtered or unexported fields }
Plugin implements the WorkloadAttestor plugin
func (*Plugin) Attest ¶
func (p *Plugin) Attest(ctx context.Context, req *workloadattestorv1.AttestRequest) (*workloadattestorv1.AttestResponse, error)
Attest implements the WorkloadAttestor Attest RPC. Attests the specified workload process. If the process is not one the attestor is in a position to attest (e.g. k8s attestor attesting a non-k8s workload), the call will succeed but return no selectors. If the process is one of the attestor is in a position to attest, but the attestor fails to gather all selectors related to that workload, the call will fail. Otherwise, the attestor will return one or more workload selectors.
func (*Plugin) BrokerHostServices ¶
func (p *Plugin) BrokerHostServices(broker pluginsdk.ServiceBroker) error
BrokerHostServices is called by the framework when the plugin is loaded to give the plugin a chance to obtain clients to SPIRE host services. TODO: Remove if the plugin does not need host services.
func (*Plugin) Configure ¶
func (p *Plugin) Configure(ctx context.Context, req *configv1.ConfigureRequest) (*configv1.ConfigureResponse, error)
Configure configures the plugin. This is invoked by SPIRE when the plugin is first loaded. In the future, it may be invoked to reconfigure the plugin. As such, it should replace the previous configuration atomically. TODO: Remove if no configuration is required