Documentation
¶
Overview ¶
Package spiffe integrates rotating X.509 identities from the SPIFFE Workload API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IDFromContext ¶
IDFromContext returns the verified peer SPIFFE ID from gRPC transport credentials.
Types ¶
type Config ¶
type Config struct {
Socket, TrustDomain, ExpectedID string
AllowedPeers []string
Authorize func(string) bool
AllowTrustDomain bool
Timeout time.Duration
}
Config contains explicit constructor settings; see package documentation for defaults.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source owns a rotating SPIFFE Workload API identity and peer authorization policy.
func New ¶
New constructs and validates an explicitly owned instance. See package documentation for defaults and cleanup.
func (*Source) Allows ¶
Allows reports whether the peer SPIFFE ID satisfies the configured authorization policy.
func (*Source) Close ¶
Close releases owned resources. See package documentation for shutdown ordering.
func (*Source) GetX509SVID ¶
GetX509SVID supplies the current identity to TLS while rechecking configured identity constraints after rotation.