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.
Click to show internal directories.
Click to hide internal directories.