spire

package
v1.14.0-pre.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"spire-client",
	"Spire Server API Client",
	cell.Config(ClientConfig{}),
	cell.Provide(NewClient),
)

Cell is the cell for the SPIRE client.

Functions

func NewClient

NewClient creates a new SPIRE client. If the mTLS is not enabled, it returns a noop client.

Types

type Client

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

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, id string) error

Delete deletes the SPIFFE ID for the given ID. The SPIFFE ID is in the form of spiffe://<trust-domain>/identity/<id>.

func (*Client) Upsert

func (c *Client) Upsert(ctx context.Context, id string) error

Upsert creates or updates the SPIFFE ID for the given ID. The SPIFFE ID is in the form of spiffe://<trust-domain>/identity/<id>.

type ClientConfig

type ClientConfig struct {
	AuthMTLSEnabled              bool          `mapstructure:"mesh-auth-mtls-enabled"`
	SpireAgentSocketPath         string        `mapstructure:"mesh-auth-spire-agent-socket"`
	SpireServerAddress           string        `mapstructure:"mesh-auth-spire-server-address"`
	SpireServerConnectionTimeout time.Duration `mapstructure:"mesh-auth-spire-server-connection-timeout"`
	SpiffeTrustDomain            string        `mapstructure:"mesh-auth-spiffe-trust-domain"`
}

ClientConfig contains the configuration for the SPIRE client.

func (ClientConfig) Flags

func (cfg ClientConfig) Flags(flags *pflag.FlagSet)

Flags adds the flags used by ClientConfig.

Jump to

Keyboard shortcuts

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