spiffe

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcquireSourceForSentinel

func AcquireSourceForSentinel(
	ctx context.Context,
) (*workloadapi.X509Source, bool)

AcquireSourceForSentinel initiates an asynchronous operation to obtain an X509Source from the SPIFFE workload API, using the context for cancellation and a correlation ID for logging purposes.

It attempts to create a new X509Source configured with the SPIRE server address from the environment, fetches the X509SVID from the source, and validates the SVID against a known VSecM Sentinel value to ensure the caller is operating within a trusted environment.

Parameters:

  • ctx: A context.Context object used for cancellation and to carry metadata across API boundaries, including a correlation ID for tracking the operation in logs.

Returns:

  • A pointer to a workloadapi.X509Source object if the source is successfully acquired and validated. This object can be used to obtain X.509 SVIDs for secure communication.
  • A boolean flag indicating whether the source was successfully acquired (true) or not (false). If false, the source pointer will be nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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